From d4fd151762bfd3fec6aad00068bab4d294d52f32 Mon Sep 17 00:00:00 2001 From: Matthias Loibl Date: Tue, 8 Aug 2017 15:06:07 +0200 Subject: [PATCH] Create example deployments for kubernetes and docker-compose --- deployments/docker-compose.yml | 17 +++++++++++ deployments/kubernetes.yml | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 deployments/docker-compose.yml create mode 100644 deployments/kubernetes.yml diff --git a/deployments/docker-compose.yml b/deployments/docker-compose.yml new file mode 100644 index 0000000..83c47a5 --- /dev/null +++ b/deployments/docker-compose.yml @@ -0,0 +1,17 @@ +version: '2' + +services: + github-releases-notifier: + restart: always + image: justwatch/github-releases-notifier + environment: + - GITHUB_TOKEN=XXX + - SLACK_HOOK=https://hooks.slack.com/services/T02MASDF7/B6WERHYRZ/XXX + command: + - '-r=golang/go' + - '-r=justwatchcom/elasticsearch_exporter' + - '-r=justwatchcom/gopass' + - '-r=justwatchcom/sql_exporter' + - '-r=kubernetes/minikube' + - '-r=prometheus/prometheus' + - '-r=shurcooL/githubql' diff --git a/deployments/kubernetes.yml b/deployments/kubernetes.yml new file mode 100644 index 0000000..6348e34 --- /dev/null +++ b/deployments/kubernetes.yml @@ -0,0 +1,52 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: github-releases-notifier +spec: + replicas: 1 + revisionHistoryLimit: 10 + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app: github-releases-notifier + spec: + securityContext: + runAsNonRoot: true + runAsUser: 1000 + containers: + - name: github-releases-notifier + image: justwatch/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 + command: + - '/bin/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 + restartPolicy: Always