Permalink
Browse files

Organize K8s manifests

  • Loading branch information...
tzumby committed Nov 14, 2017
1 parent 8a72c7a commit 86ddf35ce737b808892dea6cf4cc647647243827
@@ -1,52 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app: rails-kube-app
spec:
ports:
- port: 5432
selector:
app: rails-kube-app
tier: database
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: postgres-pv
labels:
type: local
spec:
capacity:
storage: 4Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/tmp/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
---
apiVersion: v1
kind: ReplicationController
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: postgres
labels:
app: rails-kube-app
spec:
replicas: 1
selector:
app: rails-kube-app
tier: database
matchLabels:
app: rails-kube-app
tier: database
template:
metadata:
name: postgres
@@ -1,25 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: rails
labels:
app: rails-kube-app
spec:
ports:
- port: 3000
selector:
app: rails-kube-app
tier: app
---
apiVersion: v1
kind: ReplicationController
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: rails
name: rails-deployment
spec:
replicas: 1
selector:
app: rails-kube-app
tier: app
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
selector:
matchLabels:
app: rails-kube-app
tier: app
template:
metadata:
name: rails
@@ -1,25 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app: rails-kube-app
spec:
ports:
- port: 6379
selector:
app: rails-kube-app
tier: cache
---
apiVersion: v1
kind: ReplicationController
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: redis
name: redis-deployment
spec:
replicas: 1
selector:
app: rails-kube-app
tier: cache
selector:
matchLabels:
app: rails-kube-app
tier: cache
template:
metadata:
name: redis
@@ -1,12 +1,20 @@
apiVersion: v1
kind: ReplicationController
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: sidekiq
name: sidekiq-deployment
spec:
replicas: 1
selector:
app: rails-kube-app
tier: queue
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
selector:
matchLabels:
app: rails-kube-app
tier: queue
template:
metadata:
name: sidekiq
@@ -4,7 +4,7 @@ metadata:
name: rails-demo-ing
spec:
rules:
- host: rails.local
- host: rails-prod.local
http:
paths:
- backend:
File renamed without changes.
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app: rails-kube-app
spec:
ports:
- port: 5432
selector:
app: rails-kube-app
tier: database
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: rails
labels:
app: rails-kube-app
spec:
ports:
- port: 3000
selector:
app: rails-kube-app
tier: app
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app: rails-kube-app
spec:
ports:
- port: 6379
selector:
app: rails-kube-app
tier: cache
@@ -0,0 +1,25 @@
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: postgres-pv
labels:
type: local
spec:
capacity:
storage: 4Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/tmp/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi

0 comments on commit 86ddf35

Please sign in to comment.