From 8b924e65ddb9b2836adfa39ea31f754e053a078a Mon Sep 17 00:00:00 2001 From: Kazuki Suda Date: Fri, 15 Apr 2022 10:49:10 +0900 Subject: [PATCH] Update README.md and Kubernetes manifests --- README.md | 5 +---- example/kubernetes/deploy.yaml | 25 ---------------------- example/kubernetes/deployment.yaml | 34 ++++++++++++++++++++++++++++++ example/kubernetes/service.yaml | 6 +++--- 4 files changed, 38 insertions(+), 32 deletions(-) delete mode 100644 example/kubernetes/deploy.yaml create mode 100644 example/kubernetes/deployment.yaml diff --git a/README.md b/README.md index d14edf6..cd22e35 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # alertmanager-to-github -[![Docker Repository on Quay](https://quay.io/repository/pfnet-alertmanager-to-github/alertmanager-to-github/status "Docker Repository on Quay")](https://quay.io/repository/pfnet-alertmanager-to-github/alertmanager-to-github) - This receives webhook requests from Alertmanager and creates GitHub issues. It does: @@ -17,7 +15,7 @@ It does: ### Docker image ``` -docker pull quay.io/pfnet-alertmanager-to-github/alertmanager-to-github:v0.0.1 +docker pull ghcr.io/pfnet-research/alertmanager-to-github:v0.0.2 ``` ### go get @@ -93,4 +91,3 @@ Issue title and body are rendered from [Go template](https://golang.org/pkg/text ### Kubernetes https://github.com/pfnet-research/alertmanager-to-github/tree/master/example/kubernetes - diff --git a/example/kubernetes/deploy.yaml b/example/kubernetes/deploy.yaml deleted file mode 100644 index 96ec812..0000000 --- a/example/kubernetes/deploy.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: alertmanager-to-github -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: alertmanager-to-github - template: - metadata: - labels: - app.kubernetes.io/name: alertmanager-to-github - spec: - containers: - - image: quay.io/pfnet-alertmanager-to-github/alertmanager-to-github:v0.0.1 - name: main - ports: - - containerPort: 8080 - env: - - name: ATG_LISTEN - value: ':8080' - envFrom: - - secretRef: - name: env # env secret has ATG_GITHUB_TOKEN diff --git a/example/kubernetes/deployment.yaml b/example/kubernetes/deployment.yaml new file mode 100644 index 0000000..c76cfbc --- /dev/null +++ b/example/kubernetes/deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: alertmanager-to-github +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: alertmanager-to-github + template: + metadata: + labels: + app.kubernetes.io/name: alertmanager-to-github + spec: + containers: + - name: alertmanager-to-github + image: ghcr.io/superbrothers/alertmanager-to-github:v0.0.2 + env: + - name: ATG_LISTEN + value: ':8080' + - name: ATG_GITHUB_TOKEN + valueFrom: + secretKeyRef: + name: alertmanager-to-github + key: ATG_GITHUB_TOKEN + securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true + readOnlyRootFilesystem: true + capabilities: + drop: + - ALL + seccompProfile: + type: RuntimeDefault diff --git a/example/kubernetes/service.yaml b/example/kubernetes/service.yaml index 9352f5e..35ef10d 100644 --- a/example/kubernetes/service.yaml +++ b/example/kubernetes/service.yaml @@ -6,6 +6,6 @@ spec: selector: app.kubernetes.io/name: alertmanager-to-github ports: - - protocol: TCP - port: 80 - targetPort: 8080 + - protocol: TCP + port: 80 + targetPort: 8080