Revert "Use Deployment with leader election instead of StatefulSet"

This reverts commit a151bec94b.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2019-06-14 15:12:48 +05:30
committed by mergify[bot]
parent fb0cbef68b
commit 983f28ad2f
14 changed files with 90 additions and 38 deletions

View File

@ -1,4 +1,4 @@
{{- if .Values.rbac.create -}}
{{- if .Values.rbac.create -}}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
@ -13,7 +13,4 @@ rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
{{- end -}}

View File

@ -0,0 +1,18 @@
kind: Service
apiVersion: v1
metadata:
name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}
labels:
app: {{ include "ceph-csi-rbd.name" . }}
chart: {{ include "ceph-csi-rbd.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
app: {{ include "ceph-csi-rbd.name" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
ports:
- name: dummy
port: 12345

View File

@ -1,5 +1,5 @@
kind: Deployment
apiVersion: apps/v1
kind: StatefulSet
apiVersion: apps/v1beta1
metadata:
name: {{ include "ceph-csi-rbd.provisioner.fullname" . }}
labels:
@ -9,6 +9,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
serviceName: {{ include "ceph-csi-rbd.provisioner.fullname" . }}
replicas: {{ .Values.provisioner.replicas }}
selector:
matchLabels:
@ -31,7 +32,6 @@ spec:
args:
- "--csi-address=$(ADDRESS)"
- "--v=5"
- "--leader-election-type=leases"
env:
- name: ADDRESS
value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}"

View File

@ -67,7 +67,7 @@ nodeplugin:
provisioner:
name: provisioner
replicaCount: 3
replicaCount: 1
image:
repository: quay.io/k8scsi/csi-provisioner