ccyunchina-deploy/manifests/glusterfs/heketi-desployment.yaml

132 lines
3.0 KiB
YAML

apiVersion: v1
kind: ServiceAccount
metadata:
name: heketi-service-account
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: heketi-role
namespace: kube-system
labels:
k8s-app: heketi-role
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: heketi-service-account
namespace: kube-system
---
kind: Service
apiVersion: v1
metadata:
name: heketi
namespace: kube-system
labels:
glusterfs: heketi-service
deploy-heketi: support
annotations:
description: Exposes Heketi Service
spec:
selector:
name: heketi
ports:
- name: heketi
port: 8080
targetPort: 8080
nodePort: 26060
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: "Defines how to deploy Heketi"
labels:
glusterfs: heketi-deployment
name: heketi
namespace: kube-system
spec:
selector:
matchLabels:
glusterfs: heketi-pod
name: heketi
replicas: 1
template:
metadata:
labels:
glusterfs: heketi-pod
name: heketi
name: heketi
spec:
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"
containers:
-
env:
-
name: HEKETI_EXECUTOR
value: kubernetes
-
name: HEKETI_IGNORE_STALE_OPERATIONS
value: "true"
-
name: HEKETI_FSTAB
value: /var/lib/heketi/fstab
-
name: HEKETI_SNAPSHOT_LIMIT
value: "14"
-
name: HEKETI_KUBE_GLUSTER_DAEMONSET
value: "y"
image: dev-docker-registry.ccyunchina.com/toyangdon/heketi:8-arm64
resources:
requests:
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
memory: 250Mi
livenessProbe:
httpGet:
path: /hello
port: 8080
initialDelaySeconds: 30
timeoutSeconds: 3
name: heketi
ports:
-
containerPort: 8080
readinessProbe:
httpGet:
path: /hello
port: 8080
initialDelaySeconds: 3
timeoutSeconds: 3
volumeMounts:
-
mountPath: /var/lib/heketi
name: db
serviceAccountName: heketi-service-account
tolerations:
- key: "node-role.kubernetes.io/storage-node"
operator: "Exists"
effect: "NoSchedule"
volumes:
- hostPath:
path: /data/heketi
type: DirectoryOrCreate
name: db
nodeSelector:
"node.kubernetes.io/heketi": "true"