From 25b409421faf2367dea7d8d37e4e00b17cb6e1ca Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Tue, 10 Aug 2021 11:46:51 +0800 Subject: [PATCH] chart: Update chart for the enhanced backing image feature Longhorn #2530 Signed-off-by: Shuo Wu --- chart/templates/clusterrole.yaml | 3 +- chart/templates/crds.yaml | 55 +++++++++++++++++++++++++++++-- chart/templates/storageclass.yaml | 2 +- 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index cd5aafb..6ccbbeb 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -37,7 +37,8 @@ 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", "backingimagemanagers", "backingimagemanagers/status"] + "sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status", + "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index aa49047..c871f20 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -392,7 +392,7 @@ spec: listKind: BackingImageList plural: backingimages shortNames: - - lhbi + - lhbi singular: backingimage scope: Namespaced versions: @@ -431,7 +431,7 @@ spec: listKind: BackingImageManagerList plural: backingimagemanagers shortNames: - - lhbim + - lhbim singular: backingimagemanager scope: Namespaced versions: @@ -472,3 +472,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: BackingImageDataSource + name: backingimagedatasources.longhorn.io +spec: + group: longhorn.io + names: + kind: BackingImageDataSource + listKind: BackingImageDataSourceList + plural: backingimagedatasources + shortNames: + - lhbids + singular: backingimagedatasource + 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 current state of the pod used to provisione the backing image file from source + jsonPath: .status.currentState + - name: SourceType + type: string + description: The data source type + jsonPath: .spec.sourceType + - name: Node + type: string + description: The node the backing image file will be prepared on + jsonPath: .spec.nodeID + - name: DiskUUID + type: string + description: The disk the backing image file will be prepared on + jsonPath: .spec.diskUUID + - name: Age + type: date + jsonPath: .metadata.creationTimestamp diff --git a/chart/templates/storageclass.yaml b/chart/templates/storageclass.yaml index dea6aaf..7751bd0 100644 --- a/chart/templates/storageclass.yaml +++ b/chart/templates/storageclass.yaml @@ -20,7 +20,7 @@ data: numberOfReplicas: "{{ .Values.persistence.defaultClassReplicaCount }}" staleReplicaTimeout: "30" fromBackup: "" - baseImage: "" + backingImage: "" {{- if .Values.persistence.recurringJobs.enable }} recurringJobs: '{{ .Values.persistence.recurringJobs.jobList }}' {{- end }}