Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Add Kubernetes manifests #23

Merged
merged 1 commit into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ services:
ports: "8080:3000"
```

### Kubernetes

Deploy the manifests in the [`kubernetes`](kubernetes/) folder.

```sh
kubectl -k kubernetes/
```

You can expose the service via an [Ingress](kubernetes/ingress.yaml).

### Google Cloud Run

Click the button to deploy the image to Google Cloud Run.
Expand Down
36 changes: 36 additions & 0 deletions kubernetes/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: jira-to-slack
name: jira-to-slack
spec:
replicas: 1
selector:
matchLabels:
app: jira-to-slack
template:
metadata:
labels:
app: jira-to-slack
spec:
containers:
- image: int128/jira-to-slack:v1.9.0
name: jira-to-slack
ports:
- name: http
containerPort: 3000
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: http
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
requests:
memory: 32Mi
limits:
memory: 32Mi
3 changes: 3 additions & 0 deletions kubernetes/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- deployment.yaml
- service.yaml
15 changes: 15 additions & 0 deletions kubernetes/base/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: jira-to-slack
name: jira-to-slack
spec:
type: ClusterIP
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
selector:
app: jira-to-slack
13 changes: 13 additions & 0 deletions kubernetes/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: jira-to-slack
spec:
rules:
- host: jira-to-slack.example.com
http:
paths:
- path: /
backend:
serviceName: jira-to-slack
servicePort: http
6 changes: 6 additions & 0 deletions kubernetes/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace: jira-to-slack
bases:
- base/
resources:
- namespace.yaml
#- ingress.yaml
6 changes: 6 additions & 0 deletions kubernetes/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: jira-to-slack
labels:
name: jira-to-slack