Commit b980d82b by Shuo Wu Committed by Denise Schannon

Longhorn: Longhorn v0.7.0 release

Signed-off-by: 's avatarShuo Wu <shuo@rancher.com>
parent 57c380a8
apiVersion: v1 apiVersion: v1
name: longhorn name: longhorn
version: 0.6.2 version: 0.7.0
appVersion: v0.6.2 appVersion: v0.7.0
kubeVersion: ">=v1.12.0-r0" kubeVersion: ">=v1.14.0-r0"
description: Longhorn is a distributed block storage system for Kubernetes powered by Rancher Labs. description: Longhorn is a distributed block storage system for Kubernetes powered by Rancher Labs.
keywords: keywords:
- longhorn - longhorn
...@@ -21,4 +21,4 @@ sources: ...@@ -21,4 +21,4 @@ sources:
maintainers: maintainers:
- name: rancher - name: rancher
email: charts@rancher.com email: charts@rancher.com
icon: https://s3.us-east-2.amazonaws.com/longhorn-assets/longhorn-logo.svg icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/longhorn/horizontal/color/longhorn-horizontal-color.svg?sanitize=true
...@@ -8,15 +8,15 @@ The following document pertains to running Longhorn from the Rancher 2.0 chart. ...@@ -8,15 +8,15 @@ The following document pertains to running Longhorn from the Rancher 2.0 chart.
Longhorn is 100% open source software. Project source code is spread across a number of repos: Longhorn is 100% open source software. Project source code is spread across a number of repos:
1. Longhorn Engine -- Core controller/replica logic https://github.com/rancher/longhorn-engine 1. Longhorn Engine -- Core controller/replica logic https://github.com/longhorn/longhorn-engine
2. Longhorn Manager -- Longhorn orchestration, includes Flexvolume driver for Kubernetes https://github.com/rancher/longhorn-manager 2. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager
3. Longhorn UI -- Dashboard https://github.com/rancher/longhorn-ui 3. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui
## Prerequisites ## Prerequisites
1. Rancher v2.1+ 1. Rancher v2.1+
2. Docker v1.13+ 2. Docker v1.13+
3. Kubernetes v1.8+ cluster with 1 or more nodes and Mount Propagation feature enabled. If your Kubernetes cluster was provisioned by Rancher v2.0.7+ or later, MountPropagation feature is enabled by default. [Check your Kubernetes environment now](https://github.com/rancher/longhorn#environment-check-script). If MountPropagation is disabled, the Kubernetes Flexvolume driver will be deployed instead of the default CSI driver. Base Image feature will also be disabled if MountPropagation is disabled. 3. Kubernetes v1.14+
4. Make sure `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster. 4. Make sure `curl`, `findmnt`, `grep`, `awk` and `blkid` has been installed in all nodes of the Kubernetes cluster.
5. Make sure `open-iscsi` has been installed in all nodes of the Kubernetes cluster. For GKE, recommended Ubuntu as guest OS image since it contains `open-iscsi` already. 5. Make sure `open-iscsi` has been installed in all nodes of the Kubernetes cluster. For GKE, recommended Ubuntu as guest OS image since it contains `open-iscsi` already.
...@@ -37,23 +37,10 @@ Redeploy the (same version) Longhorn App. Follow the uninstallation procedure ab ...@@ -37,23 +37,10 @@ Redeploy the (same version) Longhorn App. Follow the uninstallation procedure ab
If your CRD instances or the CRDs themselves can't be deleted for whatever reason, run the commands below to clean up. Caution: this will wipe all Longhorn state! If your CRD instances or the CRDs themselves can't be deleted for whatever reason, run the commands below to clean up. Caution: this will wipe all Longhorn state!
``` ```
# Delete CRD finalizers, instances and definitions # Delete CRD instances and definitions
for crd in $(kubectl get crd -o jsonpath={.items[*].metadata.name} | tr ' ' '\n' | grep longhorn.rancher.io); do curl -s https://raw.githubusercontent.com/longhorn/longhorn-manager/master/hack/cleancrds.sh |bash -s v062
kubectl -n ${NAMESPACE} get $crd -o yaml | sed "s/\- longhorn.rancher.io//g" | kubectl apply -f - curl -s https://raw.githubusercontent.com/longhorn/longhorn-manager/master/hack/cleancrds.sh |bash -s v070
kubectl -n ${NAMESPACE} delete $crd --all
kubectl delete crd/$crd
done
``` ```
### Volume can be attached/detached from UI, but Kubernetes Pod/StatefulSet etc cannot use it
Check if volume plugin directory has been set correctly. This is automatically detected unless user explicitly set it.
By default, Kubernetes uses `/usr/libexec/kubernetes/kubelet-plugins/volume/exec/`, as stated in the [official document](https://github.com/kubernetes/community/blob/master/contributors/devel/flexvolume.md#prerequisites).
Some vendors choose to change the directory for various reasons. For example, GKE uses `/home/kubernetes/flexvolume` instead.
User can find the correct directory by running `ps aux|grep kubelet` on the host and check the `--volume-plugin-dir` parameter. If there is none, the default `/usr/libexec/kubernetes/kubelet-plugins/volume/exec/` will be used.
--- ---
Please see [link](https://github.com/rancher/longhorn) for more information. Please see [link](https://github.com/longhorn/longhorn) for more information.
...@@ -4,73 +4,62 @@ labels: ...@@ -4,73 +4,62 @@ labels:
io.rancher.certified: experimental io.rancher.certified: experimental
namespace: longhorn-system namespace: longhorn-system
questions: questions:
- variable: driver - variable: csi.attacherImage
default: csi
description: "Deploy either the CSI or FlexVolume driver. CSI is newer but requires MountPropagation, a feature enabled by default in Kubernetes v1.10 and later"
type: enum
options:
- csi
- flexvolume
label: Longhorn Kubernetes Driver
group: "Longhorn Driver Settings"
show_subquestion_if: flexvolume
subquestions:
- variable: persistence.flexvolumePath
default: ""
description: "Leave blank to autodetect. For RKE, use `/var/lib/kubelet/volumeplugins`. For GKE, use `/home/kubernetes/flexvolume/` instead. Users can find the correct directory by running `ps aux|grep kubelet` on the host and check the --volume-plugin-dir parameter. If there is none, the default `/usr/libexec/kubernetes/kubelet-plugins/volume/exec/` will be used."
type: string
label: Longhorn Flexvolume Path
show_subquestion_if: csi
subquestions:
- variable: csi.attacherImage
default: default:
description: "Specify CSI attacher image. Leave blank to autodetect." description: "Specify CSI attacher image. Leave blank to autodetect."
type: string type: string
label: Longhorn CSI Attacher Image label: Longhorn CSI Attacher Image
- variable: csi.provisionerImage group: "Longhorn CSI Driver Settings"
- variable: csi.provisionerImage
default: default:
description: "Specify CSI provisioner image. Leave blank to autodetect." description: "Specify CSI provisioner image. Leave blank to autodetect."
type: string type: string
label: Longhorn CSI Provisioner Image label: Longhorn CSI Provisioner Image
- variable: csi.driverRegistrarImage group: "Longhorn CSI Driver Settings"
- variable: csi.driverRegistrarImage
default: default:
description: "Specify CSI Driver Registrar image. Leave blank to autodetect." description: "Specify CSI Driver Registrar image. Leave blank to autodetect."
type: string type: string
label: Longhorn CSI Driver Registrar Image label: Longhorn CSI Driver Registrar Image
- variable: csi.kubeletRootDir group: "Longhorn CSI Driver Settings"
- variable: csi.kubeletRootDir
default: default:
description: "Specify kubelet root-dir. Leave blank to autodetect." description: "Specify kubelet root-dir. Leave blank to autodetect."
type: string type: string
label: Kubelet Root Directory label: Kubelet Root Directory
- variable: csi.attacherReplicaCount group: "Longhorn CSI Driver Settings"
- variable: csi.attacherReplicaCount
type: int type: int
default: default:
min: 1 min: 1
max: 10 max: 10
description: "Specify number of CSI Attacher replica. By default 3." description: "Specify replica count of CSI Attacher. By default 3."
label: Longhorn CSI Attacher replica count label: Longhorn CSI Attacher replica count
- variable: csi.provisionerReplicaCount group: "Longhorn CSI Driver Settings"
- variable: csi.provisionerReplicaCount
type: int type: int
default: default:
min: 1 min: 1
max: 10 max: 10
description: "Specify number of CSI Provisioner replica. By default 3." description: "Specify replica count of CSI Provisioner. By default 3."
label: Longhorn CSI Provisioner replica count label: Longhorn CSI Provisioner replica count
group: "Longhorn CSI Driver Settings"
- variable: persistence.defaultClass - variable: persistence.defaultClass
default: "true" default: "true"
description: "Set as default StorageClass" description: "Set as default StorageClass"
group: "Longhorn Driver Settings" group: "Longhorn CSI Driver Settings"
type: boolean type: boolean
required: true required: true
label: Default Storage Class label: Default Storage Class
- variable: persistence.defaultClassReplicaCount - variable: persistence.defaultClassReplicaCount
description: "Set replica count for default StorageClass" description: "Set replica count for default StorageClass"
group: "Longhorn Driver Settings" group: "Longhorn CSI Driver Settings"
type: int type: int
default: 3 default: 3
min: 1 min: 1
max: 10 max: 10
label: Default Storage Class Replica Count label: Default Storage Class Replica Count
- variable: defaultSettings.backupTarget - variable: defaultSettings.backupTarget
label: Backup Target label: Backup Target
description: "The target used for backup. Support NFS or S3." description: "The target used for backup. Support NFS or S3."
......
...@@ -22,11 +22,19 @@ rules: ...@@ -22,11 +22,19 @@ rules:
resources: ["jobs", "cronjobs"] resources: ["jobs", "cronjobs"]
verbs: ["*"] verbs: ["*"]
- apiGroups: ["storage.k8s.io"] - apiGroups: ["storage.k8s.io"]
resources: ["storageclasses", "volumeattachments"] resources: ["storageclasses", "volumeattachments", "csinodes", "csidrivers"]
verbs: ["*"] verbs: ["*"]
- apiGroups: ["csi.storage.k8s.io"] - apiGroups: ["coordination.k8s.io"]
resources: ["csinodeinfos"] resources: ["leases"]
verbs: ["get", "list", "watch"] verbs: ["get", "watch", "list", "delete", "update", "create"]
- apiGroups: ["longhorn.io"]
resources: ["volumes", "volumes/status", "engines", "engines/status", "replicas", "replicas/status", "settings",
"engineimages", "engineimages/status", "nodes", "nodes/status", "instancemanagers", "instancemanagers/status"]
verbs: ["*"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["*"]
# to be removed after v0.7.0
- apiGroups: ["longhorn.rancher.io"] - apiGroups: ["longhorn.rancher.io"]
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"] resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"]
verbs: ["*"] verbs: ["*"]
...@@ -3,6 +3,144 @@ kind: CustomResourceDefinition ...@@ -3,6 +3,144 @@ kind: CustomResourceDefinition
metadata: metadata:
labels: labels:
longhorn-manager: Engine longhorn-manager: Engine
name: engines.longhorn.io
spec:
group: longhorn.io
names:
kind: Engine
listKind: EngineList
plural: engines
shortNames:
- lhe
singular: engine
scope: Namespaced
version: v1beta1
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: Replica
name: replicas.longhorn.io
spec:
group: longhorn.io
names:
kind: Replica
listKind: ReplicaList
plural: replicas
shortNames:
- lhr
singular: replica
scope: Namespaced
version: v1beta1
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: Setting
name: settings.longhorn.io
spec:
group: longhorn.io
names:
kind: Setting
listKind: SettingList
plural: settings
shortNames:
- lhs
singular: setting
scope: Namespaced
version: v1beta1
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: Volume
name: volumes.longhorn.io
spec:
group: longhorn.io
names:
kind: Volume
listKind: VolumeList
plural: volumes
shortNames:
- lhv
singular: volume
scope: Namespaced
version: v1beta1
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: EngineImage
name: engineimages.longhorn.io
spec:
group: longhorn.io
names:
kind: EngineImage
listKind: EngineImageList
plural: engineimages
shortNames:
- lhei
singular: engineimage
scope: Namespaced
version: v1beta1
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: Node
name: nodes.longhorn.io
spec:
group: longhorn.io
names:
kind: Node
listKind: NodeList
plural: nodes
shortNames:
- lhn
singular: node
scope: Namespaced
version: v1beta1
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: InstanceManager
name: instancemanagers.longhorn.io
spec:
group: longhorn.io
names:
kind: InstanceManager
listKind: InstanceManagerList
plural: instancemanagers
shortNames:
- lhim
singular: instancemanager
scope: Namespaced
version: v1beta1
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
labels:
longhorn-manager: Engine
name: engines.longhorn.rancher.io name: engines.longhorn.rancher.io
spec: spec:
group: longhorn.rancher.io group: longhorn.rancher.io
......
...@@ -29,8 +29,6 @@ spec: ...@@ -29,8 +29,6 @@ spec:
- "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}" - "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
- --manager-url - --manager-url
- http://longhorn-backend:9500/v1 - http://longhorn-backend:9500/v1
- --driver
- "{{ .Values.driver }}"
env: env:
- name: POD_NAMESPACE - name: POD_NAMESPACE
valueFrom: valueFrom:
...@@ -44,8 +42,6 @@ spec: ...@@ -44,8 +42,6 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: spec.serviceAccountName fieldPath: spec.serviceAccountName
- name: FLEXVOLUME_DIR
value: {{ .Values.persistence.flexvolumePath }}
{{- if .Values.csi.kubeletRootDir }} {{- if .Values.csi.kubeletRootDir }}
- name: KUBELET_ROOT_DIR - name: KUBELET_ROOT_DIR
value: {{ .Values.csi.kubeletRootDir }} value: {{ .Values.csi.kubeletRootDir }}
......
...@@ -20,8 +20,6 @@ spec: ...@@ -20,8 +20,6 @@ spec:
command: command:
- longhorn-manager - longhorn-manager
- post-upgrade - post-upgrade
- --from-version
- 0.0.1
env: env:
- name: POD_NAMESPACE - name: POD_NAMESPACE
valueFrom: valueFrom:
......
...@@ -9,7 +9,7 @@ metadata: ...@@ -9,7 +9,7 @@ metadata:
annotations: annotations:
storageclass.beta.kubernetes.io/is-default-class: "false" storageclass.beta.kubernetes.io/is-default-class: "false"
{{- end }} {{- end }}
provisioner: rancher.io/longhorn provisioner: driver.longhorn.io
parameters: parameters:
numberOfReplicas: "{{ .Values.persistence.defaultClassReplicaCount }}" numberOfReplicas: "{{ .Values.persistence.defaultClassReplicaCount }}"
staleReplicaTimeout: "30" staleReplicaTimeout: "30"
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
image: image:
longhorn: longhorn:
engine: longhornio/longhorn-engine engine: longhornio/longhorn-engine
engineTag: v0.6.2 engineTag: v0.7.0
manager: longhornio/longhorn-manager manager: longhornio/longhorn-manager
managerTag: v0.6.2 managerTag: v0.7.0
ui: longhornio/longhorn-ui ui: longhornio/longhorn-ui
uiTag: v0.6.2 uiTag: v0.7.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
service: service:
...@@ -19,13 +19,7 @@ service: ...@@ -19,13 +19,7 @@ service:
type: ClusterIP type: ClusterIP
nodePort: "" nodePort: ""
# deploy either 'flexvolume' or 'csi' driver
driver: csi
persistence: persistence:
# for GKE uses /home/kubernetes/flexvolume/ instead, User can find the correct directory by running ps aux|grep kubelet on the host and check the --volume-plugin-dir parameter.
# If there is none, the default /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ will be used.
flexvolumePath:
defaultClass: true defaultClass: true
defaultClassReplicaCount: 3 defaultClassReplicaCount: 3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment