Skip to content

Instantly share code, notes, and snippets.

@gurvindersingh
Created September 30, 2016 05:22
Show Gist options
  • Save gurvindersingh/d1760d85e7f3f16e511de82b60f4ea9f to your computer and use it in GitHub Desktop.
Save gurvindersingh/d1760d85e7f3f16e511de82b60f4ea9f to your computer and use it in GitHub Desktop.
glusterfs-daemonsets
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: gluster
spec:
template:
metadata:
labels:
app: gluster
spec:
hostNetwork: true
nodeSelector:
datanode: "true"
containers:
- name: gluster
image: gurvin/glusterfs-centos:latest
resources:
requests:
cpu: 500m
securityContext:
privileged: true
livenessProbe:
exec:
command:
- /bin/bash
- -c
- systemctl status glusterd.service
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
exec:
command:
- /bin/bash
- -c
- systemctl status glusterd.service
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
volumeMounts:
- name: data-1
mountPath: /mnt/data1
- name: gluster-etc
mountPath: /etc/gluster
- name: gluster-var
mountPath: /var/lib/glusterd
- name: gluster-logs
mountPath: /var/log/gluster
volumes:
- name: data-1
hostPath:
path: /data/1
- name: gluster-etc
hostPath:
path: /var/gluster/etc
- name: gluster-var
hostPath:
path: /var/gluster/var
- name: gluster-logs
hostPath:
path: /var/gluster/logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment