Skip to content

Commit

Permalink
feat: Adding gitops value (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh authored Apr 13, 2020
1 parent a5ef6df commit f0d82c5
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Following variables are required for CI:
| **DOMAIN** | for setting Traefik domain for app |
| **DOCKER_USER** | for publishing Docker image |
| **DOCKER_PASS** | for publishing Docker image |
| **SCRIPTS_NO_INTERACTIVE** | for running scripts in CI |

## Usage

Expand Down
37 changes: 37 additions & 0 deletions infra/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: goweb
spec:
selector:
matchLabels:
name: goweb
template:
metadata:
labels:
name: goweb
annotations:
prometheus.io/scrape: "true"
prometheus.io/scheme: http
prometheus.io/port: "1080"
spec:
containers:
- name: goweb
image: vibioh/goweb
ports:
- name: http
containerPort: 1080
readinessProbe:
httpGet:
path: /health
port: http
livenessProbe:
httpGet:
path: /health
port: http
resources:
requests:
memory: 24M
limits:
memory: 64M
36 changes: 36 additions & 0 deletions infra/ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: goweb-http
spec:
entryPoints:
- http
routes:
- match: Host(`goweb.vibioh.fr`)
kind: Rule
middlewares:
- name: redirect
services:
- name: goweb
port: 80

---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: goweb-https
spec:
entryPoints:
- https
routes:
- match: Host(`goweb.vibioh.fr`)
kind: Rule
middlewares:
- name: compress
- name: ratelimit
services:
- name: goweb
port: 80
tls:
certResolver: default
12 changes: 12 additions & 0 deletions infra/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: goweb
spec:
selector:
name: goweb
ports:
- name: http
port: 80
targetPort: http

0 comments on commit f0d82c5

Please sign in to comment.