apiVersion: apps/v1
kind: Deployment
metadata:
  name: kettle
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kettle
  template:
    metadata:
      labels:
        app: kettle
    spec:
      containers:
      - name: kettle
        image: gcr.io/k8s-testimages/kettle:latest
        imagePullPolicy: Always
        env:
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /etc/service-account/service-account.json
        - name: DEPLOYMENT
          value: prod
        - name: SUBSCRIPTION_PATH
          value: kubernetes-jenkins/gcs-changes/kettle
        volumeMounts:
        - name: service
          mountPath: /etc/service-account
          readOnly: true
        - name: data
          mountPath: /data
      volumes:
      - name: service
        secret:
          secretName: kettle-service-account
      - name: data
        persistentVolumeClaim:
          claimName: kettle-data
