Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert boskos deployment to a statefulset #4589

Merged
merged 1 commit into from
Sep 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 16 additions & 23 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 @@ -29,30 +32,14 @@ spec:
pdName: boskos-storage
fsType: ext4
---
# Start of PersistentVolumeClaim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: boskos
name: boskos-storage
namespace: test-pods
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
# Start of Deployment
apiVersion: extensions/v1beta1
kind: Deployment
# Start of StatefulSet
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 +64,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