From 96b8113488d482862772109161d4233ebe944dc2 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Mon, 5 Apr 2021 19:46:30 +0800 Subject: [PATCH] chart: Update chart for the enhanced backing image feature Longhorn #2295 Signed-off-by: Shuo Wu --- chart/questions.yml | 12 +++++++ chart/templates/clusterrole.yaml | 2 +- chart/templates/crds.yaml | 53 ++++++++++++++++++++++++++++++- chart/templates/daemonset-sa.yaml | 2 ++ chart/values.yaml | 3 ++ 5 files changed, 70 insertions(+), 2 deletions(-) diff --git a/chart/questions.yml b/chart/questions.yml index 311b6de..a0caddc 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -70,6 +70,18 @@ questions: type: string label: Longhorn Share Manager Image Tag group: "Longhorn Images Settings" + - variable: image.longhorn.backingImageManager.repository + default: longhornio/backing-image-manager + description: "Specify Longhorn Backing Image Manager Image Repository" + type: string + label: Longhorn Backing Image Manager Image Repository + group: "Longhorn Images Settings" + - variable: image.longhorn.backingImageManager.tag + default: v1_20210407 + description: "Specify Longhorn Backing Image Manager Image Tag" + type: string + label: Longhorn Backing Image Manager Image Tag + group: "Longhorn Images Settings" - variable: image.csi.attacher.repository default: longhornio/csi-attacher description: "Specify CSI attacher image repository. Leave blank to autodetect." diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index e4cd89f..cd5aafb 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -37,7 +37,7 @@ rules: - apiGroups: ["longhorn.io"] resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings", "engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status", - "sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status"] + "sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status", "backingimagemanagers", "backingimagemanagers/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index 2354245..dd21c35 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -392,7 +392,7 @@ spec: listKind: BackingImageList plural: backingimages shortNames: - - lhbm + - lhbi singular: backingimage scope: Namespaced versions: @@ -417,3 +417,54 @@ spec: - name: Age type: date jsonPath: .metadata.creationTimestamp +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: {{- include "longhorn.labels" . | nindent 4 }} + longhorn-manager: BackingImageManager + name: backingimagemanagers.longhorn.io +spec: + group: longhorn.io + names: + kind: BackingImageManager + listKind: BackingImageManagerList + plural: backingimagemanagers + shortNames: + - lhbim + singular: backingimagemanager + 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: Image + type: string + description: The image the manager pod will use + jsonPath: .spec.image + - name: Node + type: string + description: The node the manager is on + jsonPath: .spec.nodeID + - name: DiskUUID + type: string + description: The disk the manager is responsible for + jsonPath: .spec.diskUUID + - name: DiskPath + type: string + description: The disk path the manager is using + jsonPath: .spec.diskPath + - name: Age + type: date + jsonPath: .metadata.creationTimestamp diff --git a/chart/templates/daemonset-sa.yaml b/chart/templates/daemonset-sa.yaml index 2a4c205..b4f2111 100644 --- a/chart/templates/daemonset-sa.yaml +++ b/chart/templates/daemonset-sa.yaml @@ -34,6 +34,8 @@ spec: - "{{ 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 }}" + - --backing-image-manager-image + - "{{ template "registry_url" . }}{{ .Values.image.longhorn.backingImageManager.repository }}:{{ .Values.image.longhorn.backingImageManager.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 2986ef4..fb380c3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -22,6 +22,9 @@ image: shareManager: repository: longhornio/longhorn-share-manager tag: v1_20210406 + backingImageManager: + repository: longhornio/backing-image-manager + tag: v1_20210407 csi: attacher: repository: longhornio/csi-attacher