157 lines
4.5 KiB
YAML
157 lines
4.5 KiB
YAML
---
|
|
kind: DaemonSet
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
namespace: kube-system
|
|
name: glusterfs
|
|
labels:
|
|
glusterfs: daemonset
|
|
annotations:
|
|
description: GlusterFS DaemonSet
|
|
tags: glusterfs
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
glusterfs: pod
|
|
glusterfs-node: pod
|
|
template:
|
|
metadata:
|
|
name: glusterfs
|
|
labels:
|
|
glusterfs: pod
|
|
glusterfs-node: pod
|
|
spec:
|
|
nodeSelector:
|
|
"node.kubernetes.io/storage-node": "true"
|
|
hostNetwork: true
|
|
tolerations:
|
|
- key: "node-role.kubernetes.io/storage-node"
|
|
operator: "Exists"
|
|
effect: "NoSchedule"
|
|
hostAliases:
|
|
- ip: "10.2.1.99"
|
|
hostnames:
|
|
- "node-99"
|
|
- ip: "10.2.1.233"
|
|
hostnames:
|
|
- "node-233"
|
|
- ip: "10.2.1.235"
|
|
hostnames:
|
|
- "node-235"
|
|
hostNetwork: true
|
|
containers:
|
|
- image: dev-docker-registry.ccyunchina.com/toyangdon/glusterfs-centos:4-arm64
|
|
imagePullPolicy: IfNotPresent
|
|
name: glusterfs
|
|
env:
|
|
# alternative for /dev volumeMount to enable access to *all* devices
|
|
- name: HOST_DEV_DIR
|
|
value: "/mnt/host-dev"
|
|
# set GLUSTER_BLOCKD_STATUS_PROBE_ENABLE to "1" so the
|
|
# readiness/liveness probe validate gluster-blockd as well
|
|
- name: GLUSTER_BLOCKD_STATUS_PROBE_ENABLE
|
|
value: "1"
|
|
- name: GB_GLFS_LRU_COUNT
|
|
value: "15"
|
|
- name: TCMU_LOGDIR
|
|
value: "/var/log/glusterfs/gluster-block"
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 200Mi
|
|
limits:
|
|
cpu: 2
|
|
memory: 2Gi
|
|
volumeMounts:
|
|
- name: glusterfs-heketi
|
|
mountPath: "/var/lib/heketi"
|
|
- name: glusterfs-run
|
|
mountPath: "/run"
|
|
- name: glusterfs-lvm
|
|
mountPath: "/run/lvm"
|
|
- name: glusterfs-etc
|
|
mountPath: "/etc/glusterfs"
|
|
- name: glusterfs-logs
|
|
mountPath: "/var/log/glusterfs"
|
|
- name: glusterfs-config
|
|
mountPath: "/var/lib/glusterd"
|
|
- name: glusterfs-host-dev
|
|
mountPath: "/mnt/host-dev"
|
|
- name: glusterfs-misc
|
|
mountPath: "/var/lib/misc/glusterfsd"
|
|
- name: glusterfs-block-sys-class
|
|
mountPath: "/sys/class"
|
|
- name: glusterfs-block-sys-module
|
|
mountPath: "/sys/module"
|
|
- name: glusterfs-cgroup
|
|
mountPath: "/sys/fs/cgroup"
|
|
readOnly: true
|
|
- name: glusterfs-ssl
|
|
mountPath: "/etc/ssl"
|
|
readOnly: true
|
|
- name: kernel-modules
|
|
mountPath: "/lib/modules"
|
|
readOnly: true
|
|
securityContext:
|
|
capabilities: {}
|
|
privileged: true
|
|
readinessProbe:
|
|
timeoutSeconds: 3
|
|
initialDelaySeconds: 40
|
|
exec:
|
|
command:
|
|
- "/bin/bash"
|
|
- "-c"
|
|
- "if command -v /usr/local/bin/status-probe.sh; then /usr/local/bin/status-probe.sh readiness; else systemctl status glusterd.service; fi"
|
|
periodSeconds: 25
|
|
successThreshold: 1
|
|
failureThreshold: 50
|
|
livenessProbe:
|
|
timeoutSeconds: 3
|
|
initialDelaySeconds: 40
|
|
exec:
|
|
command:
|
|
- "/bin/bash"
|
|
- "-c"
|
|
- "if command -v /usr/local/bin/status-probe.sh; then /usr/local/bin/status-probe.sh liveness; else systemctl status glusterd.service; fi"
|
|
periodSeconds: 25
|
|
successThreshold: 1
|
|
failureThreshold: 50
|
|
volumes:
|
|
- name: glusterfs-heketi
|
|
hostPath:
|
|
path: "/var/lib/heketi"
|
|
- name: glusterfs-run
|
|
- name: glusterfs-lvm
|
|
hostPath:
|
|
path: "/run/lvm"
|
|
- name: glusterfs-etc
|
|
hostPath:
|
|
path: "/etc/glusterfs"
|
|
- name: glusterfs-logs
|
|
hostPath:
|
|
path: "/var/log/glusterfs"
|
|
- name: glusterfs-config
|
|
hostPath:
|
|
path: "/var/lib/glusterd"
|
|
- name: glusterfs-host-dev
|
|
hostPath:
|
|
path: "/dev"
|
|
- name: glusterfs-misc
|
|
hostPath:
|
|
path: "/var/lib/misc/glusterfsd"
|
|
- name: glusterfs-block-sys-class
|
|
hostPath:
|
|
path: "/sys/class"
|
|
- name: glusterfs-block-sys-module
|
|
hostPath:
|
|
path: "/sys/module"
|
|
- name: glusterfs-cgroup
|
|
hostPath:
|
|
path: "/sys/fs/cgroup"
|
|
- name: glusterfs-ssl
|
|
hostPath:
|
|
path: "/etc/ssl"
|
|
- name: kernel-modules
|
|
hostPath:
|
|
path: "/lib/modules" |