From c90c4bf7c9a8346dd77168bb930e9884154c2701 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 29 Apr 2021 09:00:52 +0800 Subject: [PATCH 01/26] Add build status for backing image manager Signed-off-by: Shuo Wu --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 134b8a4..fe0cb37 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ * Manager: [![Build Status](https://drone-publish.longhorn.io/api/badges/longhorn/longhorn-manager/status.svg)](https://drone-publish.longhorn.io/longhorn/longhorn-manager)[![Go Report Card](https://goreportcard.com/badge/github.com/longhorn/longhorn-manager)](https://goreportcard.com/report/github.com/longhorn/longhorn-manager) * Instance Manager: [![Build Status](http://drone-publish.longhorn.io/api/badges/longhorn/longhorn-instance-manager/status.svg)](http://drone-publish.longhorn.io/longhorn/longhorn-instance-manager)[![Go Report Card](https://goreportcard.com/badge/github.com/longhorn/longhorn-instance-manager)](https://goreportcard.com/report/github.com/longhorn/longhorn-instance-manager) * Share Manager: [![Build Status](http://drone-publish.longhorn.io/api/badges/longhorn/longhorn-share-manager/status.svg)](http://drone-publish.longhorn.io/longhorn/longhorn-share-manager)[![Go Report Card](https://goreportcard.com/badge/github.com/longhorn/longhorn-share-manager)](https://goreportcard.com/report/github.com/longhorn/longhorn-share-manager) +* Backing Image Manager: [![Build Status](http://drone-publish.longhorn.io/api/badges/longhorn/backing-image-manager/status.svg)](http://drone-publish.longhorn.io/longhorn/backing-image-manager)[![Go Report Card](https://goreportcard.com/badge/github.com/longhorn/backing-image-manager)](https://goreportcard.com/report/github.com/longhorn/backing-image-manager) * UI: [![Build Status](https://drone-publish.longhorn.io/api/badges/longhorn/longhorn-ui/status.svg)](https://drone-publish.longhorn.io/longhorn/longhorn-ui) * Test: [![Build Status](http://drone-publish.longhorn.io/api/badges/longhorn/longhorn-tests/status.svg)](http://drone-publish.longhorn.io/longhorn/longhorn-tests) From 42a20755f83931d43793c5a8149351b030522185 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 29 Apr 2021 09:05:37 +0800 Subject: [PATCH 02/26] chart: Add backing image manager repo description Signed-off-by: Shuo Wu --- chart/Chart.yaml | 1 + chart/README.md | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 50d23cc..d4f9d59 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -18,6 +18,7 @@ sources: - https://github.com/longhorn/longhorn-engine - https://github.com/longhorn/longhorn-instance-manager - https://github.com/longhorn/longhorn-share-manager +- https://github.com/longhorn/backing-image-manager - https://github.com/longhorn/longhorn-manager - https://github.com/longhorn/longhorn-ui - https://github.com/longhorn/longhorn-tests diff --git a/chart/README.md b/chart/README.md index 5d693de..050f50e 100644 --- a/chart/README.md +++ b/chart/README.md @@ -11,8 +11,9 @@ Longhorn is 100% open source software. Project source code is spread across a nu 1. Longhorn Engine -- Core controller/replica logic https://github.com/longhorn/longhorn-engine 2. Longhorn Instance Manager -- Controller/replica instance lifecycle management https://github.com/longhorn/longhorn-instance-manager 3. Longhorn Share Manager -- NFS provisioner that exposes Longhorn volumes as ReadWriteMany volumes. https://github.com/longhorn/longhorn-share-manager -4. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager -4. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui +4. Backing Image Manager -- Backing image file lifecycle management. https://github.com/longhorn/backing-image-manager +5. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager +6. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui ## Prerequisites From 5c3776b35e0a33f90f15bc748166f40e3310abdd Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Thu, 29 Apr 2021 09:05:37 +0800 Subject: [PATCH 03/26] Fix ability to provide own tls certificate for ingress. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Černý --- chart/templates/tls-secrets.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chart/templates/tls-secrets.yaml b/chart/templates/tls-secrets.yaml index a7ebf13..74c4342 100644 --- a/chart/templates/tls-secrets.yaml +++ b/chart/templates/tls-secrets.yaml @@ -3,9 +3,9 @@ apiVersion: v1 kind: Secret metadata: - name: longhorn - namespace: {{ include "release_namespace" . }} - labels: {{- include "longhorn.labels" . | nindent 4 }} + name: {{ .name }} + namespace: {{ include "release_namespace" $ }} + labels: {{- include "longhorn.labels" $ | nindent 4 }} app: longhorn type: kubernetes.io/tls data: From abe193a72bb7a8f455e58c7645af982aa95d0029 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Wed, 16 Jun 2021 14:03:44 +0800 Subject: [PATCH 04/26] Support replica auto-balance in chart Longhorn#587 Signed-off-by: Chin-Ya Huang --- chart/questions.yml | 20 ++++++++++++++++++++ chart/templates/default-setting.yaml | 1 + chart/values.yaml | 1 + 3 files changed, 22 insertions(+) diff --git a/chart/questions.yml b/chart/questions.yml index 7f292d0..6ab86c4 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -262,6 +262,26 @@ The available modes are: group: "Longhorn Default Settings" type: boolean default: "false" + - variable: defaultSettings.replicaAutoBalance + label: Replica Auto Balance + description: 'Enable this setting automatically rebalances replicas when discovered an available node. +The available global options are: +- **disabled**. This is the default option. No replica auto-balance will be done. +- **least-effort**. This option instructs Longhorn to balance replicas for minimal redundancy. +- **best-effort**. This option instructs Longhorn to balance replicas for even redundancy. +Longhorn also support individual volume setting. The setting can be specified in volume.spec.replicaAutoBalance, this overrules the global setting. +The available volume spec options are: +- **ignored**. This is the default option that instructs Longhorn to inherit from the global setting. +- **disabled**. This option instructs Longhorn no replica auto-balance should be done. +- **least-effort**. This option instructs Longhorn to balance replicas for minimal redundancy. +- **best-effort**. This option instructs Longhorn to balance replicas for even redundancy.' + group: "Longhorn Default Settings" + type: enum + options: + - "disabled" + - "least-effort" + - "best-effort" + default: "disabled" - variable: defaultSettings.storageOverProvisioningPercentage label: Storage Over Provisioning Percentage description: "The over-provisioning percentage defines how much storage can be allocated relative to the hard drive's capacity. By default 200." diff --git a/chart/templates/default-setting.yaml b/chart/templates/default-setting.yaml index e1f0c7a..dba5dec 100644 --- a/chart/templates/default-setting.yaml +++ b/chart/templates/default-setting.yaml @@ -12,6 +12,7 @@ data: create-default-disk-labeled-nodes: {{ .Values.defaultSettings.createDefaultDiskLabeledNodes }} default-data-path: {{ .Values.defaultSettings.defaultDataPath }} replica-soft-anti-affinity: {{ .Values.defaultSettings.replicaSoftAntiAffinity }} + replica-auto-balance: {{ .Values.defaultSettings.replicaAutoBalance }} storage-over-provisioning-percentage: {{ .Values.defaultSettings.storageOverProvisioningPercentage }} storage-minimal-available-percentage: {{ .Values.defaultSettings.storageMinimalAvailablePercentage }} upgrade-checker: {{ .Values.defaultSettings.upgradeChecker }} diff --git a/chart/values.yaml b/chart/values.yaml index 323d272..986c3ad 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -74,6 +74,7 @@ defaultSettings: defaultDataPath: ~ defaultDataLocality: ~ replicaSoftAntiAffinity: ~ + replicaAutoBalance: ~ storageOverProvisioningPercentage: ~ storageMinimalAvailablePercentage: ~ upgradeChecker: ~ From 776ef4afc15049fb90659ab958770b0b0ff022a1 Mon Sep 17 00:00:00 2001 From: JenTing Hsiao Date: Fri, 18 Jun 2021 10:18:02 +0800 Subject: [PATCH 05/26] Add bash to install requirement Signed-off-by: JenTing Hsiao --- chart/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/README.md b/chart/README.md index 050f50e..32a2250 100644 --- a/chart/README.md +++ b/chart/README.md @@ -19,7 +19,7 @@ Longhorn is 100% open source software. Project source code is spread across a nu 1. A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.) 2. Kubernetes v1.16+ -3. Make sure `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster. +3. Make sure `bash`, `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster. 4. Make sure `open-iscsi` has been installed, and the `iscsid` daemon is running on all nodes of the Kubernetes cluster. For GKE, recommended Ubuntu as guest OS image since it contains `open-iscsi` already. ## Installation From 3b64d301eeeffc3a7be1ae33d5ca346a74d816c0 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Thu, 17 Jun 2021 17:55:49 +0800 Subject: [PATCH 06/26] Update chart to allow user to disable-profiler Longhorn#2696 Signed-off-by: Chin-Ya Huang --- chart/templates/daemonset-sa.yaml | 3 +++ chart/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/chart/templates/daemonset-sa.yaml b/chart/templates/daemonset-sa.yaml index 636a4c0..5e09fa9 100644 --- a/chart/templates/daemonset-sa.yaml +++ b/chart/templates/daemonset-sa.yaml @@ -40,6 +40,9 @@ spec: - "{{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}" - --service-account - longhorn-service-account + {{- if .Values.longhornManager.disableProfiler }} + - --disable-profiler + {{- end }} ports: - containerPort: 9500 name: manager diff --git a/chart/values.yaml b/chart/values.yaml index 986c3ad..e5ce497 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -124,6 +124,9 @@ longhornManager: # label-key1: "label-value1" # label-key2: "label-value2" + ## Set to true to disable profiler + disableProfiler: false + longhornDriver: priorityClass: ~ tolerations: [] From 2e885320a002206cf9a118f960c9dc7637e980af Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Fri, 18 Jun 2021 23:20:18 +0800 Subject: [PATCH 07/26] Revert "Update chart to allow user to disable-profiler" This reverts commit 3b64d301eeeffc3a7be1ae33d5ca346a74d816c0. Signed-off-by: Chin-Ya Huang --- chart/templates/daemonset-sa.yaml | 3 --- chart/values.yaml | 3 --- 2 files changed, 6 deletions(-) diff --git a/chart/templates/daemonset-sa.yaml b/chart/templates/daemonset-sa.yaml index 5e09fa9..636a4c0 100644 --- a/chart/templates/daemonset-sa.yaml +++ b/chart/templates/daemonset-sa.yaml @@ -40,9 +40,6 @@ spec: - "{{ template "registry_url" . }}{{ .Values.image.longhorn.manager.repository }}:{{ .Values.image.longhorn.manager.tag }}" - --service-account - longhorn-service-account - {{- if .Values.longhornManager.disableProfiler }} - - --disable-profiler - {{- end }} ports: - containerPort: 9500 name: manager diff --git a/chart/values.yaml b/chart/values.yaml index e5ce497..986c3ad 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -124,9 +124,6 @@ longhornManager: # label-key1: "label-value1" # label-key2: "label-value2" - ## Set to true to disable profiler - disableProfiler: false - longhornDriver: priorityClass: ~ tolerations: [] From 25b409421faf2367dea7d8d37e4e00b17cb6e1ca Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Tue, 10 Aug 2021 11:46:51 +0800 Subject: [PATCH 08/26] 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 }} From 13dc719ebbfb83476073c0c0b917002d5f2fc654 Mon Sep 17 00:00:00 2001 From: David Ko Date: Thu, 12 Aug 2021 01:03:23 +0800 Subject: [PATCH 09/26] Release longhorn v1.2.0-preview1 Signed-off-by: David Ko --- chart/Chart.yaml | 4 +- chart/questions.yml | 10 +- chart/templates/clusterrole.yaml | 3 +- chart/templates/crds.yaml | 149 ++++++++++++ chart/values.yaml | 10 +- deploy/backupstores/nfs-backupstore.yaml | 1 + deploy/longhorn-images.txt | 18 +- deploy/longhorn.yaml | 220 +++++++++++++++++- deploy/release-images.txt | 18 +- examples/crypto/secret-crypto-global.yaml | 9 + .../crypto/storageclass-crypto-global.yaml | 26 +++ ...crypto-per-volume-dedicated-namespace.yaml | 26 +++ .../storageclass-crypto-per-volume.yaml | 26 +++ uninstall/uninstall.yaml | 6 +- 14 files changed, 482 insertions(+), 44 deletions(-) create mode 100644 examples/crypto/secret-crypto-global.yaml create mode 100644 examples/crypto/storageclass-crypto-global.yaml create mode 100644 examples/crypto/storageclass-crypto-per-volume-dedicated-namespace.yaml create mode 100644 examples/crypto/storageclass-crypto-per-volume.yaml diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d4f9d59..81d1cfc 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: longhorn -version: 1.1.1 -appVersion: v1.1.1 +version: 1.2.0-preview1 +appVersion: v1.2.0-preview1 kubeVersion: ">=v1.16.0-r0" description: Longhorn is a distributed block storage system for Kubernetes. keywords: diff --git a/chart/questions.yml b/chart/questions.yml index 6ab86c4..57acd07 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -17,7 +17,7 @@ questions: label: Longhorn Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.manager.tag - default: v1.1.1 + default: v1.2.0-preview1 description: "Specify Longhorn Manager Image Tag" type: string label: Longhorn Manager Image Tag @@ -29,7 +29,7 @@ questions: label: Longhorn Engine Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.engine.tag - default: v1.1.1 + default: v1.2.0-preview1 description: "Specify Longhorn Engine Image Tag" type: string label: Longhorn Engine Image Tag @@ -41,7 +41,7 @@ questions: label: Longhorn UI Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.ui.tag - default: v1.1.1 + default: v1.2.0-preview1 description: "Specify Longhorn UI Image Tag" type: string label: Longhorn UI Image Tag @@ -53,7 +53,7 @@ questions: label: Longhorn Instance Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.instanceManager.tag - default: v1_20201216 + default: v1_20210731 description: "Specify Longhorn Instance Manager Image Tag" type: string label: Longhorn Instance Manager Image Tag @@ -77,7 +77,7 @@ questions: label: Longhorn Backing Image Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.backingImageManager.tag - default: v1_20210422 + default: v2_20210809 description: "Specify Longhorn Backing Image Manager Image Tag" type: string label: Longhorn Backing Image Manager Image Tag diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index 6ccbbeb..fc6c936 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -38,7 +38,8 @@ rules: 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", "backingimagedatasources", "backingimagedatasources/status"] + "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", + "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index c871f20..c1a3314 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -523,3 +523,152 @@ spec: - name: Age type: date jsonPath: .metadata.creationTimestamp +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: BackupTarget + name: backuptargets.longhorn.io +spec: + group: longhorn.io + names: + kind: BackupTarget + listKind: BackupTargetList + plural: backuptargets + shortNames: + - lhbt + singular: backuptarget + 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: URL + type: string + description: The backup target URL + jsonPath: .spec.backupTargetURL + - name: Credential + type: string + description: The backup target credential secret + jsonPath: .spec.credentialSecret + - name: Interval + type: string + description: The backup target poll interval + jsonPath: .spec.pollInterval + - name: Available + type: boolean + description: Indicate whether the backup target is available or not + jsonPath: .status.available + - name: LastSyncedAt + type: string + description: The backup target last synced time + jsonPath: .status.lastSyncedAt +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: BackupVolume + name: backupvolumes.longhorn.io +spec: + group: longhorn.io + names: + kind: BackupVolume + listKind: BackupVolumeList + plural: backupvolumes + shortNames: + - lhbv + singular: backupvolume + 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: CreatedAt + type: string + description: The backup volume creation time + jsonPath: .status.createdAt + - name: LastBackupName + type: string + description: The backup volume last backup name + jsonPath: .status.lastBackupName + - name: LastBackupAt + type: string + description: The backup volume last backup time + jsonPath: .status.lastBackupAt + - name: LastSyncedAt + type: string + description: The backup volume last synced time + jsonPath: .status.lastSyncedAt +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: Backup + name: backups.longhorn.io +spec: + group: longhorn.io + names: + kind: Backup + listKind: BackupList + plural: backups + shortNames: + - lhb + singular: backup + 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: SnapshotName + type: string + description: The snapshot name + jsonPath: .status.snapshotName + - name: SnapshotSize + type: string + description: The snapshot size + jsonPath: .status.size + - name: SnapshotCreatedAt + type: string + description: The snapshot creation time + jsonPath: .status.snapshotCreatedAt + - name: LastSyncedAt + type: string + description: The backup last synced time + jsonPath: .status.lastSyncedAt +--- \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml index 986c3ad..9ccef94 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -9,22 +9,22 @@ image: longhorn: engine: repository: longhornio/longhorn-engine - tag: v1.1.1 + tag: v1.2.0-preview1 manager: repository: longhornio/longhorn-manager - tag: v1.1.1 + tag: v1.2.0-preview1 ui: repository: longhornio/longhorn-ui - tag: v1.1.1 + tag: v1.2.0-preview1 instanceManager: repository: longhornio/longhorn-instance-manager - tag: v1_20201216 + tag: v1_20210731 shareManager: repository: longhornio/longhorn-share-manager tag: v1_20210416 backingImageManager: repository: longhornio/backing-image-manager - tag: v1_20210422 + tag: v2_20210809 csi: attacher: repository: longhornio/csi-attacher diff --git a/deploy/backupstores/nfs-backupstore.yaml b/deploy/backupstores/nfs-backupstore.yaml index af3aa39..e351c50 100644 --- a/deploy/backupstores/nfs-backupstore.yaml +++ b/deploy/backupstores/nfs-backupstore.yaml @@ -35,6 +35,7 @@ spec: command: ["bash", "-c", "grep \"No export entries found\" /var/log/ganesha.log > /dev/null 2>&1 ; [ $? -ne 0 ]"] initialDelaySeconds: 5 periodSeconds: 5 + timeoutSeconds: 4 --- kind: Service apiVersion: v1 diff --git a/deploy/longhorn-images.txt b/deploy/longhorn-images.txt index 8a404d3..d7db982 100644 --- a/deploy/longhorn-images.txt +++ b/deploy/longhorn-images.txt @@ -1,11 +1,11 @@ -longhornio/csi-attacher:v2.2.1-lh1 +longhornio/csi-attacher:v2.2.1-lh2 longhornio/csi-node-driver-registrar:v1.2.0-lh1 -longhornio/csi-provisioner:v1.6.0-lh1 -longhornio/csi-resizer:v0.5.1-lh1 -longhornio/csi-snapshotter:v2.1.1-lh1 -longhornio/backing-image-manager:v1_20210422 -longhornio/longhorn-engine:v1.1.1 -longhornio/longhorn-instance-manager:v1_20201216 -longhornio/longhorn-manager:v1.1.1 +longhornio/csi-provisioner:v1.6.0-lh2 +longhornio/csi-resizer:v0.5.1-lh2 +longhornio/csi-snapshotter:v2.1.1-lh2 +longhornio/backing-image-manager:v2_20210809 +longhornio/longhorn-engine:v1.2.0-preview1 +longhornio/longhorn-instance-manager:v1_20210731 +longhornio/longhorn-manager:v1.2.0-preview1 longhornio/longhorn-share-manager:v1_20210416 -longhornio/longhorn-ui:v1.1.1 +longhornio/longhorn-ui:v1.2.0-preview1 diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index 359beb7..9a6ecf5 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -48,7 +48,8 @@ rules: 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"] + "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", + "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] @@ -545,6 +546,205 @@ spec: type: date jsonPath: .metadata.creationTimestamp --- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + 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 +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: BackupTarget + name: backuptargets.longhorn.io +spec: + group: longhorn.io + names: + kind: BackupTarget + listKind: BackupTargetList + plural: backuptargets + shortNames: + - lhbt + singular: backuptarget + 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: URL + type: string + description: The backup target URL + jsonPath: .spec.backupTargetURL + - name: Credential + type: string + description: The backup target credential secret + jsonPath: .spec.credentialSecret + - name: Interval + type: string + description: The backup target poll interval + jsonPath: .spec.pollInterval + - name: Available + type: boolean + description: Indicate whether the backup target is available or not + jsonPath: .status.available + - name: LastSyncedAt + type: string + description: The backup target last synced time + jsonPath: .status.lastSyncedAt +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: BackupVolume + name: backupvolumes.longhorn.io +spec: + group: longhorn.io + names: + kind: BackupVolume + listKind: BackupVolumeList + plural: backupvolumes + shortNames: + - lhbv + singular: backupvolume + 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: CreatedAt + type: string + description: The backup volume creation time + jsonPath: .status.createdAt + - name: LastBackupName + type: string + description: The backup volume last backup name + jsonPath: .status.lastBackupName + - name: LastBackupAt + type: string + description: The backup volume last backup time + jsonPath: .status.lastBackupAt + - name: LastSyncedAt + type: string + description: The backup volume last synced time + jsonPath: .status.lastSyncedAt +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: Backup + name: backups.longhorn.io +spec: + group: longhorn.io + names: + kind: Backup + listKind: BackupList + plural: backups + shortNames: + - lhb + singular: backup + 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: SnapshotName + type: string + description: The snapshot name + jsonPath: .status.snapshotName + - name: SnapshotSize + type: string + description: The snapshot size + jsonPath: .status.size + - name: SnapshotCreatedAt + type: string + description: The snapshot creation time + jsonPath: .status.snapshotCreatedAt + - name: LastSyncedAt + type: string + description: The backup last synced time + jsonPath: .status.lastSyncedAt +--- apiVersion: v1 kind: ConfigMap metadata: @@ -696,7 +896,7 @@ spec: spec: containers: - name: longhorn-manager - image: longhornio/longhorn-manager:v1.1.1 + image: longhornio/longhorn-manager:v1.2.0-preview1 imagePullPolicy: IfNotPresent securityContext: privileged: true @@ -705,15 +905,15 @@ spec: - -d - daemon - --engine-image - - longhornio/longhorn-engine:v1.1.1 + - longhornio/longhorn-engine:v1.2.0-preview1 - --instance-manager-image - - longhornio/longhorn-instance-manager:v1_20201216 + - longhornio/longhorn-instance-manager:v1_20210731 - --share-manager-image - longhornio/longhorn-share-manager:v1_20210416 - --backing-image-manager-image - - longhornio/backing-image-manager:v1_20210422 + - longhornio/backing-image-manager:v2_20210809 - --manager-image - - longhornio/longhorn-manager:v1.1.1 + - longhornio/longhorn-manager:v1.2.0-preview1 - --service-account - longhorn-service-account ports: @@ -813,7 +1013,7 @@ spec: spec: containers: - name: longhorn-ui - image: longhornio/longhorn-ui:v1.1.1 + image: longhornio/longhorn-ui:v1.2.0-preview1 imagePullPolicy: IfNotPresent securityContext: runAsUser: 0 @@ -869,18 +1069,18 @@ spec: spec: initContainers: - name: wait-longhorn-manager - image: longhornio/longhorn-manager:v1.1.1 + image: longhornio/longhorn-manager:v1.2.0-preview1 command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done'] containers: - name: longhorn-driver-deployer - image: longhornio/longhorn-manager:v1.1.1 + image: longhornio/longhorn-manager:v1.2.0-preview1 imagePullPolicy: IfNotPresent command: - longhorn-manager - -d - deploy-driver - --manager-image - - longhornio/longhorn-manager:v1.1.1 + - longhornio/longhorn-manager:v1.2.0-preview1 - --manager-url - http://longhorn-backend:9500/v1 env: diff --git a/deploy/release-images.txt b/deploy/release-images.txt index 8a404d3..d7db982 100644 --- a/deploy/release-images.txt +++ b/deploy/release-images.txt @@ -1,11 +1,11 @@ -longhornio/csi-attacher:v2.2.1-lh1 +longhornio/csi-attacher:v2.2.1-lh2 longhornio/csi-node-driver-registrar:v1.2.0-lh1 -longhornio/csi-provisioner:v1.6.0-lh1 -longhornio/csi-resizer:v0.5.1-lh1 -longhornio/csi-snapshotter:v2.1.1-lh1 -longhornio/backing-image-manager:v1_20210422 -longhornio/longhorn-engine:v1.1.1 -longhornio/longhorn-instance-manager:v1_20201216 -longhornio/longhorn-manager:v1.1.1 +longhornio/csi-provisioner:v1.6.0-lh2 +longhornio/csi-resizer:v0.5.1-lh2 +longhornio/csi-snapshotter:v2.1.1-lh2 +longhornio/backing-image-manager:v2_20210809 +longhornio/longhorn-engine:v1.2.0-preview1 +longhornio/longhorn-instance-manager:v1_20210731 +longhornio/longhorn-manager:v1.2.0-preview1 longhornio/longhorn-share-manager:v1_20210416 -longhornio/longhorn-ui:v1.1.1 +longhornio/longhorn-ui:v1.2.0-preview1 diff --git a/examples/crypto/secret-crypto-global.yaml b/examples/crypto/secret-crypto-global.yaml new file mode 100644 index 0000000..87cbbbc --- /dev/null +++ b/examples/crypto/secret-crypto-global.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: longhorn-crypto + namespace: longhorn-system +stringData: + CRYPTO_KEY_VALUE: "Simple passphrase" + CRYPTO_KEY_PROVIDER: "secret" # this is optional we currently only support direct keys via secrets \ No newline at end of file diff --git a/examples/crypto/storageclass-crypto-global.yaml b/examples/crypto/storageclass-crypto-global.yaml new file mode 100644 index 0000000..361e4a7 --- /dev/null +++ b/examples/crypto/storageclass-crypto-global.yaml @@ -0,0 +1,26 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: longhorn-crypto-global +provisioner: driver.longhorn.io +allowVolumeExpansion: true +parameters: + numberOfReplicas: "3" + staleReplicaTimeout: "2880" # 48 hours in minutes + fromBackup: "" + encrypted: "true" + # we currently don't need secrets for volume creation + # but it allows for failing the CreateVolume call early + # if the required secret has not been setup yet. + csi.storage.k8s.io/provisioner-secret-name: "longhorn-crypto" + csi.storage.k8s.io/provisioner-secret-namespace: "longhorn-system" + csi.storage.k8s.io/node-publish-secret-name: "longhorn-crypto" + csi.storage.k8s.io/node-publish-secret-namespace: "longhorn-system" + csi.storage.k8s.io/node-stage-secret-name: "longhorn-crypto" + csi.storage.k8s.io/node-stage-secret-namespace: "longhorn-system" + # we only need crypto keys for node operations, I left these as examples + # in case we implement external key vaults in the future + # csi.storage.k8s.io/controller-publish-secret-name: "longhorn-crypto" + # csi.storage.k8s.io/controller-publish-secret-namespace: "longhorn-system" + # csi.storage.k8s.io/controller-expand-secret-name: "longhorn-crypto" + # csi.storage.k8s.io/controller-expand-secret-namespace: "longhorn-system" \ No newline at end of file diff --git a/examples/crypto/storageclass-crypto-per-volume-dedicated-namespace.yaml b/examples/crypto/storageclass-crypto-per-volume-dedicated-namespace.yaml new file mode 100644 index 0000000..38c4790 --- /dev/null +++ b/examples/crypto/storageclass-crypto-per-volume-dedicated-namespace.yaml @@ -0,0 +1,26 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: longhorn-secure-per-volume-ns-longhorn-system +provisioner: driver.longhorn.io +allowVolumeExpansion: true +parameters: + numberOfReplicas: "3" + staleReplicaTimeout: "2880" # 48 hours in minutes + fromBackup: "" + encrypted: "true" + # we currently don't need secrets for volume creation + # but it allows for failing the CreateVolume call early + # if the required secret has not been setup yet. + csi.storage.k8s.io/provisioner-secret-name: ${pvc.name} + csi.storage.k8s.io/provisioner-secret-namespace: "longhorn-system" + csi.storage.k8s.io/node-publish-secret-name: ${pvc.name} + csi.storage.k8s.io/node-publish-secret-namespace: "longhorn-system" + csi.storage.k8s.io/node-stage-secret-name: ${pvc.name} + csi.storage.k8s.io/node-stage-secret-namespace: "longhorn-system" + # we only need crypto keys for node operations, I left these as examples + # in case we implement external key vaults in the future + # csi.storage.k8s.io/controller-publish-secret-name: ${pvc.name} + # csi.storage.k8s.io/controller-publish-secret-namespace: "longhorn-system" + # csi.storage.k8s.io/controller-expand-secret-name: ${pvc.name} + # csi.storage.k8s.io/controller-expand-secret-namespace: "longhorn-system" \ No newline at end of file diff --git a/examples/crypto/storageclass-crypto-per-volume.yaml b/examples/crypto/storageclass-crypto-per-volume.yaml new file mode 100644 index 0000000..0bf9a85 --- /dev/null +++ b/examples/crypto/storageclass-crypto-per-volume.yaml @@ -0,0 +1,26 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: longhorn-crypto-per-volume +provisioner: driver.longhorn.io +allowVolumeExpansion: true +parameters: + numberOfReplicas: "3" + staleReplicaTimeout: "2880" # 48 hours in minutes + fromBackup: "" + encrypted: "true" + # we currently don't need secrets for volume creation + # but it allows for failing the CreateVolume call early + # if the required secret has not been setup yet. + csi.storage.k8s.io/provisioner-secret-name: ${pvc.name} + csi.storage.k8s.io/provisioner-secret-namespace: ${pvc.namespace} + csi.storage.k8s.io/node-publish-secret-name: ${pvc.name} + csi.storage.k8s.io/node-publish-secret-namespace: ${pvc.namespace} + csi.storage.k8s.io/node-stage-secret-name: ${pvc.name} + csi.storage.k8s.io/node-stage-secret-namespace: ${pvc.namespace} + # we only need crypto keys for node operations, I left these as examples + # in case we implement external key vaults in the future + # csi.storage.k8s.io/controller-publish-secret-name: ${pvc.name} + # csi.storage.k8s.io/controller-publish-secret-namespace: ${pvc.namespace} + # csi.storage.k8s.io/controller-expand-secret-name: ${pvc.name} + # csi.storage.k8s.io/controller-expand-secret-namespace: ${pvc.namespace} \ No newline at end of file diff --git a/uninstall/uninstall.yaml b/uninstall/uninstall.yaml index d92ee58..12e60f6 100644 --- a/uninstall/uninstall.yaml +++ b/uninstall/uninstall.yaml @@ -64,7 +64,7 @@ rules: resources: ["csidrivers", "storageclasses"] verbs: ["*"] - apiGroups: ["longhorn.io"] - resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers", "sharemanagers", "backingimages", "backingimagemanagers"] + resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers", "sharemanagers", "backingimages", "backingimagemanagers", "backingimagedatasources", "backuptargets", "backupvolumes", "backups"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] @@ -101,7 +101,7 @@ spec: spec: containers: - name: longhorn-uninstall - image: longhornio/longhorn-manager:v1.1.1 + image: longhornio/longhorn-manager:v1.2.0-preview1 imagePullPolicy: Always securityContext: privileged: true @@ -124,4 +124,4 @@ spec: # effect: "NoSchedule" # nodeSelector: # label-key1: "label-value1" -# label-key2: "label-value2" \ No newline at end of file +# label-key2: "label-value2" From 8dca77621d202836f3b2191fcbb75a56763e0f34 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Tue, 17 Aug 2021 11:11:42 +0800 Subject: [PATCH 10/26] Update chart for label-driven recurring job Longhorn-467 Signed-off-by: Chin-Ya Huang --- chart/questions.yml | 12 ++--- chart/templates/clusterrole.yaml | 3 +- chart/templates/crds.yaml | 82 ++++++++++++++++++++++++++++++- chart/templates/storageclass.yaml | 4 +- chart/values.yaml | 2 +- 5 files changed, 92 insertions(+), 11 deletions(-) diff --git a/chart/questions.yml b/chart/questions.yml index 57acd07..9490f87 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -504,17 +504,17 @@ Warning: This option works only when there is a failed replica in the volume. An min: 1 max: 10 default: 3 -- variable: persistence.recurringJobs.enable - description: "Enable recurring job for Longhorn StorageClass" +- variable: persistence.recurringJobSelector.enable + description: "Enable recurring job selector for Longhorn StorageClass" group: "Longhorn Storage Class Settings" - label: Enable Storage Class Recurring Job + label: Enable Storage Class Recurring Job Selector type: boolean default: false show_subquestion_if: true subquestions: - - variable: persistence.recurringJobs.jobList - description: 'Recurring job list for Longhorn StorageClass. Please be careful of quotes of input. e.g., [{"name":"backup", "task":"backup", "cron":"*/2 * * * *", "retain":1,"labels": {"interval":"2m"}}]' - label: Storage Class Recurring Job List + - variable: persistence.recurringJobSelector.jobList + description: 'Recurring job selector list for Longhorn StorageClass. Please be careful of quotes of input. e.g., [{"name":"backup", "isGroup":true}]' + label: Storage Class Recurring Job Selector List group: "Longhorn Storage Class Settings" type: string default: diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index fc6c936..f42ed41 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -39,7 +39,8 @@ rules: "engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status", "sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status", "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", - "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status"] + "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status", + "recurringjobs", "recurringjobs/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index c1a3314..99f55f8 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -671,4 +671,84 @@ spec: type: string description: The backup last synced time jsonPath: .status.lastSyncedAt ---- \ No newline at end of file +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: RecurringJob + name: recurringjobs.longhorn.io +spec: + group: longhorn.io + names: + kind: RecurringJob + listKind: RecurringJobList + plural: recurringjobs + shortNames: + - lhrj + singular: recurringjob + scope: Namespaced + versions: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + metadata: + type: object + properties: + name: + type: string + spec: + type: object + properties: + groups: + type: array + items: + type: string + task: + type: string + pattern: "^snapshot|backup$" + cron: + type: string + retain: + type: integer + concurrency: + type: integer + labels: + x-kubernetes-preserve-unknown-fields: true + status: + x-kubernetes-preserve-unknown-fields: true + subresources: + status: {} + additionalPrinterColumns: + - name: Groups + type: string + description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume. + jsonPath: .spec.groups + - name: Task + type: string + description: Should be one of "backup" or "snapshot". + jsonPath: .spec.task + - name: Cron + type: string + description: The cron expression represents recurring job scheduling. + jsonPath: .spec.cron + - name: Retain + type: integer + description: The number of snapshots/backups to keep for the volume. + jsonPath: .spec.retain + - name: Concurrency + type: integer + description: The concurrent job to run by each cron job. + jsonPath: .spec.concurrency + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Labels + type: string + description: Specify the labels + jsonPath: .spec.labels +--- diff --git a/chart/templates/storageclass.yaml b/chart/templates/storageclass.yaml index 7751bd0..2a18147 100644 --- a/chart/templates/storageclass.yaml +++ b/chart/templates/storageclass.yaml @@ -21,6 +21,6 @@ data: staleReplicaTimeout: "30" fromBackup: "" backingImage: "" - {{- if .Values.persistence.recurringJobs.enable }} - recurringJobs: '{{ .Values.persistence.recurringJobs.jobList }}' + {{- if .Values.persistence.recurringJobSelector.enable }} + recurringJobSelector: '{{ .Values.persistence.recurringJobSelector.jobList }}' {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 9ccef94..127caf6 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -55,7 +55,7 @@ persistence: defaultClass: true defaultClassReplicaCount: 3 reclaimPolicy: Delete - recurringJobs: + recurringJobSelector: enable: false jobList: [] From 64d53d53eeaa69fafeb2ec51efc9de4ed3d5b62f Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Tue, 17 Aug 2021 12:29:54 +0800 Subject: [PATCH 11/26] Update YAML for label-driven recurring job Longhorn-467 Signed-off-by: Chin-Ya Huang --- deploy/longhorn.yaml | 88 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 4 deletions(-) diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index 9a6ecf5..4e7d18c 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -49,7 +49,8 @@ rules: "engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status", "sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status", "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", - "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status"] + "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status", + "recurringjobs"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] @@ -745,6 +746,86 @@ spec: description: The backup last synced time jsonPath: .status.lastSyncedAt --- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + longhorn-manager: RecurringJob + name: recurringjobs.longhorn.io +spec: + group: longhorn.io + names: + kind: RecurringJob + listKind: RecurringJobList + plural: recurringjobs + shortNames: + - lhrj + singular: recurringjob + scope: Namespaced + versions: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + metadata: + type: object + properties: + name: + type: string + spec: + type: object + properties: + groups: + type: array + items: + type: string + task: + type: string + pattern: "^snapshot|backup$" + cron: + type: string + retain: + type: integer + concurrency: + type: integer + labels: + x-kubernetes-preserve-unknown-fields: true + status: + x-kubernetes-preserve-unknown-fields: true + subresources: + status: {} + additionalPrinterColumns: + - name: Groups + type: string + description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume. + jsonPath: .spec.groups + - name: Task + type: string + description: Should be one of "backup" or "snapshot". + jsonPath: .spec.task + - name: Cron + type: string + description: The cron expression represents recurring job scheduling. + jsonPath: .spec.cron + - name: Retain + type: integer + description: The number of snapshots/backups to keep for the volume. + jsonPath: .spec.retain + - name: Concurrency + type: integer + description: The concurrent job to run by each cron job. + jsonPath: .spec.concurrency + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Labels + type: string + description: Specify the labels + jsonPath: .spec.labels +--- apiVersion: v1 kind: ConfigMap metadata: @@ -874,9 +955,8 @@ data: # backingImageURL: "https://backing-image-example.s3-region.amazonaws.com/test-backing-image" # diskSelector: "ssd,fast" # nodeSelector: "storage,fast" - # recurringJobs: '[{"name":"snap", "task":"snapshot", "cron":"*/1 * * * *", "retain":1}, - # {"name":"backup", "task":"backup", "cron":"*/2 * * * *", "retain":1, - # "labels": {"interval":"2m"}}]' + # recurringJobSelector: '[{"name":"snap-group", "isGroup":true}, + # {"name":"backup", "isGroup":false}]' --- apiVersion: apps/v1 kind: DaemonSet From 657ccb6ef536eb04b92382d7709f0af8daacc6a1 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Tue, 17 Aug 2021 12:31:53 +0800 Subject: [PATCH 12/26] Add recurring job to deploy and uninstall Longhorn-467 Signed-off-by: Chin-Ya Huang --- deploy/longhorn.yaml | 2 +- uninstall/uninstall.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index 4e7d18c..d50acdb 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -50,7 +50,7 @@ rules: "sharemanagers", "sharemanagers/status", "backingimages", "backingimages/status", "backingimagemanagers", "backingimagemanagers/status", "backingimagedatasources", "backingimagedatasources/status", "backuptargets", "backuptargets/status", "backupvolumes", "backupvolumes/status", "backups", "backups/status", - "recurringjobs"] + "recurringjobs", "recurringjobs/status"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] diff --git a/uninstall/uninstall.yaml b/uninstall/uninstall.yaml index 12e60f6..e74e5e6 100644 --- a/uninstall/uninstall.yaml +++ b/uninstall/uninstall.yaml @@ -64,7 +64,7 @@ rules: resources: ["csidrivers", "storageclasses"] verbs: ["*"] - apiGroups: ["longhorn.io"] - resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers", "sharemanagers", "backingimages", "backingimagemanagers", "backingimagedatasources", "backuptargets", "backupvolumes", "backups"] + resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers", "sharemanagers", "backingimages", "backingimagemanagers", "backingimagedatasources", "backuptargets", "backupvolumes", "backups", "recurringjobs"] verbs: ["*"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] From 87a610d37f3206f99083fac90ea49ec507ab4c21 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Fri, 20 Aug 2021 11:04:41 +0800 Subject: [PATCH 13/26] Update example for recurringJobSelector Longhorn-467 Signed-off-by: Chin-Ya Huang --- examples/storageclass.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/storageclass.yaml b/examples/storageclass.yaml index 96c06d9..b11d2e8 100644 --- a/examples/storageclass.yaml +++ b/examples/storageclass.yaml @@ -21,6 +21,5 @@ data: # backingImageURL: "https://backing-image-example.s3-region.amazonaws.com/test-backing-image" # diskSelector: "ssd,fast" # nodeSelector: "storage,fast" - # recurringJobs: '[{"name":"snap", "task":"snapshot", "cron":"*/1 * * * *", "retain":1}, - # {"name":"backup", "task":"backup", "cron":"*/2 * * * *", "retain":1, - # "labels": {"interval":"2m"}}]' + # recurringJobSelector: '[{"name":"snap-group", "isGroup":true}, + # {"name":"backup", "isGroup":false}]' From 46e2cb63ae1c02e24df0e4fe71ddedd66fa5d955 Mon Sep 17 00:00:00 2001 From: David Ko Date: Sat, 21 Aug 2021 00:58:12 +0800 Subject: [PATCH 14/26] Update to v1.2.0-rc1 Signed-off-by: David Ko --- chart/Chart.yaml | 4 ++-- chart/questions.yml | 6 +++--- chart/values.yaml | 10 ++++----- deploy/longhorn-images.txt | 10 ++++----- deploy/longhorn.yaml | 24 ++++++++++++--------- deploy/release-images.txt | 10 ++++----- examples/storageclass.yaml | 43 +++++++++++++++++--------------------- uninstall/uninstall.yaml | 2 +- 8 files changed, 54 insertions(+), 55 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 81d1cfc..e49dabe 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: longhorn -version: 1.2.0-preview1 -appVersion: v1.2.0-preview1 +version: 1.2.0-rc1 +appVersion: v1.2.0-rc1 kubeVersion: ">=v1.16.0-r0" description: Longhorn is a distributed block storage system for Kubernetes. keywords: diff --git a/chart/questions.yml b/chart/questions.yml index 9490f87..b180dda 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -17,7 +17,7 @@ questions: label: Longhorn Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.manager.tag - default: v1.2.0-preview1 + default: v1.2.0-rc1 description: "Specify Longhorn Manager Image Tag" type: string label: Longhorn Manager Image Tag @@ -29,7 +29,7 @@ questions: label: Longhorn Engine Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.engine.tag - default: v1.2.0-preview1 + default: v1.2.0-rc1 description: "Specify Longhorn Engine Image Tag" type: string label: Longhorn Engine Image Tag @@ -41,7 +41,7 @@ questions: label: Longhorn UI Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.ui.tag - default: v1.2.0-preview1 + default: v1.2.0-rc1 description: "Specify Longhorn UI Image Tag" type: string label: Longhorn UI Image Tag diff --git a/chart/values.yaml b/chart/values.yaml index 127caf6..00622ae 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -9,22 +9,22 @@ image: longhorn: engine: repository: longhornio/longhorn-engine - tag: v1.2.0-preview1 + tag: v1.2.0-rc1 manager: repository: longhornio/longhorn-manager - tag: v1.2.0-preview1 + tag: v1.2.0-rc1 ui: repository: longhornio/longhorn-ui - tag: v1.2.0-preview1 + tag: v1.2.0-rc1 instanceManager: repository: longhornio/longhorn-instance-manager tag: v1_20210731 shareManager: repository: longhornio/longhorn-share-manager - tag: v1_20210416 + tag: v1_20210820 backingImageManager: repository: longhornio/backing-image-manager - tag: v2_20210809 + tag: v2_20210820 csi: attacher: repository: longhornio/csi-attacher diff --git a/deploy/longhorn-images.txt b/deploy/longhorn-images.txt index d7db982..5af69f3 100644 --- a/deploy/longhorn-images.txt +++ b/deploy/longhorn-images.txt @@ -3,9 +3,9 @@ longhornio/csi-node-driver-registrar:v1.2.0-lh1 longhornio/csi-provisioner:v1.6.0-lh2 longhornio/csi-resizer:v0.5.1-lh2 longhornio/csi-snapshotter:v2.1.1-lh2 -longhornio/backing-image-manager:v2_20210809 -longhornio/longhorn-engine:v1.2.0-preview1 +longhornio/backing-image-manager:v2_20210820 +longhornio/longhorn-engine:v1.2.0-rc1 longhornio/longhorn-instance-manager:v1_20210731 -longhornio/longhorn-manager:v1.2.0-preview1 -longhornio/longhorn-share-manager:v1_20210416 -longhornio/longhorn-ui:v1.2.0-preview1 +longhornio/longhorn-manager:v1.2.0-rc1 +longhornio/longhorn-share-manager:v1_20210820 +longhornio/longhorn-ui:v1.2.0-rc1 diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index d50acdb..ce033d7 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -745,6 +745,7 @@ spec: type: string description: The backup last synced time jsonPath: .status.lastSyncedAt + --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -826,6 +827,7 @@ spec: description: Specify the labels jsonPath: .spec.labels --- +--- apiVersion: v1 kind: ConfigMap metadata: @@ -952,7 +954,9 @@ data: staleReplicaTimeout: "2880" fromBackup: "" # backingImage: "bi-test" - # backingImageURL: "https://backing-image-example.s3-region.amazonaws.com/test-backing-image" + # backingImageDataSourceType: "download" + # backingImageDataSourceParameters: '{"url": "https://backing-image-example.s3-region.amazonaws.com/test-backing-image"}' + # backingImageChecksum: "SHA512 checksum of the backing image" # diskSelector: "ssd,fast" # nodeSelector: "storage,fast" # recurringJobSelector: '[{"name":"snap-group", "isGroup":true}, @@ -976,7 +980,7 @@ spec: spec: containers: - name: longhorn-manager - image: longhornio/longhorn-manager:v1.2.0-preview1 + image: longhornio/longhorn-manager:v1.2.0-rc1 imagePullPolicy: IfNotPresent securityContext: privileged: true @@ -985,15 +989,15 @@ spec: - -d - daemon - --engine-image - - longhornio/longhorn-engine:v1.2.0-preview1 + - longhornio/longhorn-engine:v1.2.0-rc1 - --instance-manager-image - longhornio/longhorn-instance-manager:v1_20210731 - --share-manager-image - - longhornio/longhorn-share-manager:v1_20210416 + - longhornio/longhorn-share-manager:v1_20210820 - --backing-image-manager-image - - longhornio/backing-image-manager:v2_20210809 + - longhornio/backing-image-manager:v2_20210820 - --manager-image - - longhornio/longhorn-manager:v1.2.0-preview1 + - longhornio/longhorn-manager:v1.2.0-rc1 - --service-account - longhorn-service-account ports: @@ -1093,7 +1097,7 @@ spec: spec: containers: - name: longhorn-ui - image: longhornio/longhorn-ui:v1.2.0-preview1 + image: longhornio/longhorn-ui:v1.2.0-rc1 imagePullPolicy: IfNotPresent securityContext: runAsUser: 0 @@ -1149,18 +1153,18 @@ spec: spec: initContainers: - name: wait-longhorn-manager - image: longhornio/longhorn-manager:v1.2.0-preview1 + image: longhornio/longhorn-manager:v1.2.0-rc1 command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done'] containers: - name: longhorn-driver-deployer - image: longhornio/longhorn-manager:v1.2.0-preview1 + image: longhornio/longhorn-manager:v1.2.0-rc1 imagePullPolicy: IfNotPresent command: - longhorn-manager - -d - deploy-driver - --manager-image - - longhornio/longhorn-manager:v1.2.0-preview1 + - longhornio/longhorn-manager:v1.2.0-rc1 - --manager-url - http://longhorn-backend:9500/v1 env: diff --git a/deploy/release-images.txt b/deploy/release-images.txt index d7db982..5af69f3 100644 --- a/deploy/release-images.txt +++ b/deploy/release-images.txt @@ -3,9 +3,9 @@ longhornio/csi-node-driver-registrar:v1.2.0-lh1 longhornio/csi-provisioner:v1.6.0-lh2 longhornio/csi-resizer:v0.5.1-lh2 longhornio/csi-snapshotter:v2.1.1-lh2 -longhornio/backing-image-manager:v2_20210809 -longhornio/longhorn-engine:v1.2.0-preview1 +longhornio/backing-image-manager:v2_20210820 +longhornio/longhorn-engine:v1.2.0-rc1 longhornio/longhorn-instance-manager:v1_20210731 -longhornio/longhorn-manager:v1.2.0-preview1 -longhornio/longhorn-share-manager:v1_20210416 -longhornio/longhorn-ui:v1.2.0-preview1 +longhornio/longhorn-manager:v1.2.0-rc1 +longhornio/longhorn-share-manager:v1_20210820 +longhornio/longhorn-ui:v1.2.0-rc1 diff --git a/examples/storageclass.yaml b/examples/storageclass.yaml index b11d2e8..0a5e3bb 100644 --- a/examples/storageclass.yaml +++ b/examples/storageclass.yaml @@ -1,25 +1,20 @@ -apiVersion: v1 -kind: ConfigMap +kind: StorageClass +apiVersion: storage.k8s.io/v1 metadata: - name: longhorn-storageclass - namespace: longhorn-system -data: - storageclass.yaml: | - kind: StorageClass - apiVersion: storage.k8s.io/v1 - metadata: - name: longhorn - provisioner: driver.longhorn.io - allowVolumeExpansion: true - reclaimPolicy: Delete - volumeBindingMode: Immediate - parameters: - numberOfReplicas: "2" - staleReplicaTimeout: "2880" - fromBackup: "" - # backingImage: "bi-test" - # backingImageURL: "https://backing-image-example.s3-region.amazonaws.com/test-backing-image" - # diskSelector: "ssd,fast" - # nodeSelector: "storage,fast" - # recurringJobSelector: '[{"name":"snap-group", "isGroup":true}, - # {"name":"backup", "isGroup":false}]' + name: longhorn-test +provisioner: driver.longhorn.io +allowVolumeExpansion: true +reclaimPolicy: Delete +volumeBindingMode: Immediate +parameters: + numberOfReplicas: "2" + staleReplicaTimeout: "2880" + fromBackup: "" +# backingImage: "bi-test" +# backingImageDataSourceType: "download" +# backingImageDataSourceParameters: '{"url": "https://backing-image-example.s3-region.amazonaws.com/test-backing-image"}' +# backingImageChecksum: "SHA512 checksum of the backing image" +# diskSelector: "ssd,fast" +# nodeSelector: "storage,fast" +# recurringJobSelector: '[{"name":"snap-group", "isGroup":true}, +# {"name":"backup", "isGroup":false}]' diff --git a/uninstall/uninstall.yaml b/uninstall/uninstall.yaml index e74e5e6..a33db9f 100644 --- a/uninstall/uninstall.yaml +++ b/uninstall/uninstall.yaml @@ -101,7 +101,7 @@ spec: spec: containers: - name: longhorn-uninstall - image: longhornio/longhorn-manager:v1.2.0-preview1 + image: longhornio/longhorn-manager:v1.2.0-rc1 imagePullPolicy: Always securityContext: privileged: true From 6b6bbc946ebf4e1c11ca24191401741ff348f9fe Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Mon, 23 Aug 2021 13:14:24 +0800 Subject: [PATCH 15/26] chart: Explicit explain how Longhorn identifies a node zone in questions.yml Signed-off-by: Shuo Wu --- chart/questions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/questions.yml b/chart/questions.yml index b180dda..209ac75 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -346,7 +346,7 @@ If disabled, Longhorn will not delete the workload pod that is managed by a cont default: "true" - variable: defaultSettings.replicaZoneSoftAntiAffinity label: Replica Zone Level Soft Anti-Affinity - description: "Allow scheduling new Replicas of Volume to the Nodes in the same Zone as existing healthy Replicas. Nodes don't belong to any Zone will be treated as in the same Zone. By default true." + description: "Allow scheduling new Replicas of Volume to the Nodes in the same Zone as existing healthy Replicas. Nodes don't belong to any Zone will be treated as in the same Zone. Notice that Longhorn relies on label `topology.kubernetes.io/zone=` in the Kubernetes node object to identify the zone. By default true." group: "Longhorn Default Settings" type: boolean default: "true" From 00848b409a14193ac8ad01552a8852f1aa44ac9e Mon Sep 17 00:00:00 2001 From: David Ko Date: Tue, 24 Aug 2021 01:21:13 +0800 Subject: [PATCH 16/26] Sync chart files from 1.1.2 Signed-off-by: David Ko --- chart/questions.yml | 22 ++++++---------------- chart/templates/default-setting.yaml | 2 -- chart/values.yaml | 10 ++++------ 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/chart/questions.yml b/chart/questions.yml index 209ac75..0a1f230 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -65,7 +65,7 @@ questions: label: Longhorn Share Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.shareManager.tag - default: v1_20210416 + default: v1_20210820 description: "Specify Longhorn Share Manager Image Tag" type: string label: Longhorn Share Manager Image Tag @@ -77,7 +77,7 @@ questions: label: Longhorn Backing Image Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.backingImageManager.tag - default: v2_20210809 + default: v2_20210820 description: "Specify Longhorn Backing Image Manager Image Tag" type: string label: Longhorn Backing Image Manager Image Tag @@ -89,7 +89,7 @@ questions: label: Longhorn CSI Attacher Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.attacher.tag - default: v2.2.1-lh1 + default: v2.2.1-lh2 description: "Specify CSI attacher image tag. Leave blank to autodetect." type: string label: Longhorn CSI Attacher Image Tag @@ -101,7 +101,7 @@ questions: label: Longhorn CSI Provisioner Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.provisioner.tag - default: v1.6.0-lh1 + default: v1.6.0-lh2 description: "Specify CSI provisioner image tag. Leave blank to autodetect." type: string label: Longhorn CSI Provisioner Image Tag @@ -125,7 +125,7 @@ questions: label: Longhorn CSI Driver Resizer Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.resizer.tag - default: v0.5.1-lh1 + default: v0.5.1-lh2 description: "Specify CSI Driver Resizer image tag. Leave blank to autodetect." type: string label: Longhorn CSI Driver Resizer Image Tag @@ -137,7 +137,7 @@ questions: label: Longhorn CSI Driver Snapshotter Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.snapshotter.tag - default: v2.1.1-lh1 + default: v2.1.1-lh2 description: "Specify CSI Driver Snapshotter image tag. Leave blank to autodetect." type: string label: Longhorn CSI Driver Snapshotter Image Tag @@ -350,16 +350,6 @@ If disabled, Longhorn will not delete the workload pod that is managed by a cont group: "Longhorn Default Settings" type: boolean default: "true" - - variable: defaultSettings.volumeAttachmentRecoveryPolicy - label: Volume Attachment Recovery Policy - description: "Defines the Longhorn action when a Volume is stuck with a Deployment Pod on a failed node. `wait` leads to the deletion of the volume attachment as soon as the pods deletion time has passed. `never` is the default Kubernetes behavior of never deleting volume attachments on terminating pods. `immediate` leads to the deletion of the volume attachment as soon as all workload pods are pending. By default wait." - group: "Longhorn Default Settings" - type: enum - options: - - "wait" - - "never" - - "immediate" - default: "wait" - variable: defaultSettings.nodeDownPodDeletionPolicy label: Pod Deletion Policy When Node is Down description: "Defines the Longhorn action when a Volume is stuck with a StatefulSet/Deployment Pod on a node that is down. diff --git a/chart/templates/default-setting.yaml b/chart/templates/default-setting.yaml index dba5dec..2b8ec21 100644 --- a/chart/templates/default-setting.yaml +++ b/chart/templates/default-setting.yaml @@ -18,7 +18,6 @@ data: upgrade-checker: {{ .Values.defaultSettings.upgradeChecker }} default-replica-count: {{ .Values.defaultSettings.defaultReplicaCount }} default-data-locality: {{ .Values.defaultSettings.defaultDataLocality }} - guaranteed-engine-cpu: {{ .Values.defaultSettings.guaranteedEngineCPU }} default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass }} backupstore-poll-interval: {{ .Values.defaultSettings.backupstorePollInterval }} taint-toleration: {{ .Values.defaultSettings.taintToleration }} @@ -28,7 +27,6 @@ data: auto-delete-pod-when-volume-detached-unexpectedly: {{ .Values.defaultSettings.autoDeletePodWhenVolumeDetachedUnexpectedly }} disable-scheduling-on-cordoned-node: {{ .Values.defaultSettings.disableSchedulingOnCordonedNode }} replica-zone-soft-anti-affinity: {{ .Values.defaultSettings.replicaZoneSoftAntiAffinity }} - volume-attachment-recovery-policy: {{ .Values.defaultSettings.volumeAttachmentRecoveryPolicy }} node-down-pod-deletion-policy: {{ .Values.defaultSettings.nodeDownPodDeletionPolicy }} allow-node-drain-with-last-healthy-replica: {{ .Values.defaultSettings.allowNodeDrainWithLastHealthyReplica }} mkfs-ext4-parameters: {{ .Values.defaultSettings.mkfsExt4Parameters }} diff --git a/chart/values.yaml b/chart/values.yaml index 00622ae..aaaafd1 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -28,19 +28,19 @@ image: csi: attacher: repository: longhornio/csi-attacher - tag: v2.2.1-lh1 + tag: v2.2.1-lh2 provisioner: repository: longhornio/csi-provisioner - tag: v1.6.0-lh1 + tag: v1.6.0-lh2 nodeDriverRegistrar: repository: longhornio/csi-node-driver-registrar tag: v1.2.0-lh1 resizer: repository: longhornio/csi-resizer - tag: v0.5.1-lh1 + tag: v0.5.1-lh2 snapshotter: repository: longhornio/csi-snapshotter - tag: v2.1.1-lh1 + tag: v2.1.1-lh2 pullPolicy: IfNotPresent service: @@ -79,7 +79,6 @@ defaultSettings: storageMinimalAvailablePercentage: ~ upgradeChecker: ~ defaultReplicaCount: ~ - guaranteedEngineCPU: ~ defaultLonghornStaticStorageClass: ~ backupstorePollInterval: ~ taintToleration: ~ @@ -89,7 +88,6 @@ defaultSettings: autoDeletePodWhenVolumeDetachedUnexpectedly: ~ disableSchedulingOnCordonedNode: ~ replicaZoneSoftAntiAffinity: ~ - volumeAttachmentRecoveryPolicy: ~ nodeDownPodDeletionPolicy: ~ allowNodeDrainWithLastHealthyReplica: ~ mkfsExt4Parameters: ~ From ab502bab7907a48b15f537c36787f864cc9bb8a2 Mon Sep 17 00:00:00 2001 From: phanle1010 Date: Tue, 24 Aug 2021 14:17:21 -0700 Subject: [PATCH 17/26] Bump CSI external components version Longhorn 2757 Signed-off-by: phanle1010 --- chart/templates/clusterrole.yaml | 2 +- chart/values.yaml | 20 ++++++++++---------- deploy/longhorn-images.txt | 10 +++++----- deploy/release-images.txt | 11 ----------- 4 files changed, 16 insertions(+), 27 deletions(-) delete mode 100644 deploy/release-images.txt diff --git a/chart/templates/clusterrole.yaml b/chart/templates/clusterrole.yaml index f42ed41..48ebf54 100644 --- a/chart/templates/clusterrole.yaml +++ b/chart/templates/clusterrole.yaml @@ -29,7 +29,7 @@ rules: resources: ["priorityclasses"] verbs: ["watch", "list"] - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses", "volumeattachments", "csinodes", "csidrivers"] + resources: ["storageclasses", "volumeattachments", "volumeattachments/status", "csinodes", "csidrivers"] verbs: ["*"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotclasses", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotcontents/status"] diff --git a/chart/values.yaml b/chart/values.yaml index aaaafd1..026f672 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -27,20 +27,20 @@ image: tag: v2_20210820 csi: attacher: - repository: longhornio/csi-attacher - tag: v2.2.1-lh2 + repository: k8s.gcr.io/sig-storage/csi-attacher + tag: v3.2.1 provisioner: - repository: longhornio/csi-provisioner - tag: v1.6.0-lh2 + repository: k8s.gcr.io/sig-storage/csi-provisioner + tag: v2.1.2 nodeDriverRegistrar: - repository: longhornio/csi-node-driver-registrar - tag: v1.2.0-lh1 + repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar + tag: v2.3.0 resizer: - repository: longhornio/csi-resizer - tag: v0.5.1-lh2 + repository: k8s.gcr.io/sig-storage/csi-resizer + tag: v1.2.0 snapshotter: - repository: longhornio/csi-snapshotter - tag: v2.1.1-lh2 + repository: k8s.gcr.io/sig-storage/csi-snapshotter + tag: v3.0.3 pullPolicy: IfNotPresent service: diff --git a/deploy/longhorn-images.txt b/deploy/longhorn-images.txt index 5af69f3..8018d53 100644 --- a/deploy/longhorn-images.txt +++ b/deploy/longhorn-images.txt @@ -1,8 +1,8 @@ -longhornio/csi-attacher:v2.2.1-lh2 -longhornio/csi-node-driver-registrar:v1.2.0-lh1 -longhornio/csi-provisioner:v1.6.0-lh2 -longhornio/csi-resizer:v0.5.1-lh2 -longhornio/csi-snapshotter:v2.1.1-lh2 +k8s.gcr.io/sig-storage/csi-attacher:v3.2.1 +k8s.gcr.io/sig-storage/csi-provisioner:v2.1.2 +k8s.gcr.io/sig-storage/csi-resizer:v1.2.0 +k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3 +k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0 longhornio/backing-image-manager:v2_20210820 longhornio/longhorn-engine:v1.2.0-rc1 longhornio/longhorn-instance-manager:v1_20210731 diff --git a/deploy/release-images.txt b/deploy/release-images.txt deleted file mode 100644 index 5af69f3..0000000 --- a/deploy/release-images.txt +++ /dev/null @@ -1,11 +0,0 @@ -longhornio/csi-attacher:v2.2.1-lh2 -longhornio/csi-node-driver-registrar:v1.2.0-lh1 -longhornio/csi-provisioner:v1.6.0-lh2 -longhornio/csi-resizer:v0.5.1-lh2 -longhornio/csi-snapshotter:v2.1.1-lh2 -longhornio/backing-image-manager:v2_20210820 -longhornio/longhorn-engine:v1.2.0-rc1 -longhornio/longhorn-instance-manager:v1_20210731 -longhornio/longhorn-manager:v1.2.0-rc1 -longhornio/longhorn-share-manager:v1_20210820 -longhornio/longhorn-ui:v1.2.0-rc1 From baae0099044561973fc97174eb7acbcb57e50b3c Mon Sep 17 00:00:00 2001 From: phanle1010 Date: Tue, 24 Aug 2021 21:56:35 -0700 Subject: [PATCH 18/26] Raise minimum kubernetes version to v1.18.0 in ./chart/Chart.yaml Signed-off-by: phanle1010 --- chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index e49dabe..7c82fae 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 name: longhorn version: 1.2.0-rc1 appVersion: v1.2.0-rc1 -kubeVersion: ">=v1.16.0-r0" +kubeVersion: ">=v1.18.0" description: Longhorn is a distributed block storage system for Kubernetes. keywords: - longhorn From 0c2dbcd675da0533915c018b6a11ddc48b3e06e3 Mon Sep 17 00:00:00 2001 From: JenTing Hsiao Date: Wed, 25 Aug 2021 13:51:25 +0800 Subject: [PATCH 19/26] Show backup state Signed-off-by: JenTing Hsiao --- chart/templates/crds.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index 99f55f8..b4d14ab 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -667,6 +667,10 @@ spec: type: string description: The snapshot creation time jsonPath: .status.snapshotCreatedAt + - name: State + type: string + description: The backup state + jsonPath: .status.state - name: LastSyncedAt type: string description: The backup last synced time From 9c5bd07ac6f9fdc929de2f51a14c738e411ca4b8 Mon Sep 17 00:00:00 2001 From: David Ko Date: Wed, 25 Aug 2021 19:53:24 +0800 Subject: [PATCH 20/26] Update to v1.2.0-rc2 Signed-off-by: David Ko --- chart/Chart.yaml | 4 ++-- chart/questions.yml | 6 +++--- chart/values.yaml | 6 +++--- deploy/longhorn-images.txt | 6 +++--- deploy/longhorn.yaml | 30 +++++++++++++++++------------- uninstall/uninstall.yaml | 2 +- 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 7c82fae..ff8ba7c 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: longhorn -version: 1.2.0-rc1 -appVersion: v1.2.0-rc1 +version: 1.2.0-rc2 +appVersion: v1.2.0-rc2 kubeVersion: ">=v1.18.0" description: Longhorn is a distributed block storage system for Kubernetes. keywords: diff --git a/chart/questions.yml b/chart/questions.yml index 0a1f230..e8f35cb 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -17,7 +17,7 @@ questions: label: Longhorn Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.manager.tag - default: v1.2.0-rc1 + default: v1.2.0-rc2 description: "Specify Longhorn Manager Image Tag" type: string label: Longhorn Manager Image Tag @@ -29,7 +29,7 @@ questions: label: Longhorn Engine Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.engine.tag - default: v1.2.0-rc1 + default: v1.2.0-rc2 description: "Specify Longhorn Engine Image Tag" type: string label: Longhorn Engine Image Tag @@ -41,7 +41,7 @@ questions: label: Longhorn UI Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.ui.tag - default: v1.2.0-rc1 + default: v1.2.0-rc2 description: "Specify Longhorn UI Image Tag" type: string label: Longhorn UI Image Tag diff --git a/chart/values.yaml b/chart/values.yaml index 026f672..833ffd2 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -9,13 +9,13 @@ image: longhorn: engine: repository: longhornio/longhorn-engine - tag: v1.2.0-rc1 + tag: v1.2.0-rc2 manager: repository: longhornio/longhorn-manager - tag: v1.2.0-rc1 + tag: v1.2.0-rc2 ui: repository: longhornio/longhorn-ui - tag: v1.2.0-rc1 + tag: v1.2.0-rc2 instanceManager: repository: longhornio/longhorn-instance-manager tag: v1_20210731 diff --git a/deploy/longhorn-images.txt b/deploy/longhorn-images.txt index 8018d53..caffc69 100644 --- a/deploy/longhorn-images.txt +++ b/deploy/longhorn-images.txt @@ -4,8 +4,8 @@ k8s.gcr.io/sig-storage/csi-resizer:v1.2.0 k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3 k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0 longhornio/backing-image-manager:v2_20210820 -longhornio/longhorn-engine:v1.2.0-rc1 +longhornio/longhorn-engine:v1.2.0-rc2 longhornio/longhorn-instance-manager:v1_20210731 -longhornio/longhorn-manager:v1.2.0-rc1 +longhornio/longhorn-manager:v1.2.0-rc2 longhornio/longhorn-share-manager:v1_20210820 -longhornio/longhorn-ui:v1.2.0-rc1 +longhornio/longhorn-ui:v1.2.0-rc2 diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index ce033d7..c71ac90 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -39,7 +39,7 @@ rules: resources: ["priorityclasses"] verbs: ["watch", "list"] - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses", "volumeattachments", "csinodes", "csidrivers"] + resources: ["storageclasses", "volumeattachments","volumeattachments/status", "csinodes", "csidrivers"] verbs: ["*"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotclasses", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotcontents/status"] @@ -741,6 +741,10 @@ spec: type: string description: The snapshot creation time jsonPath: .status.snapshotCreatedAt + - name: State + type: string + description: The backup state + jsonPath: .status.state - name: LastSyncedAt type: string description: The backup last synced time @@ -980,7 +984,7 @@ spec: spec: containers: - name: longhorn-manager - image: longhornio/longhorn-manager:v1.2.0-rc1 + image: longhornio/longhorn-manager:v1.2.0-rc2 imagePullPolicy: IfNotPresent securityContext: privileged: true @@ -989,7 +993,7 @@ spec: - -d - daemon - --engine-image - - longhornio/longhorn-engine:v1.2.0-rc1 + - longhornio/longhorn-engine:v1.2.0-rc2 - --instance-manager-image - longhornio/longhorn-instance-manager:v1_20210731 - --share-manager-image @@ -997,7 +1001,7 @@ spec: - --backing-image-manager-image - longhornio/backing-image-manager:v2_20210820 - --manager-image - - longhornio/longhorn-manager:v1.2.0-rc1 + - longhornio/longhorn-manager:v1.2.0-rc2 - --service-account - longhorn-service-account ports: @@ -1097,7 +1101,7 @@ spec: spec: containers: - name: longhorn-ui - image: longhornio/longhorn-ui:v1.2.0-rc1 + image: longhornio/longhorn-ui:v1.2.0-rc2 imagePullPolicy: IfNotPresent securityContext: runAsUser: 0 @@ -1153,18 +1157,18 @@ spec: spec: initContainers: - name: wait-longhorn-manager - image: longhornio/longhorn-manager:v1.2.0-rc1 + image: longhornio/longhorn-manager:v1.2.0-rc2 command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done'] containers: - name: longhorn-driver-deployer - image: longhornio/longhorn-manager:v1.2.0-rc1 + image: longhornio/longhorn-manager:v1.2.0-rc2 imagePullPolicy: IfNotPresent command: - longhorn-manager - -d - deploy-driver - --manager-image - - longhornio/longhorn-manager:v1.2.0-rc1 + - longhornio/longhorn-manager:v1.2.0-rc2 - --manager-url - http://longhorn-backend:9500/v1 env: @@ -1186,15 +1190,15 @@ spec: # For AirGap Installation # Replace PREFIX with your private registry #- name: CSI_ATTACHER_IMAGE - # value: PREFIX/csi-attacher:v2.2.1-lh1 + # value: PREFIX/csi-attacher:v3.2.1 #- name: CSI_PROVISIONER_IMAGE - # value: PREFIX/csi-provisioner:v1.6.0-lh1 + # value: PREFIX/csi-provisioner:v2.1.2 #- name: CSI_NODE_DRIVER_REGISTRAR_IMAGE - # value: PREFIX/csi-node-driver-registrar:v1.2.0-lh1 + # value: PREFIX/csi-node-driver-registrar:v2.3.0 #- name: CSI_RESIZER_IMAGE - # value: PREFIX/csi-resizer:v0.5.1-lh1 + # value: PREFIX/csi-resizer:v1.2.0 #- name: CSI_SNAPSHOTTER_IMAGE - # value: PREFIX/csi-snapshotter:v2.1.1-lh1 + # value: PREFIX/csi-snapshotter:v3.0.3 # Manually specify number of CSI attacher replicas #- name: CSI_ATTACHER_REPLICA_COUNT # value: "3" diff --git a/uninstall/uninstall.yaml b/uninstall/uninstall.yaml index a33db9f..3adacec 100644 --- a/uninstall/uninstall.yaml +++ b/uninstall/uninstall.yaml @@ -101,7 +101,7 @@ spec: spec: containers: - name: longhorn-uninstall - image: longhornio/longhorn-manager:v1.2.0-rc1 + image: longhornio/longhorn-manager:v1.2.0-rc2 imagePullPolicy: Always securityContext: privileged: true From bf20a0c3db16331d1b7343419caa01ab223c704f Mon Sep 17 00:00:00 2001 From: David Ko Date: Wed, 25 Aug 2021 22:08:59 +0800 Subject: [PATCH 21/26] Update CSI images in questions.yml Signed-off-by: David Ko --- chart/questions.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/chart/questions.yml b/chart/questions.yml index e8f35cb..97a8100 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -83,61 +83,61 @@ questions: label: Longhorn Backing Image Manager Image Tag group: "Longhorn Images Settings" - variable: image.csi.attacher.repository - default: longhornio/csi-attacher + default: k8s.gcr.io/sig-storage/csi-attacher description: "Specify CSI attacher image repository. Leave blank to autodetect." type: string label: Longhorn CSI Attacher Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.attacher.tag - default: v2.2.1-lh2 + default: v3.2.1 description: "Specify CSI attacher image tag. Leave blank to autodetect." type: string label: Longhorn CSI Attacher Image Tag group: "Longhorn CSI Driver Images" - variable: image.csi.provisioner.repository - default: longhornio/csi-provisioner + default: k8s.gcr.io/sig-storage/csi-provisioner description: "Specify CSI provisioner image repository. Leave blank to autodetect." type: string label: Longhorn CSI Provisioner Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.provisioner.tag - default: v1.6.0-lh2 + default: v2.1.2 description: "Specify CSI provisioner image tag. Leave blank to autodetect." type: string label: Longhorn CSI Provisioner Image Tag group: "Longhorn CSI Driver Images" - variable: image.csi.nodeDriverRegistrar.repository - default: longhornio/csi-node-driver-registrar + default: k8s.gcr.io/sig-storage/csi-node-driver-registrar description: "Specify CSI Node Driver Registrar image repository. Leave blank to autodetect." type: string label: Longhorn CSI Node Driver Registrar Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.nodeDriverRegistrar.tag - default: v1.2.0-lh1 + default: v2.3.0 description: "Specify CSI Node Driver Registrar image tag. Leave blank to autodetect." type: string label: Longhorn CSI Node Driver Registrar Image Tag group: "Longhorn CSI Driver Images" - variable: image.csi.resizer.repository - default: longhornio/csi-resizer + default: k8s.gcr.io/sig-storage/csi-resizer description: "Specify CSI Driver Resizer image repository. Leave blank to autodetect." type: string label: Longhorn CSI Driver Resizer Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.resizer.tag - default: v0.5.1-lh2 + default: v1.2.0 description: "Specify CSI Driver Resizer image tag. Leave blank to autodetect." type: string label: Longhorn CSI Driver Resizer Image Tag group: "Longhorn CSI Driver Images" - variable: image.csi.snapshotter.repository - default: longhornio/csi-snapshotter + default: k8s.gcr.io/sig-storage/csi-snapshotter description: "Specify CSI Driver Snapshotter image repository. Leave blank to autodetect." type: string label: Longhorn CSI Driver Snapshotter Image Repository group: "Longhorn CSI Driver Images" - variable: image.csi.snapshotter.tag - default: v2.1.1-lh2 + default: v3.0.3 description: "Specify CSI Driver Snapshotter image tag. Leave blank to autodetect." type: string label: Longhorn CSI Driver Snapshotter Image Tag From bda87293fb95506037da988b1f1486e8c0eafb4c Mon Sep 17 00:00:00 2001 From: JenTing Hsiao Date: Fri, 30 Jul 2021 10:24:31 +0800 Subject: [PATCH 22/26] Bump ingress api version to networking.k8s.io/v1 (#2809) extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+ ref to: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122 Signed-off-by: JenTing Hsiao Co-authored-by: David Ko --- chart/templates/ingress.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/chart/templates/ingress.yaml b/chart/templates/ingress.yaml index 13555f8..6649206 100644 --- a/chart/templates/ingress.yaml +++ b/chart/templates/ingress.yaml @@ -1,5 +1,9 @@ {{- if .Values.ingress.enabled }} -apiVersion: extensions/v1beta1 +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else -}} +apiVersion: networking.k8s.io/v1beta1 +{{- end }} kind: Ingress metadata: name: longhorn-ingress @@ -14,7 +18,7 @@ metadata: {{ $key }}: {{ $value | quote }} {{- end }} spec: - {{- if .Values.ingress.ingressClassName }} + {{- if and .Values.ingress.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.ingressClassName }} {{- end }} rules: @@ -22,9 +26,19 @@ spec: http: paths: - path: {{ default "" .Values.ingress.path }} + {{- if (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: ImplementationSpecific + {{- end }} backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: longhorn-frontend + port: + number: 80 + {{- else }} serviceName: longhorn-frontend servicePort: 80 + {{- end }} {{- if .Values.ingress.tls }} tls: - hosts: From 36d0b00a82a64bfa84d3df66a386c9bd51d52482 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Wed, 25 Aug 2021 21:49:11 +0800 Subject: [PATCH 23/26] chart: Add backing image options for default StorageClass Longhorn 2403, 2404, 2530 Signed-off-by: Shuo Wu --- chart/questions.yml | 49 +++++++++++++++++++++++++++++++ chart/templates/storageclass.yaml | 7 ++++- chart/values.yaml | 6 ++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/chart/questions.yml b/chart/questions.yml index 97a8100..af33f0c 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -508,6 +508,55 @@ Warning: This option works only when there is a failed replica in the volume. An group: "Longhorn Storage Class Settings" type: string default: +- variable: persistence.backingImage.enable + description: "Set backing image for Longhorn StorageClass" + group: "Longhorn Storage Class Settings" + label: Default Storage Class Backing Image + type: boolean + default: false + show_subquestion_if: true + subquestions: + - variable: persistence.backingImage.name + description: 'Specify a backing image that will be used by Longhorn volumes in Longhorn StorageClass. If not exists, the backing image data source type and backing image data source parameters should be specified so that Longhorn will create the backing image before using it.' + label: Storage Class Backing Image Name + group: "Longhorn Storage Class Settings" + type: string + default: + - variable: persistence.backingImage.expectedChecksum + description: 'Specify the expected SHA512 checksum of the selected backing image in Longhorn StorageClass. + WARNING: + - If the backing image name is not specified, setting this field is meaningless. + - It is not recommended to set this field if the data source type is \"export-from-volume\".' + label: Storage Class Backing Image Expected SHA512 Checksum + group: "Longhorn Storage Class Settings" + type: string + default: + - variable: persistence.backingImage.dataSourceType + description: 'Specify the data source type for the backing image used in Longhorn StorageClass. + If the backing image does not exists, Longhorn will use this field to create a backing image. Otherwise, Longhorn will use it to verify the selected backing image. + WARNING: + - If the backing image name is not specified, setting this field is meaningless. + - As for backing image creation with data source type \"upload\", it is recommended to do it via UI rather than StorageClass here. Uploading requires file data sending to the Longhorn backend after the object creation, which is complicated if you want to handle it manually.' + label: Storage Class Backing Image Data Source Type + group: "Longhorn Storage Class Settings" + type: enum + options: + - "" + - "download" + - "upload" + - "export-from-volume" + default: "" + - variable: persistence.backingImage.dataSourceParameters + description: "Specify the data source parameters for the backing image used in Longhorn StorageClass. + If the backing image does not exists, Longhorn will use this field to create a backing image. Otherwise, Longhorn will use it to verify the selected backing image. + This option accepts a json string of a map. e.g., '{\"url\":\"https://backing-image-example.s3-region.amazonaws.com/test-backing-image\"}'. + WARNING: + - If the backing image name is not specified, setting this field is meaningless. + - Be careful of the quotes here." + label: Storage Class Backing Image Data Source Parameters + group: "Longhorn Storage Class Settings" + type: string + default: - variable: ingress.enabled default: "false" description: "Expose app using Layer 7 Load Balancer - ingress" diff --git a/chart/templates/storageclass.yaml b/chart/templates/storageclass.yaml index 2a18147..fd2dde5 100644 --- a/chart/templates/storageclass.yaml +++ b/chart/templates/storageclass.yaml @@ -20,7 +20,12 @@ data: numberOfReplicas: "{{ .Values.persistence.defaultClassReplicaCount }}" staleReplicaTimeout: "30" fromBackup: "" - backingImage: "" + {{- if .Values.persistence.backingImage.enable }} + backingImage: {{ .Values.persistence.backingImage.name }} + backingImageDataSourceType: {{ .Values.persistence.backingImage.dataSourceType }} + backingImageDataSourceParameters: {{ .Values.persistence.backingImage.dataSourceParameters }} + backingImageChecksum: {{ .Values.persistence.backingImage.expectedChecksum }} + {{- end }} {{- if .Values.persistence.recurringJobSelector.enable }} recurringJobSelector: '{{ .Values.persistence.recurringJobSelector.jobList }}' {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 833ffd2..a4ab79e 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -58,6 +58,12 @@ persistence: recurringJobSelector: enable: false jobList: [] + backingImage: + enable: false + name: ~ + dataSourceType: ~ + dataSourceParameters: ~ + expectedChecksum: ~ csi: kubeletRootDir: ~ From 5d6319aba0e5024e84dad012bf63a158c7ad919b Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Tue, 31 Aug 2021 16:59:19 +0800 Subject: [PATCH 24/26] chart: Add missing labels for CRD YAML Signed-off-by: Shuo Wu --- chart/templates/crds.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index b4d14ab..6a0f08b 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -527,7 +527,7 @@ spec: apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - labels: + labels: {{- include "longhorn.labels" . | nindent 4 }} longhorn-manager: BackupTarget name: backuptargets.longhorn.io spec: @@ -579,7 +579,7 @@ spec: apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - labels: + labels: {{- include "longhorn.labels" . | nindent 4 }} longhorn-manager: BackupVolume name: backupvolumes.longhorn.io spec: @@ -627,7 +627,7 @@ spec: apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - labels: + labels: {{- include "longhorn.labels" . | nindent 4 }} longhorn-manager: Backup name: backups.longhorn.io spec: @@ -679,7 +679,7 @@ spec: apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - labels: + labels: {{- include "longhorn.labels" . | nindent 4 }} longhorn-manager: RecurringJob name: recurringjobs.longhorn.io spec: From a22706cf1ef3a05409cddf93703a6d55826f6f95 Mon Sep 17 00:00:00 2001 From: Shuo Wu Date: Tue, 31 Aug 2021 16:52:15 +0800 Subject: [PATCH 25/26] chart: Format the YAML files Signed-off-by: Shuo Wu --- chart/templates/crds.yaml | 326 +++++++++++++++--------------- chart/templates/daemonset-sa.yaml | 2 +- 2 files changed, 164 insertions(+), 164 deletions(-) diff --git a/chart/templates/crds.yaml b/chart/templates/crds.yaml index 6a0f08b..4086ef8 100644 --- a/chart/templates/crds.yaml +++ b/chart/templates/crds.yaml @@ -537,44 +537,44 @@ spec: listKind: BackupTargetList plural: backuptargets shortNames: - - lhbt + - lhbt singular: backuptarget 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: URL - type: string - description: The backup target URL - jsonPath: .spec.backupTargetURL - - name: Credential - type: string - description: The backup target credential secret - jsonPath: .spec.credentialSecret - - name: Interval - type: string - description: The backup target poll interval - jsonPath: .spec.pollInterval - - name: Available - type: boolean - description: Indicate whether the backup target is available or not - jsonPath: .status.available - - name: LastSyncedAt - type: string - description: The backup target last synced time - jsonPath: .status.lastSyncedAt + - 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: URL + type: string + description: The backup target URL + jsonPath: .spec.backupTargetURL + - name: Credential + type: string + description: The backup target credential secret + jsonPath: .spec.credentialSecret + - name: Interval + type: string + description: The backup target poll interval + jsonPath: .spec.pollInterval + - name: Available + type: boolean + description: Indicate whether the backup target is available or not + jsonPath: .status.available + - name: LastSyncedAt + type: string + description: The backup target last synced time + jsonPath: .status.lastSyncedAt --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -589,40 +589,40 @@ spec: listKind: BackupVolumeList plural: backupvolumes shortNames: - - lhbv + - lhbv singular: backupvolume 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: CreatedAt - type: string - description: The backup volume creation time - jsonPath: .status.createdAt - - name: LastBackupName - type: string - description: The backup volume last backup name - jsonPath: .status.lastBackupName - - name: LastBackupAt - type: string - description: The backup volume last backup time - jsonPath: .status.lastBackupAt - - name: LastSyncedAt - type: string - description: The backup volume last synced time - jsonPath: .status.lastSyncedAt + - 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: CreatedAt + type: string + description: The backup volume creation time + jsonPath: .status.createdAt + - name: LastBackupName + type: string + description: The backup volume last backup name + jsonPath: .status.lastBackupName + - name: LastBackupAt + type: string + description: The backup volume last backup time + jsonPath: .status.lastBackupAt + - name: LastSyncedAt + type: string + description: The backup volume last synced time + jsonPath: .status.lastSyncedAt --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -637,44 +637,44 @@ spec: listKind: BackupList plural: backups shortNames: - - lhb + - lhb singular: backup 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: SnapshotName - type: string - description: The snapshot name - jsonPath: .status.snapshotName - - name: SnapshotSize - type: string - description: The snapshot size - jsonPath: .status.size - - name: SnapshotCreatedAt - type: string - description: The snapshot creation time - jsonPath: .status.snapshotCreatedAt - - name: State - type: string - description: The backup state - jsonPath: .status.state - - name: LastSyncedAt - type: string - description: The backup last synced time - jsonPath: .status.lastSyncedAt + - 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: SnapshotName + type: string + description: The snapshot name + jsonPath: .status.snapshotName + - name: SnapshotSize + type: string + description: The snapshot size + jsonPath: .status.size + - name: SnapshotCreatedAt + type: string + description: The snapshot creation time + jsonPath: .status.snapshotCreatedAt + - name: State + type: string + description: The backup state + jsonPath: .status.state + - name: LastSyncedAt + type: string + description: The backup last synced time + jsonPath: .status.lastSyncedAt --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -689,70 +689,70 @@ spec: listKind: RecurringJobList plural: recurringjobs shortNames: - - lhrj + - lhrj singular: recurringjob scope: Namespaced versions: - - name: v1beta1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - metadata: - type: object - properties: - name: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + metadata: + type: object + properties: + name: + type: string + spec: + type: object + properties: + groups: + type: array + items: type: string - spec: - type: object - properties: - groups: - type: array - items: - type: string - task: - type: string - pattern: "^snapshot|backup$" - cron: - type: string - retain: - type: integer - concurrency: - type: integer - labels: - x-kubernetes-preserve-unknown-fields: true - status: - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} - additionalPrinterColumns: - - name: Groups - type: string - description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume. - jsonPath: .spec.groups - - name: Task - type: string - description: Should be one of "backup" or "snapshot". - jsonPath: .spec.task - - name: Cron - type: string - description: The cron expression represents recurring job scheduling. - jsonPath: .spec.cron - - name: Retain - type: integer - description: The number of snapshots/backups to keep for the volume. - jsonPath: .spec.retain - - name: Concurrency - type: integer - description: The concurrent job to run by each cron job. - jsonPath: .spec.concurrency - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: Labels - type: string - description: Specify the labels - jsonPath: .spec.labels + task: + type: string + pattern: "^snapshot|backup$" + cron: + type: string + retain: + type: integer + concurrency: + type: integer + labels: + x-kubernetes-preserve-unknown-fields: true + status: + x-kubernetes-preserve-unknown-fields: true + subresources: + status: {} + additionalPrinterColumns: + - name: Groups + type: string + description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume. + jsonPath: .spec.groups + - name: Task + type: string + description: Should be one of "backup" or "snapshot". + jsonPath: .spec.task + - name: Cron + type: string + description: The cron expression represents recurring job scheduling. + jsonPath: .spec.cron + - name: Retain + type: integer + description: The number of snapshots/backups to keep for the volume. + jsonPath: .spec.retain + - name: Concurrency + type: integer + description: The concurrent job to run by each cron job. + jsonPath: .spec.concurrency + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Labels + type: string + description: Specify the labels + jsonPath: .spec.labels --- diff --git a/chart/templates/daemonset-sa.yaml b/chart/templates/daemonset-sa.yaml index 636a4c0..9ce2dd0 100644 --- a/chart/templates/daemonset-sa.yaml +++ b/chart/templates/daemonset-sa.yaml @@ -91,7 +91,6 @@ spec: {{- if .Values.longhornManager.priorityClass }} priorityClassName: {{ .Values.longhornManager.priorityClass | quote}} {{- end }} - serviceAccountName: longhorn-service-account {{- if .Values.longhornManager.tolerations }} tolerations: {{ toYaml .Values.longhornManager.tolerations | indent 6 }} @@ -100,6 +99,7 @@ spec: nodeSelector: {{ toYaml .Values.longhornManager.nodeSelector | indent 8 }} {{- end }} + serviceAccountName: longhorn-service-account updateStrategy: rollingUpdate: maxUnavailable: "100%" From 84d2f4891204cd5fae32735482c9f65eaa49e3ad Mon Sep 17 00:00:00 2001 From: David Ko Date: Wed, 1 Sep 2021 00:10:15 +0800 Subject: [PATCH 26/26] Update to v1.2.0 Signed-off-by: David Ko --- chart/Chart.yaml | 4 +- chart/README.md | 2 +- chart/questions.yml | 6 +- chart/values.yaml | 6 +- deploy/longhorn-images.txt | 6 +- deploy/longhorn.yaml | 347 ++++++++++++++++++------------------- uninstall/uninstall.yaml | 2 +- 7 files changed, 185 insertions(+), 188 deletions(-) diff --git a/chart/Chart.yaml b/chart/Chart.yaml index ff8ba7c..ca33e39 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: longhorn -version: 1.2.0-rc2 -appVersion: v1.2.0-rc2 +version: 1.2.0 +appVersion: v1.2.0 kubeVersion: ">=v1.18.0" description: Longhorn is a distributed block storage system for Kubernetes. keywords: diff --git a/chart/README.md b/chart/README.md index 32a2250..fd54c0e 100644 --- a/chart/README.md +++ b/chart/README.md @@ -18,7 +18,7 @@ Longhorn is 100% open source software. Project source code is spread across a nu ## Prerequisites 1. A container runtime compatible with Kubernetes (Docker v1.13+, containerd v1.3.7+, etc.) -2. Kubernetes v1.16+ +2. Kubernetes v1.18+ 3. Make sure `bash`, `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster. 4. Make sure `open-iscsi` has been installed, and the `iscsid` daemon is running on all nodes of the Kubernetes cluster. For GKE, recommended Ubuntu as guest OS image since it contains `open-iscsi` already. diff --git a/chart/questions.yml b/chart/questions.yml index af33f0c..128b070 100644 --- a/chart/questions.yml +++ b/chart/questions.yml @@ -17,7 +17,7 @@ questions: label: Longhorn Manager Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.manager.tag - default: v1.2.0-rc2 + default: v1.2.0 description: "Specify Longhorn Manager Image Tag" type: string label: Longhorn Manager Image Tag @@ -29,7 +29,7 @@ questions: label: Longhorn Engine Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.engine.tag - default: v1.2.0-rc2 + default: v1.2.0 description: "Specify Longhorn Engine Image Tag" type: string label: Longhorn Engine Image Tag @@ -41,7 +41,7 @@ questions: label: Longhorn UI Image Repository group: "Longhorn Images Settings" - variable: image.longhorn.ui.tag - default: v1.2.0-rc2 + default: v1.2.0 description: "Specify Longhorn UI Image Tag" type: string label: Longhorn UI Image Tag diff --git a/chart/values.yaml b/chart/values.yaml index a4ab79e..c9d90fb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -9,13 +9,13 @@ image: longhorn: engine: repository: longhornio/longhorn-engine - tag: v1.2.0-rc2 + tag: v1.2.0 manager: repository: longhornio/longhorn-manager - tag: v1.2.0-rc2 + tag: v1.2.0 ui: repository: longhornio/longhorn-ui - tag: v1.2.0-rc2 + tag: v1.2.0 instanceManager: repository: longhornio/longhorn-instance-manager tag: v1_20210731 diff --git a/deploy/longhorn-images.txt b/deploy/longhorn-images.txt index caffc69..67de33a 100644 --- a/deploy/longhorn-images.txt +++ b/deploy/longhorn-images.txt @@ -4,8 +4,8 @@ k8s.gcr.io/sig-storage/csi-resizer:v1.2.0 k8s.gcr.io/sig-storage/csi-snapshotter:v3.0.3 k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0 longhornio/backing-image-manager:v2_20210820 -longhornio/longhorn-engine:v1.2.0-rc2 +longhornio/longhorn-engine:v1.2.0 longhornio/longhorn-instance-manager:v1_20210731 -longhornio/longhorn-manager:v1.2.0-rc2 +longhornio/longhorn-manager:v1.2.0 longhornio/longhorn-share-manager:v1_20210820 -longhornio/longhorn-ui:v1.2.0-rc2 +longhornio/longhorn-ui:v1.2.0 diff --git a/deploy/longhorn.yaml b/deploy/longhorn.yaml index c71ac90..55db063 100644 --- a/deploy/longhorn.yaml +++ b/deploy/longhorn.yaml @@ -39,7 +39,7 @@ rules: resources: ["priorityclasses"] verbs: ["watch", "list"] - apiGroups: ["storage.k8s.io"] - resources: ["storageclasses", "volumeattachments","volumeattachments/status", "csinodes", "csidrivers"] + resources: ["storageclasses", "volumeattachments", "volumeattachments/status", "csinodes", "csidrivers"] verbs: ["*"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotclasses", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotcontents/status"] @@ -611,44 +611,44 @@ spec: listKind: BackupTargetList plural: backuptargets shortNames: - - lhbt + - lhbt singular: backuptarget 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: URL - type: string - description: The backup target URL - jsonPath: .spec.backupTargetURL - - name: Credential - type: string - description: The backup target credential secret - jsonPath: .spec.credentialSecret - - name: Interval - type: string - description: The backup target poll interval - jsonPath: .spec.pollInterval - - name: Available - type: boolean - description: Indicate whether the backup target is available or not - jsonPath: .status.available - - name: LastSyncedAt - type: string - description: The backup target last synced time - jsonPath: .status.lastSyncedAt + - 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: URL + type: string + description: The backup target URL + jsonPath: .spec.backupTargetURL + - name: Credential + type: string + description: The backup target credential secret + jsonPath: .spec.credentialSecret + - name: Interval + type: string + description: The backup target poll interval + jsonPath: .spec.pollInterval + - name: Available + type: boolean + description: Indicate whether the backup target is available or not + jsonPath: .status.available + - name: LastSyncedAt + type: string + description: The backup target last synced time + jsonPath: .status.lastSyncedAt --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -663,40 +663,40 @@ spec: listKind: BackupVolumeList plural: backupvolumes shortNames: - - lhbv + - lhbv singular: backupvolume 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: CreatedAt - type: string - description: The backup volume creation time - jsonPath: .status.createdAt - - name: LastBackupName - type: string - description: The backup volume last backup name - jsonPath: .status.lastBackupName - - name: LastBackupAt - type: string - description: The backup volume last backup time - jsonPath: .status.lastBackupAt - - name: LastSyncedAt - type: string - description: The backup volume last synced time - jsonPath: .status.lastSyncedAt + - 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: CreatedAt + type: string + description: The backup volume creation time + jsonPath: .status.createdAt + - name: LastBackupName + type: string + description: The backup volume last backup name + jsonPath: .status.lastBackupName + - name: LastBackupAt + type: string + description: The backup volume last backup time + jsonPath: .status.lastBackupAt + - name: LastSyncedAt + type: string + description: The backup volume last synced time + jsonPath: .status.lastSyncedAt --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -711,45 +711,44 @@ spec: listKind: BackupList plural: backups shortNames: - - lhb + - lhb singular: backup 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: SnapshotName - type: string - description: The snapshot name - jsonPath: .status.snapshotName - - name: SnapshotSize - type: string - description: The snapshot size - jsonPath: .status.size - - name: SnapshotCreatedAt - type: string - description: The snapshot creation time - jsonPath: .status.snapshotCreatedAt - - name: State - type: string - description: The backup state - jsonPath: .status.state - - name: LastSyncedAt - type: string - description: The backup last synced time - jsonPath: .status.lastSyncedAt - + - 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: SnapshotName + type: string + description: The snapshot name + jsonPath: .status.snapshotName + - name: SnapshotSize + type: string + description: The snapshot size + jsonPath: .status.size + - name: SnapshotCreatedAt + type: string + description: The snapshot creation time + jsonPath: .status.snapshotCreatedAt + - name: State + type: string + description: The backup state + jsonPath: .status.state + - name: LastSyncedAt + type: string + description: The backup last synced time + jsonPath: .status.lastSyncedAt --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -764,72 +763,72 @@ spec: listKind: RecurringJobList plural: recurringjobs shortNames: - - lhrj + - lhrj singular: recurringjob scope: Namespaced versions: - - name: v1beta1 - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - metadata: - type: object - properties: - name: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + metadata: + type: object + properties: + name: + type: string + spec: + type: object + properties: + groups: + type: array + items: type: string - spec: - type: object - properties: - groups: - type: array - items: - type: string - task: - type: string - pattern: "^snapshot|backup$" - cron: - type: string - retain: - type: integer - concurrency: - type: integer - labels: - x-kubernetes-preserve-unknown-fields: true - status: - x-kubernetes-preserve-unknown-fields: true - subresources: - status: {} - additionalPrinterColumns: - - name: Groups - type: string - description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume. - jsonPath: .spec.groups - - name: Task - type: string - description: Should be one of "backup" or "snapshot". - jsonPath: .spec.task - - name: Cron - type: string - description: The cron expression represents recurring job scheduling. - jsonPath: .spec.cron - - name: Retain - type: integer - description: The number of snapshots/backups to keep for the volume. - jsonPath: .spec.retain - - name: Concurrency - type: integer - description: The concurrent job to run by each cron job. - jsonPath: .spec.concurrency - - name: Age - type: date - jsonPath: .metadata.creationTimestamp - - name: Labels - type: string - description: Specify the labels - jsonPath: .spec.labels + task: + type: string + pattern: "^snapshot|backup$" + cron: + type: string + retain: + type: integer + concurrency: + type: integer + labels: + x-kubernetes-preserve-unknown-fields: true + status: + x-kubernetes-preserve-unknown-fields: true + subresources: + status: {} + additionalPrinterColumns: + - name: Groups + type: string + description: Sets groupings to the jobs. When set to "default" group will be added to the volume label when no other job label exist in volume. + jsonPath: .spec.groups + - name: Task + type: string + description: Should be one of "backup" or "snapshot". + jsonPath: .spec.task + - name: Cron + type: string + description: The cron expression represents recurring job scheduling. + jsonPath: .spec.cron + - name: Retain + type: integer + description: The number of snapshots/backups to keep for the volume. + jsonPath: .spec.retain + - name: Concurrency + type: integer + description: The concurrent job to run by each cron job. + jsonPath: .spec.concurrency + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: Labels + type: string + description: Specify the labels + jsonPath: .spec.labels --- --- apiVersion: v1 @@ -845,12 +844,12 @@ data: create-default-disk-labeled-nodes: default-data-path: replica-soft-anti-affinity: + replica-auto-balance: storage-over-provisioning-percentage: storage-minimal-available-percentage: upgrade-checker: default-replica-count: default-data-locality: - guaranteed-engine-cpu: default-longhorn-static-storage-class: backupstore-poll-interval: taint-toleration: @@ -860,7 +859,6 @@ data: auto-delete-pod-when-volume-detached-unexpectedly: disable-scheduling-on-cordoned-node: replica-zone-soft-anti-affinity: - volume-attachment-recovery-policy: node-down-pod-deletion-policy: allow-node-drain-with-last-healthy-replica: mkfs-ext4-parameters: @@ -874,7 +872,6 @@ data: backing-image-cleanup-wait-interval: guaranteed-engine-manager-cpu: guaranteed-replica-manager-cpu: - --- apiVersion: policy/v1beta1 kind: PodSecurityPolicy @@ -984,7 +981,7 @@ spec: spec: containers: - name: longhorn-manager - image: longhornio/longhorn-manager:v1.2.0-rc2 + image: longhornio/longhorn-manager:v1.2.0 imagePullPolicy: IfNotPresent securityContext: privileged: true @@ -993,7 +990,7 @@ spec: - -d - daemon - --engine-image - - longhornio/longhorn-engine:v1.2.0-rc2 + - longhornio/longhorn-engine:v1.2.0 - --instance-manager-image - longhornio/longhorn-instance-manager:v1_20210731 - --share-manager-image @@ -1001,7 +998,7 @@ spec: - --backing-image-manager-image - longhornio/backing-image-manager:v2_20210820 - --manager-image - - longhornio/longhorn-manager:v1.2.0-rc2 + - longhornio/longhorn-manager:v1.2.0 - --service-account - longhorn-service-account ports: @@ -1101,7 +1098,7 @@ spec: spec: containers: - name: longhorn-ui - image: longhornio/longhorn-ui:v1.2.0-rc2 + image: longhornio/longhorn-ui:v1.2.0 imagePullPolicy: IfNotPresent securityContext: runAsUser: 0 @@ -1157,18 +1154,18 @@ spec: spec: initContainers: - name: wait-longhorn-manager - image: longhornio/longhorn-manager:v1.2.0-rc2 + image: longhornio/longhorn-manager:v1.2.0 command: ['sh', '-c', 'while [ $(curl -m 1 -s -o /dev/null -w "%{http_code}" http://longhorn-backend:9500/v1) != "200" ]; do echo waiting; sleep 2; done'] containers: - name: longhorn-driver-deployer - image: longhornio/longhorn-manager:v1.2.0-rc2 + image: longhornio/longhorn-manager:v1.2.0 imagePullPolicy: IfNotPresent command: - longhorn-manager - -d - deploy-driver - --manager-image - - longhornio/longhorn-manager:v1.2.0-rc2 + - longhornio/longhorn-manager:v1.2.0 - --manager-url - http://longhorn-backend:9500/v1 env: diff --git a/uninstall/uninstall.yaml b/uninstall/uninstall.yaml index 3adacec..98ec36b 100644 --- a/uninstall/uninstall.yaml +++ b/uninstall/uninstall.yaml @@ -101,7 +101,7 @@ spec: spec: containers: - name: longhorn-uninstall - image: longhornio/longhorn-manager:v1.2.0-rc2 + image: longhornio/longhorn-manager:v1.2.0 imagePullPolicy: Always securityContext: privileged: true