Skip to content

Commit

Permalink
Convert boskos deployment to a statefulset
Browse files Browse the repository at this point in the history
  • Loading branch information
msau42 committed Sep 15, 2017
1 parent b90fa18 commit 6e0af02
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions boskos/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ metadata:
name: boskos-storage
namespace: test-pods
spec:
claimRef:
name: boskos-volume-boskos-0
namespace: test-pods
capacity:
storage: 1Gi
accessModes:
Expand All @@ -35,24 +38,24 @@ kind: PersistentVolumeClaim
metadata:
labels:
app: boskos
name: boskos-storage
name: boskos-volume-boskos-0
namespace: test-pods
spec:
storageClassName: boskos
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
# Start of Deployment
apiVersion: extensions/v1beta1
kind: Deployment
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: boskos
labels:
app: boskos
namespace: test-pods
spec:
serviceName: "boskos"
replicas: 1 # one canonical source of resources
template:
metadata:
Expand All @@ -77,9 +80,15 @@ spec:
mountPath: /etc/config
readOnly: true
volumes:
- name: boskos-volume
persistentVolumeClaim:
claimName: boskos-storage
- name: boskos-config
configMap:
name: resources
volumeClaimTemplates:
- metadata:
name: boskos-volume
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: boskos
resources:
requests:
storage: 1Gi

0 comments on commit 6e0af02

Please sign in to comment.