Skip to content

Commit

Permalink
Add Kubernetes manifests (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 committed Dec 5, 2019
1 parent b68a69c commit 24440b7
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 0 deletions.
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

0 comments on commit 24440b7

Please sign in to comment.