apiVersion: apps/v1
kind: Deployment
metadata:
  name: statistic-microservice
  labels:
    app: statistic-microservice
spec:
  replicas: 1
  selector:
    matchLabels:
      app: statistic-microservice
  template:
    metadata:
      labels:
        app: statistic-microservice
    spec:
      containers:
      - name: statistic
        image: eu.gcr.io/PROJECT_NAME/statistic-microservice:latest
        volumeMounts:
        - name: google-cloud-key
          mountPath: /var/secrets/google
        env:
        - name: GOOGLE_APPLICATION_CREDENTIALS
          value: /var/secrets/google/credentials.json
        ports:
        - name: http-server
          containerPort: 8080
        imagePullPolicy: Always
      volumes:
      - name: google-cloud-key
        secret:
          secretName: statistic-secret