mirror of https://github.com/codevalet/codevalet
Add the kubernetes resources for webapp
This commit is contained in:
parent
ec6c90ba84
commit
607bb095f0
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
# Based on
|
||||
# https://radu-matei.github.io/blog/kubernetes-jenkins-azure/#configuring-jenkins-to-dinamically-spawn-agents-docker-containers-for-builds
|
||||
#
|
||||
# Thanks Radu!
|
||||
apiVersion: "v1"
|
||||
kind: "List"
|
||||
items:
|
||||
- apiVersion: "v1"
|
||||
kind: "ReplicationController"
|
||||
metadata:
|
||||
name: 'webapp'
|
||||
labels:
|
||||
name: 'webapp'
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
name: 'webapp'
|
||||
labels:
|
||||
name: 'webapp'
|
||||
spec:
|
||||
containers:
|
||||
- name: 'webapp'
|
||||
image: 'rtyler/codevalet-webapp:latest'
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9292
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9292
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 3
|
||||
|
||||
- apiVersion: "v1"
|
||||
kind: "Service"
|
||||
metadata:
|
||||
name: 'webapp'
|
||||
spec:
|
||||
type: 'LoadBalancer'
|
||||
selector:
|
||||
name: 'webapp'
|
||||
ports:
|
||||
-
|
||||
name: "http"
|
||||
port: 80
|
||||
targetPort: 9292
|
||||
protocol: "TCP"
|
||||
|
||||
# vim: ft=yaml
|
Loading…
Reference in New Issue