apiVersion: apps/v1
kind: Deployment
metadata:
  name: fosspay
  namespace: sponsorship
  labels:
    app: fosspay
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fosspay
  template:
    metadata:
      labels:
        app: fosspay
    spec:
      containers:
        - name: fosspay
          image: gcr.io/sponsorship-263515/sponsorship:20.08.31
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 80
          readinessProbe:
            httpGet:
              path: /health
              port: 80
            periodSeconds: 30
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 10
          volumeMounts:
            - name: config
              mountPath: "/etc/fosspay"
              readOnly: true

      volumes:
        - name: config
          secret:
            secretName: fosspay
