apiVersion: apps/v1
kind: Deployment
metadata:
  name: github-releases-notifier
spec:
  replicas: 1
  strategy:                                                                                                                                                                                                                                                                   
    type: Recreate 
  selector:                                                                                                                                                                                                                                                                   
    matchLabels:                                                                                                                                                                                                                                                              
      app.kubernetes.io/name: github-releases-notifier
  template:
    metadata:
      labels:
        app.kubernetes.io/name: github-releases-notifier
    spec:
      containers:
      - name: github-releases-notifier
        image: wei840222/github-releases-notifier
        env:
        - name: GITHUB_TOKEN
          valueFrom:
            secretKeyRef:
              name: github-releases-notifier
              key: github
        - name: SLACK_HOOK
          valueFrom:
            secretKeyRef:
              name: github-releases-notifier
              key: slack
        - name: INTERVAL
          value: 1m
        - name: PERSISTENCE_FILE
          value: /github-releases-notifier.json
        command:
        - github-releases-notifier
        args:
        - -r=golang/go
        - -r=justwatchcom/elasticsearch_exporter
        - -r=justwatchcom/gopass
        - -r=justwatchcom/sql_exporter
        - -r=kubernetes/minikube
        - -r=prometheus/prometheus
        - -r=shurcooL/githubql
        resources:
          limits:
            cpu: 100m
            memory: 128Mi
          requests:
            cpu: 25m
            memory: 64Mi
