apiVersion: apps/v1
kind: Deployment
metadata:
  name: fm-test
  labels:
    app: fm-test
spec:
  replicas: 2
  selector:
    matchLabels:
      app: fm-test
  template:
    metadata:
      labels:
        app: fm-test
    spec:
      containers:
      - name: fm-test
        image: afirth/fm-test:0.0.2
        imagePullPolicy: IfNotPresent
        ports:
        - name: http
          containerPort: 8080
        livenessProbe:
          httpGet:
            path: /healthz
            port: http
          initialDelaySeconds: 5
          periodSeconds: 5
        env:
        - name: "HTTPADDR"
          value: ":8080"
        - name: "USERNAME"
          valueFrom:
            secretKeyRef:
              name: fm-test-secret
              key: username
        - name: "PASSWORD"
          valueFrom:
            secretKeyRef:
              name: fm-test-secret
              key: password
