1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-08-24 02:22:20 +00:00

Add CI/CD and k8s

This commit is contained in:
J. Fernando Sánchez
2018-06-15 09:46:15 +02:00
parent 62142482dc
commit 54da48b548
7 changed files with 118 additions and 15 deletions

8
k8s/README.md Normal file
View File

@@ -0,0 +1,8 @@
Deploy senpy to a kubernetes cluster.
The files are templates, which need to be expanded with something like envsubst.
Example usage:
```
cat k8s/*.ya*ml | envsubst | kubectl apply -n senpy -f -
```

24
k8s/senpy-deployment.yaml Normal file
View File

@@ -0,0 +1,24 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: senpy-$NAME-latest
spec:
replicas: 1
template:
metadata:
labels:
role: $NAME-latest
app: test
spec:
containers:
- name: senpy-latest
image: $IMAGEWTAG
imagePullPolicy: Always
resources:
limits:
memory: "512Mi"
cpu: "1000m"
ports:
- name: web
containerPort: 5000

14
k8s/senpy-ingress.yaml Normal file
View File

@@ -0,0 +1,14 @@
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: senpy-$NAME-ingress
spec:
rules:
- host: senpy.cluster.gsi.dit.upm.es
http:
paths:
- path: /
backend:
serviceName: senpy-$NAME-latest
servicePort: 5000

12
k8s/senpy-svc.yaml Normal file
View File

@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: senpy-$NAME-latest
spec:
type: ClusterIP
ports:
- port: 5000
protocol: TCP
selector:
role: $NAME-latest