From 3a257953daa3e249209bcde2d5a1c84143b65ed1 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Mon, 7 Dec 2020 13:32:05 +0800 Subject: [PATCH] chart: Introduce longhorn share manager Longhorn #2043 Signed-off-by: Shuo Wu --- chart/templates/clusterrole.yaml | 3 ++- chart/templates/crds.yaml | 45 +++++++++++++++++++++++++++++++ chart/templates/daemonset-sa.yaml | 2 ++ chart/values.yaml | 3 +++ 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index f6fafbe..c697617 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -36,7 +36,8 @@ rules: verbs: ["*"] - apiGroups: ["longhorn.io"] resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", - "engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status"] + "engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status", + "sharemanagers", "sharemanagers/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index 9fd23c1..78635e5 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -349,3 +349,48 @@ spec: - name: Age type: date jsonPath: .metadata.creationTimestamp +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: {{- include "longhorn.labels" . | nindent 4 }} + longhorn-manager: ShareManager + annotations: + helm.sh/resource-policy: keep + name: sharemanagers.longhorn.io +spec: + group: longhorn.io + names: + kind: ShareManager + listKind: ShareManagerList + plural: sharemanagers + shortNames: + - lhsm + singular: sharemanager + scope: Namespaced + versions: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + x-kubernetes-preserve-unknown-fields: true + status: + x-kubernetes-preserve-unknown-fields: true + subresources: + status: {} + additionalPrinterColumns: + - name: State + type: string + description: The state of the share manager + jsonPath: .status.state + - name: Node + type: string + description: The node that the share manager is owned by + jsonPath: .status.ownerID + - name: Age + type: date + jsonPath: .metadata.creationTimestamp diff --git a/chart/templates/daemonset-sa.yaml b/chart/templates/daemonset-sa.yaml index e4c4ff1..e407935 100644 --- a/chart/templates/daemonset-sa.yaml +++ b/chart/templates/daemonset-sa.yaml @@ -28,6 +28,8 @@ spec: - "{{ template "registry_url" . }}{{ .Values.image.longhorn.engine.repository }}:{{ .Values.image.longhorn.engine.tag }}" - --instance-manager-image - "{{ template "registry_url" . }}{{ .Values.image.longhorn.instanceManager.repository }}:{{ .Values.image.longhorn.instanceManager.tag }}" + - --share-manager-image + - "{{ template "registry_url" . }}{{ .Values.image.longhorn.shareManager.repository }}:{{ .Values.image.longhorn.shareManager.tag }}" - --manager-image - "{{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}" - --service-account diff --git a/chart/values.yaml b/chart/values.yaml index 90777e5..4c35779 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -19,6 +19,9 @@ image: instanceManager: repository: longhornio/longhorn-instance-manager tag: v1_20200514 + shareManager: + repository: longhornio/longhorn-share-manager + tag: v1_20201204 csi: attacher: repository: longhornio/csi-attacher