mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-23 23:00:19 +00:00
ac76531a7c
currently, we are making use of host path directory
to store the provisioner socket, as this
the socket is not needed by anyone else other than
containers inside the provisioner pod using the
empty directory to store this socket is the best option.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit fbda8cc4ca
)
158 lines
4.4 KiB
YAML
158 lines
4.4 KiB
YAML
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: csi-cephfsplugin-provisioner
|
|
labels:
|
|
app: csi-metrics
|
|
spec:
|
|
selector:
|
|
app: csi-cephfsplugin-provisioner
|
|
ports:
|
|
- name: http-metrics
|
|
port: 8080
|
|
protocol: TCP
|
|
targetPort: 8681
|
|
- name: grpc-metrics
|
|
port: 8090
|
|
protocol: TCP
|
|
targetPort: 8091
|
|
|
|
---
|
|
kind: Deployment
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: csi-cephfsplugin-provisioner
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: csi-cephfsplugin-provisioner
|
|
replicas: 3
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: csi-cephfsplugin-provisioner
|
|
spec:
|
|
serviceAccount: cephfs-csi-provisioner
|
|
containers:
|
|
- name: csi-provisioner
|
|
image: quay.io/k8scsi/csi-provisioner:v1.3.0
|
|
args:
|
|
- "--csi-address=$(ADDRESS)"
|
|
- "--v=5"
|
|
- "--timeout=150s"
|
|
- "--enable-leader-election=true"
|
|
- "--leader-election-type=leases"
|
|
- "--retry-interval-start=500ms"
|
|
env:
|
|
- name: ADDRESS
|
|
value: unix:///csi/csi-provisioner.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: csi-cephfsplugin-attacher
|
|
image: quay.io/k8scsi/csi-attacher:v1.2.0
|
|
args:
|
|
- "--v=5"
|
|
- "--csi-address=$(ADDRESS)"
|
|
- "--leader-election=true"
|
|
- "--leader-election-type=leases"
|
|
env:
|
|
- name: ADDRESS
|
|
value: /csi/csi-provisioner.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: csi-cephfsplugin
|
|
securityContext:
|
|
privileged: true
|
|
capabilities:
|
|
add: ["SYS_ADMIN"]
|
|
# for stable functionality replace canary with latest release version
|
|
image: quay.io/cephcsi/cephcsi:v1.2.2
|
|
args:
|
|
- "--nodeid=$(NODE_ID)"
|
|
- "--type=cephfs"
|
|
- "--controllerserver=true"
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--v=5"
|
|
- "--drivername=cephfs.csi.ceph.com"
|
|
- "--metadatastorage=k8s_configmap"
|
|
- "--pidlimit=-1"
|
|
- "--metricsport=8091"
|
|
- "--metricspath=/metrics"
|
|
- "--enablegrpcmetrics=false"
|
|
env:
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: NODE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///csi/csi-provisioner.sock
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
- name: host-sys
|
|
mountPath: /sys
|
|
- name: lib-modules
|
|
mountPath: /lib/modules
|
|
readOnly: true
|
|
- name: host-dev
|
|
mountPath: /dev
|
|
- name: ceph-csi-config
|
|
mountPath: /etc/ceph-csi-config/
|
|
- name: keys-tmp-dir
|
|
mountPath: /tmp/csi/keys
|
|
- name: liveness-prometheus
|
|
image: quay.io/cephcsi/cephcsi:v1.2.2
|
|
args:
|
|
- "--type=liveness"
|
|
- "--endpoint=$(CSI_ENDPOINT)"
|
|
- "--metricsport=8681"
|
|
- "--metricspath=/metrics"
|
|
- "--polltime=60s"
|
|
- "--timeout=3s"
|
|
env:
|
|
- name: CSI_ENDPOINT
|
|
value: unix:///csi/csi-provisioner.sock
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
volumeMounts:
|
|
- name: socket-dir
|
|
mountPath: /csi
|
|
imagePullPolicy: "IfNotPresent"
|
|
volumes:
|
|
- name: socket-dir
|
|
emptyDir: {
|
|
medium: "Memory"
|
|
}
|
|
- name: host-sys
|
|
hostPath:
|
|
path: /sys
|
|
- name: lib-modules
|
|
hostPath:
|
|
path: /lib/modules
|
|
- name: host-dev
|
|
hostPath:
|
|
path: /dev
|
|
- name: ceph-csi-config
|
|
configMap:
|
|
name: ceph-csi-config
|
|
- name: keys-tmp-dir
|
|
emptyDir: {
|
|
medium: "Memory"
|
|
}
|