From a3ceb49b2b44cdb44f03696134ecaaa2fce38b9f Mon Sep 17 00:00:00 2001 From: yangshangpo Date: Mon, 31 Aug 2020 16:25:08 +0800 Subject: [PATCH] fix k8s orchestration --- charts/curve-csi/templates/controllerplugin-rbac.yaml | 7 +++++-- charts/curve-csi/templates/statefulset.yaml | 3 +++ deploy/kubernetes/v1.13/provisioner-rbac.yaml | 7 +++++-- deploy/kubernetes/v1.13/provisioner-sts.yaml | 3 +++ deploy/kubernetes/v1.14+/provisioner-deploy.yaml | 3 +++ deploy/kubernetes/v1.14+/provisioner-rbac.yaml | 7 +++++-- images/Dockerfile | 2 +- 7 files changed, 25 insertions(+), 7 deletions(-) diff --git a/charts/curve-csi/templates/controllerplugin-rbac.yaml b/charts/curve-csi/templates/controllerplugin-rbac.yaml index 9411f95..b76c248 100644 --- a/charts/curve-csi/templates/controllerplugin-rbac.yaml +++ b/charts/curve-csi/templates/controllerplugin-rbac.yaml @@ -35,10 +35,13 @@ rules: verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: [""] resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "update", "delete"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] + verbs: ["get", "list", "watch", "update", "patch"] +- apiGroups: [""] + resources: ["persistentvolumeclaims/status"] + verbs: ["update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"] diff --git a/charts/curve-csi/templates/statefulset.yaml b/charts/curve-csi/templates/statefulset.yaml index 0b798f4..3298bfd 100644 --- a/charts/curve-csi/templates/statefulset.yaml +++ b/charts/curve-csi/templates/statefulset.yaml @@ -41,6 +41,9 @@ spec: - {{ include "curve-csi.name" . }}-controllerplugin topologyKey: kubernetes.io/hostname serviceAccount: curve-csi-provisioner + hostNetwork: true + hostPID: true + dnsPolicy: ClusterFirstWithHostNet containers: - name: csi-provisioner image: "{{ .Values.controllerplugin.provisioner.image.repository }}:{{ .Values.controllerplugin.provisioner.image.tag }}" diff --git a/deploy/kubernetes/v1.13/provisioner-rbac.yaml b/deploy/kubernetes/v1.13/provisioner-rbac.yaml index 2368ba8..1ec0b75 100644 --- a/deploy/kubernetes/v1.13/provisioner-rbac.yaml +++ b/deploy/kubernetes/v1.13/provisioner-rbac.yaml @@ -35,10 +35,13 @@ rules: verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: [""] resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "update", "delete"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] + verbs: ["get", "list", "watch", "update", "patch"] +- apiGroups: [""] + resources: ["persistentvolumeclaims/status"] + verbs: ["update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"] diff --git a/deploy/kubernetes/v1.13/provisioner-sts.yaml b/deploy/kubernetes/v1.13/provisioner-sts.yaml index 7d74750..9c204e2 100644 --- a/deploy/kubernetes/v1.13/provisioner-sts.yaml +++ b/deploy/kubernetes/v1.13/provisioner-sts.yaml @@ -40,6 +40,9 @@ spec: - csi-curve-plugin-provisioner topologyKey: kubernetes.io/hostname serviceAccount: curve-csi-provisioner + hostNetwork: true + hostPID: true + dnsPolicy: ClusterFirstWithHostNet containers: - name: csi-provisioner image: quay.io/k8scsi/csi-provisioner:v1.3.0 diff --git a/deploy/kubernetes/v1.14+/provisioner-deploy.yaml b/deploy/kubernetes/v1.14+/provisioner-deploy.yaml index 95861f2..3c11037 100644 --- a/deploy/kubernetes/v1.14+/provisioner-deploy.yaml +++ b/deploy/kubernetes/v1.14+/provisioner-deploy.yaml @@ -25,6 +25,9 @@ spec: - csi-curve-plugin-provisioner topologyKey: kubernetes.io/hostname serviceAccount: curve-csi-provisioner + hostNetwork: true + hostPID: true + dnsPolicy: ClusterFirstWithHostNet containers: - name: csi-provisioner image: quay.io/k8scsi/csi-provisioner:v1.3.0 diff --git a/deploy/kubernetes/v1.14+/provisioner-rbac.yaml b/deploy/kubernetes/v1.14+/provisioner-rbac.yaml index 2368ba8..1ec0b75 100644 --- a/deploy/kubernetes/v1.14+/provisioner-rbac.yaml +++ b/deploy/kubernetes/v1.14+/provisioner-rbac.yaml @@ -35,10 +35,13 @@ rules: verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: [""] resources: ["persistentvolumes"] - verbs: ["get", "list", "watch", "create", "update", "delete"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] - verbs: ["get", "list", "watch", "update"] + verbs: ["get", "list", "watch", "update", "patch"] +- apiGroups: [""] + resources: ["persistentvolumeclaims/status"] + verbs: ["update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"] diff --git a/images/Dockerfile b/images/Dockerfile index 06627d8..fc305ec 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -14,4 +14,4 @@ ADD curve-csi /bin/curve-csi RUN chmod +x /bin/curve-csi && \ clean-install ca-certificates e2fsprogs mount xfsprogs udev -CMD ["/bin/curve-csi"] +ENTRYPOINT ["/bin/curve-csi"]