206 lines
5.7 KiB
YAML
206 lines
5.7 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: rook-edgefs
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: rook-edgefs-cluster
|
|
namespace: rook-edgefs
|
|
---
|
|
kind: Role
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: rook-edgefs-cluster
|
|
namespace: rook-edgefs
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["configmaps", "endpoints"]
|
|
verbs: [ "get", "list", "watch", "create", "update", "delete" ]
|
|
- apiGroups: ["edgefs.rook.io"]
|
|
resources: ["*"]
|
|
verbs: ["*"]
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: [ "get", "list" ]
|
|
- apiGroups: ["extensions"]
|
|
resources: ["deployments/scale"]
|
|
verbs: [ "get", "update" ]
|
|
---
|
|
# Allow the operator to create resources in this cluster's namespace
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: rook-edgefs-cluster-mgmt
|
|
namespace: rook-edgefs
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: rook-edgefs-cluster-mgmt
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: rook-edgefs-system
|
|
namespace: rook-edgefs-system
|
|
---
|
|
# Allow the pods in this namespace to work with configmaps
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: rook-edgefs-cluster
|
|
namespace: rook-edgefs
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: rook-edgefs-cluster
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: rook-edgefs-cluster
|
|
namespace: rook-edgefs
|
|
---
|
|
apiVersion: policy/v1beta1
|
|
kind: PodSecurityPolicy
|
|
metadata:
|
|
name: privileged
|
|
spec:
|
|
fsGroup:
|
|
rule: RunAsAny
|
|
privileged: true
|
|
runAsUser:
|
|
rule: RunAsAny
|
|
seLinux:
|
|
rule: RunAsAny
|
|
supplementalGroups:
|
|
rule: RunAsAny
|
|
volumes:
|
|
- '*'
|
|
allowedCapabilities:
|
|
- '*'
|
|
hostPID: true
|
|
hostIPC: true
|
|
hostNetwork: false
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: privileged-psp-user
|
|
rules:
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- podsecuritypolicies
|
|
resourceNames:
|
|
- privileged
|
|
verbs:
|
|
- use
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: rook-edgefs-system-psp
|
|
namespace: rook-edgefs
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: privileged-psp-user
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: rook-edgefs-system
|
|
namespace: rook-edgefs-system
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: rook-edgefs-cluster-psp
|
|
namespace: rook-edgefs
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: privileged-psp-user
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: rook-edgefs-cluster
|
|
namespace: rook-edgefs
|
|
---
|
|
apiVersion: edgefs.rook.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: rook-edgefs
|
|
namespace: rook-edgefs
|
|
spec:
|
|
edgefsImageName: edgefs/edgefs:1.2.46 # specify version here, i.e. edgefs/edgefs:1.1.0 etc
|
|
serviceAccount: rook-edgefs-cluster
|
|
dataDirHostPath: /var/lib/edgefs
|
|
#dataVolumeSize: 10Gi
|
|
#devicesResurrectMode: "restoreZapWait"
|
|
#dashboard:
|
|
# localAddr: 10.3.30.75
|
|
#network: # cluster level networking configuration
|
|
# provider: host
|
|
# selectors:
|
|
# server: "enp2s0f0"
|
|
# broker: "enp2s0f0"
|
|
#skipHostPrepare: true
|
|
#maxContainerCapacity: 132Ti
|
|
#trlogProcessingInterval: 2 # set transaction log processing interval to 2s to speed up ISGW Link delivery
|
|
#trlogKeepDays: 2 # keep up to 2 days of transaction log interval batches to reduce local storage overhead
|
|
#useHostLocalTime: true
|
|
storage: # cluster level storage configuration and selection
|
|
useAllNodes: true
|
|
# directories:
|
|
# - path: /mnt/disks/ssd0
|
|
# - path: /mnt/disks/ssd1
|
|
# - path: /mnt/disks/ssd2
|
|
useAllDevices: true
|
|
# config:
|
|
# mdReserved: "30" # allocate only 30% of offloaded SSD/NVMe slice for Metadata, the rest keep for BCache
|
|
# hddReadAhead: "2048" # speed up reads of 2MB+ chunks of HDD (offload use case)
|
|
# rtVerifyChid: "0" # may improve CPU utilization
|
|
# lmdbPageSize: "32768" # larger value can improve stream operations
|
|
# useMetadataOffload: "true" # enable use of SSD device as metadata offload
|
|
# useBCache: "true" # enable SSD cache device and read-cache
|
|
# useBCacheWB: "true" # enable SSD write-cache
|
|
# useMetadataMask: "0xff" # all metadata on SSD
|
|
# rtPLevelOverride: "4" # enable large device partitioning, only needed if automatic not working
|
|
# sync: "0" # highest performance, consistent on pod/software failures, not-consistent on power failures
|
|
# useAllSSD: "true" # use only SSDs during deployment
|
|
# zone: "1" # defines failure domain's zone number for all edgefs nodes
|
|
# nodes:
|
|
# - name: node3071ub16
|
|
# - name: node3072ub16
|
|
# - name: node3073ub16
|
|
# - name: node3074ub16 # node level storage configuration
|
|
# devices: # specific devices to use for storage can be specified for each node
|
|
# - name: "sdb"
|
|
# - name: "sdc"
|
|
# config: # configuration can be specified at the node level which overrides the cluster level config
|
|
# rtPLevelOverride: 8
|
|
# zone: "2" # defines failure domain's zone number for specific node(node3074ub16)
|
|
#resources:
|
|
# limits:
|
|
# cpu: "2"
|
|
# memory: "4096Mi"
|
|
# requests:
|
|
# cpu: "2"
|
|
# memory: "4096Mi"
|
|
# A key value list of annotations
|
|
#annotations:
|
|
# all:
|
|
# key: value
|
|
# mgr:
|
|
# prepare:
|
|
# target:
|
|
#placement:
|
|
# all:
|
|
# nodeAffinity:
|
|
# requiredDuringSchedulingIgnoredDuringExecution:
|
|
# nodeSelectorTerms:
|
|
# - matchExpressions:
|
|
# - key: nodekey
|
|
# operator: In
|
|
# values:
|
|
# - edgefs-target
|
|
# tolerations:
|
|
# - key: taintKey
|
|
# operator: Exists
|