commit
66f26a9c3d
@ -27,7 +27,7 @@ You can read more technical details of Longhorn [here](http://rancher.com/micros
|
||||
|
||||
Longhorn is beta-quality software. We appreciate your willingness to deploy Longhorn and provide feedback.
|
||||
|
||||
The latest release of Longhorn is **v0.8.0**.
|
||||
The latest release of Longhorn is **v0.8.1**.
|
||||
|
||||
## Source code
|
||||
Longhorn is 100% open source software. Project source code is spread across a number of repos:
|
||||
|
@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: longhorn
|
||||
version: 0.8.0
|
||||
appVersion: v0.8.0
|
||||
version: 0.8.1
|
||||
appVersion: v0.8.1
|
||||
kubeVersion: ">=v1.14.0-r0"
|
||||
description: Longhorn is a distributed block storage system for Kubernetes powered by Rancher Labs.
|
||||
keywords:
|
||||
@ -11,13 +11,14 @@ keywords:
|
||||
- block
|
||||
- device
|
||||
- iscsi
|
||||
home: https://github.com/rancher/longhorn
|
||||
home: https://github.com/longhorn/longhorn
|
||||
sources:
|
||||
- https://github.com/rancher/longhorn
|
||||
- https://github.com/rancher/longhorn-engine
|
||||
- https://github.com/rancher/longhorn-manager
|
||||
- https://github.com/rancher/longhorn-ui
|
||||
- https://github.com/rancher/longhorn-tests
|
||||
- https://github.com/longhorn/longhorn
|
||||
- https://github.com/longhorn/longhorn-engine
|
||||
- https://github.com/longhorn/longhorn-instance-manager
|
||||
- https://github.com/longhorn/longhorn-manager
|
||||
- https://github.com/longhorn/longhorn-ui
|
||||
- https://github.com/longhorn/longhorn-tests
|
||||
maintainers:
|
||||
- name: rancher
|
||||
email: charts@rancher.com
|
||||
|
@ -9,8 +9,9 @@ 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:
|
||||
|
||||
1. Longhorn Engine -- Core controller/replica logic https://github.com/longhorn/longhorn-engine
|
||||
2. Longhorn Manager -- Longhorn orchestration, includes CSI driver for Kubernetes https://github.com/longhorn/longhorn-manager
|
||||
3. Longhorn UI -- Dashboard https://github.com/longhorn/longhorn-ui
|
||||
2. Longhorn Instance Manager -- Controller/replica instance lifecycle management https://github.com/longhorn/longhorn-instance-manager
|
||||
3. 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
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@ -38,8 +39,8 @@ If your CRD instances or the CRDs themselves can't be deleted for whatever reaso
|
||||
|
||||
```
|
||||
# Delete CRD instances and definitions
|
||||
curl -s https://raw.githubusercontent.com/longhorn/longhorn-manager/master/hack/cleancrds.sh |bash -s v062
|
||||
curl -s https://raw.githubusercontent.com/longhorn/longhorn-manager/master/hack/cleancrds.sh |bash -s v070
|
||||
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v0.8.1/scripts/cleanup.sh |bash -s v062
|
||||
curl -s https://raw.githubusercontent.com/longhorn/longhorn/v0.8.1/scripts/cleanup.sh |bash -s v070
|
||||
```
|
||||
|
||||
---
|
||||
|
@ -4,4 +4,4 @@ Longhorn is a lightweight, reliable and easy to use distributed block storage sy
|
||||
|
||||
Longhorn creates a dedicated storage controller for each volume and synchronously replicates the volume across multiple replicas stored on multiple nodes. The storage controller and replicas are themselves orchestrated using Kubernetes. Longhorn supports snapshots, backups and even allows you to schedule recurring snapshots and backups!
|
||||
|
||||
[Chart Documentation](https://github.com/rancher/longhorn/blob/master/docs/chart.md)
|
||||
[Chart Documentation](https://github.com/longhorn/longhorn/blob/master/chart/README.md)
|
||||
|
@ -1,27 +1,111 @@
|
||||
categories:
|
||||
- storage
|
||||
labels:
|
||||
io.rancher.certified: experimental
|
||||
namespace: longhorn-system
|
||||
questions:
|
||||
- variable: csi.attacherImage
|
||||
default:
|
||||
description: "Specify CSI attacher image. Leave blank to autodetect."
|
||||
- variable: image.defaultImage
|
||||
default: "true"
|
||||
description: "Use default Longhorn images"
|
||||
label: Use Default Images
|
||||
type: boolean
|
||||
show_subquestion_if: false
|
||||
group: "Longhorn Images"
|
||||
subquestions:
|
||||
- variable: image.longhorn.manager
|
||||
default: longhornio/longhorn-manager
|
||||
description: "Specify Longhorn Manager Image Name"
|
||||
type: string
|
||||
label: Longhorn Manager Image Name
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.managerTag
|
||||
default: v0.8.1
|
||||
description: "Specify Longhorn Manager Image Tag"
|
||||
type: string
|
||||
label: Longhorn Manager Image Tag
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.engine
|
||||
default: longhornio/longhorn-engine
|
||||
description: "Specify Longhorn Engine Image Name"
|
||||
type: string
|
||||
label: Longhorn Engine Image Name
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.engineTag
|
||||
default: v0.8.1
|
||||
description: "Specify Longhorn Engine Image Tag"
|
||||
type: string
|
||||
label: Longhorn Engine Image Tag
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.ui
|
||||
default: longhornio/longhorn-ui
|
||||
description: "Specify Longhorn UI Image Name"
|
||||
type: string
|
||||
label: Longhorn UI Image Name
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.uiTag
|
||||
default: v0.8.1
|
||||
description: "Specify Longhorn UI Image Tag"
|
||||
type: string
|
||||
label: Longhorn UI Image Tag
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.instanceManager
|
||||
default: longhornio/longhorn-instance-manager
|
||||
description: "Specify Longhorn Instance Manager Image Name"
|
||||
type: string
|
||||
label: Longhorn Instance Manager Image Name
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: image.longhorn.instanceManagerTag
|
||||
default: v1_20200301
|
||||
description: "Specify Longhorn Instance Manager Image Tag"
|
||||
type: string
|
||||
label: Longhorn Manager Image Tag
|
||||
group: "Longhorn Images Settings"
|
||||
- variable: csi.attacherImage
|
||||
default:
|
||||
description: "Specify CSI attacher image. Leave blank to autodetect."
|
||||
type: string
|
||||
label: Longhorn CSI Attacher Image
|
||||
group: "Longhorn CSI Driver Images"
|
||||
- variable: csi.provisionerImage
|
||||
default:
|
||||
description: "Specify CSI provisioner image. Leave blank to autodetect."
|
||||
type: string
|
||||
label: Longhorn CSI Provisioner Image
|
||||
group: "Longhorn CSI Driver Images"
|
||||
- variable: csi.driverRegistrarImage
|
||||
default:
|
||||
description: "Specify CSI Driver Registrar image. Leave blank to autodetect."
|
||||
type: string
|
||||
label: Longhorn CSI Driver Registrar Image
|
||||
group: "Longhorn CSI Driver Images"
|
||||
- variable: csi.resizerImage
|
||||
default:
|
||||
description: "Specify CSI Driver Resizer image. Leave blank to autodetect."
|
||||
type: string
|
||||
label: Longhorn CSI Driver Resizer Image
|
||||
group: "Longhorn CSI Driver Images"
|
||||
- variable: privateRegistry.registryUrl
|
||||
label: Private registry URL
|
||||
description: "URL of private registry"
|
||||
group: "Private Registry Settings"
|
||||
type: string
|
||||
label: Longhorn CSI Attacher Image
|
||||
group: "Longhorn CSI Driver Settings"
|
||||
- variable: csi.provisionerImage
|
||||
default:
|
||||
description: "Specify CSI provisioner image. Leave blank to autodetect."
|
||||
default: ""
|
||||
- variable: privateRegistry.registryUser
|
||||
label: Private registry user
|
||||
description: "User used to authenticate to private registry"
|
||||
group: "Private Registry Settings"
|
||||
type: string
|
||||
label: Longhorn CSI Provisioner Image
|
||||
group: "Longhorn CSI Driver Settings"
|
||||
- variable: csi.driverRegistrarImage
|
||||
default:
|
||||
description: "Specify CSI Driver Registrar image. Leave blank to autodetect."
|
||||
default: ""
|
||||
- variable: privateRegistry.registryPasswd
|
||||
label: Private registry password
|
||||
description: "Password used to authenticate to private registry"
|
||||
group: "Private Registry Settings"
|
||||
type: password
|
||||
default: ""
|
||||
- variable: defaultSettings.registrySecret
|
||||
label: Private registry secret
|
||||
description: "The Kubernetes Secret name"
|
||||
group: "Longhorn Default Settings"
|
||||
type: string
|
||||
label: Longhorn CSI Driver Registrar Image
|
||||
group: "Longhorn CSI Driver Settings"
|
||||
default: ""
|
||||
- variable: csi.kubeletRootDir
|
||||
default:
|
||||
description: "Specify kubelet root-dir. Leave blank to autodetect."
|
||||
@ -59,7 +143,6 @@ questions:
|
||||
min: 1
|
||||
max: 10
|
||||
label: Default Storage Class Replica Count
|
||||
|
||||
- variable: defaultSettings.backupTarget
|
||||
label: Backup Target
|
||||
description: "The target used for backup. Support NFS or S3."
|
||||
|
@ -20,3 +20,8 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- $fullname := (include "longhorn.fullname" .) -}}
|
||||
{{- printf "http://%s-backend:9500" $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "secret" }}
|
||||
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.privateRegistry.registryUrl (printf "%s:%s" .Values.privateRegistry.registryUser .Values.privateRegistry.registryPasswd | b64enc) | b64enc }}
|
||||
{{- end }}
|
||||
|
@ -10,7 +10,7 @@ rules:
|
||||
verbs:
|
||||
- "*"
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "events", "persistentvolumes", "persistentvolumeclaims", "nodes", "proxy/nodes", "pods/log", "secrets", "services", "endpoints", "configmaps"]
|
||||
resources: ["pods", "events", "persistentvolumes", "persistentvolumeclaims","persistentvolumeclaims/status", "nodes", "proxy/nodes", "pods/log", "secrets", "services", "endpoints", "configmaps"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
@ -34,7 +34,3 @@ rules:
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["*"]
|
||||
# to be removed after v0.7.0
|
||||
- apiGroups: ["longhorn.rancher.io"]
|
||||
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"]
|
||||
verbs: ["*"]
|
||||
|
@ -135,129 +135,3 @@ spec:
|
||||
version: v1beta1
|
||||
subresources:
|
||||
status: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: Engine
|
||||
name: engines.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: Engine
|
||||
listKind: EngineList
|
||||
plural: engines
|
||||
shortNames:
|
||||
- lhe
|
||||
singular: engine
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: Replica
|
||||
name: replicas.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: Replica
|
||||
listKind: ReplicaList
|
||||
plural: replicas
|
||||
shortNames:
|
||||
- lhr
|
||||
singular: replica
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: Setting
|
||||
name: settings.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: Setting
|
||||
listKind: SettingList
|
||||
plural: settings
|
||||
shortNames:
|
||||
- lhs
|
||||
singular: setting
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: Volume
|
||||
name: volumes.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: Volume
|
||||
listKind: VolumeList
|
||||
plural: volumes
|
||||
shortNames:
|
||||
- lhv
|
||||
singular: volume
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: EngineImage
|
||||
name: engineimages.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: EngineImage
|
||||
listKind: EngineImageList
|
||||
plural: engineimages
|
||||
shortNames:
|
||||
- lhei
|
||||
singular: engineimage
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: Node
|
||||
name: nodes.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: Node
|
||||
listKind: NodeList
|
||||
plural: nodes
|
||||
shortNames:
|
||||
- lhn
|
||||
singular: node
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
longhorn-manager: InstanceManager
|
||||
name: instancemanagers.longhorn.rancher.io
|
||||
spec:
|
||||
group: longhorn.rancher.io
|
||||
names:
|
||||
kind: InstanceManager
|
||||
listKind: InstanceManagerList
|
||||
plural: instancemanagers
|
||||
shortNames:
|
||||
- lhim
|
||||
singular: instancemanager
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
@ -35,6 +35,9 @@ spec:
|
||||
ports:
|
||||
- containerPort: 9500
|
||||
name: manager
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 9500
|
||||
volumeMounts:
|
||||
- name: dev
|
||||
mountPath: /host/dev/
|
||||
@ -60,8 +63,6 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: LONGHORN_BACKEND_SVC
|
||||
value: longhorn-backend
|
||||
- name: DEFAULT_SETTING_PATH
|
||||
value: /var/lib/longhorn-setting/default-setting.yaml
|
||||
volumes:
|
||||
@ -80,6 +81,10 @@ spec:
|
||||
- name: longhorn-default-setting
|
||||
configMap:
|
||||
name: longhorn-default-setting
|
||||
{{- if .Values.defaultSettings.registrySecret }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.defaultSettings.registrySecret }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
|
@ -18,3 +18,4 @@ data:
|
||||
default-longhorn-static-storage-class: {{ .Values.defaultSettings.defaultLonghornStaticStorageClass }}
|
||||
backupstore-poll-interval: {{ .Values.defaultSettings.backupstorePollInterval }}
|
||||
taint-toleration: {{ .Values.defaultSettings.taintToleration }}
|
||||
registry-secret: {{ .Values.defaultSettings.registrySecret }}
|
||||
|
@ -54,9 +54,13 @@ spec:
|
||||
- name: CSI_PROVISIONER_IMAGE
|
||||
value: {{ .Values.csi.provisionerImage }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.driverRegistrarImage }}
|
||||
- name: CSI_DRIVER_REGISTRAR_IMAGE
|
||||
value: {{ .Values.csi.driverRegistrarImage }}
|
||||
{{- if .Values.csi.nodeDriverRegistrarImage }}
|
||||
- name: CSI_NODE_DRIVER_REGISTRAR_IMAGE
|
||||
value: {{ .Values.csi.nodeDriverRegistrarImage }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.resizerImage }}
|
||||
- name: CSI_RESIZER_IMAGE
|
||||
value: {{ .Values.csi.resizerImage }}
|
||||
{{- end }}
|
||||
{{- if .Values.csi.attacherReplicaCount }}
|
||||
- name: CSI_ATTACHER_REPLICA_COUNT
|
||||
@ -66,4 +70,8 @@ spec:
|
||||
- name: CSI_PROVISIONER_REPLICA_COUNT
|
||||
value: "{{ .Values.csi.provisionerReplicaCount }}"
|
||||
{{- end }}
|
||||
{{- if .Values.defaultSettings.registrySecret }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.defaultSettings.registrySecret }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
|
@ -18,12 +18,17 @@ spec:
|
||||
containers:
|
||||
- name: longhorn-ui
|
||||
image: "{{ .Values.image.longhorn.ui }}:{{ .Values.image.longhorn.uiTag }}"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
env:
|
||||
- name: LONGHORN_MANAGER_IP
|
||||
value: "http://longhorn-backend:9500"
|
||||
{{- if .Values.defaultSettings.registrySecret }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.defaultSettings.registrySecret }}
|
||||
{{- end }}
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
|
@ -26,4 +26,8 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
restartPolicy: OnFailure
|
||||
{{- if .Values.defaultSettings.registrySecret }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.defaultSettings.registrySecret }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
|
9
chart/templates/registry-secret.yml
Normal file
9
chart/templates/registry-secret.yml
Normal file
@ -0,0 +1,9 @@
|
||||
{{- if .Values.defaultSettings.registrySecret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Values.defaultSettings.registrySecret }}
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: {{ template "secret" . }}
|
||||
{{- end }}
|
@ -10,6 +10,7 @@ metadata:
|
||||
storageclass.beta.kubernetes.io/is-default-class: "false"
|
||||
{{- end }}
|
||||
provisioner: driver.longhorn.io
|
||||
allowVolumeExpansion: true
|
||||
parameters:
|
||||
numberOfReplicas: "{{ .Values.persistence.defaultClassReplicaCount }}"
|
||||
staleReplicaTimeout: "30"
|
||||
|
@ -27,4 +27,8 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
restartPolicy: OnFailure
|
||||
{{- if .Values.defaultSettings.registrySecret }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Values.defaultSettings.registrySecret }}
|
||||
{{- end }}
|
||||
serviceAccountName: longhorn-service-account
|
||||
|
@ -4,11 +4,11 @@
|
||||
image:
|
||||
longhorn:
|
||||
engine: longhornio/longhorn-engine
|
||||
engineTag: v0.8.0
|
||||
engineTag: v0.8.1
|
||||
manager: longhornio/longhorn-manager
|
||||
managerTag: v0.8.0
|
||||
managerTag: v0.8.1
|
||||
ui: longhornio/longhorn-ui
|
||||
uiTag: v0.8.0
|
||||
uiTag: v0.8.1
|
||||
instanceManager: longhornio/longhorn-instance-manager
|
||||
instanceManagerTag: v1_20200301
|
||||
pullPolicy: IfNotPresent
|
||||
@ -28,7 +28,8 @@ persistence:
|
||||
csi:
|
||||
attacherImage:
|
||||
provisionerImage:
|
||||
driverRegistrarImage:
|
||||
nodeDriverRegistrarImage:
|
||||
resizerImage:
|
||||
kubeletRootDir:
|
||||
attacherReplicaCount:
|
||||
provisionerReplicaCount:
|
||||
@ -47,6 +48,12 @@ defaultSettings:
|
||||
defaultLonghornStaticStorageClass:
|
||||
backupstorePollInterval:
|
||||
taintToleration:
|
||||
registrySecret:
|
||||
|
||||
privateRegistry:
|
||||
registryUrl:
|
||||
registryUser:
|
||||
registryPasswd:
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
|
@ -45,10 +45,6 @@ rules:
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["*"]
|
||||
# to be removed after v0.7.0
|
||||
- apiGroups: ["longhorn.rancher.io"]
|
||||
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"]
|
||||
verbs: ["*"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
@ -221,6 +217,7 @@ data:
|
||||
default-longhorn-static-storage-class:
|
||||
backupstore-poll-interval:
|
||||
taint-toleration:
|
||||
registry-secret:
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
@ -240,7 +237,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-manager
|
||||
image: longhornio/longhorn-manager:v0.8.0
|
||||
image: longhornio/longhorn-manager:v0.8.1
|
||||
imagePullPolicy: Always
|
||||
securityContext:
|
||||
privileged: true
|
||||
@ -249,15 +246,16 @@ spec:
|
||||
- -d
|
||||
- daemon
|
||||
- --engine-image
|
||||
- longhornio/longhorn-engine:v0.8.0
|
||||
- longhornio/longhorn-engine:v0.8.1
|
||||
- --instance-manager-image
|
||||
- longhornio/longhorn-instance-manager:v1_20200301
|
||||
- --manager-image
|
||||
- longhornio/longhorn-manager:v0.8.0
|
||||
- longhornio/longhorn-manager:v0.8.1
|
||||
- --service-account
|
||||
- longhorn-service-account
|
||||
ports:
|
||||
- containerPort: 9500
|
||||
name: manager
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 9500
|
||||
@ -305,25 +303,29 @@ spec:
|
||||
- name: longhorn-default-setting
|
||||
configMap:
|
||||
name: longhorn-default-setting
|
||||
# imagePullSecrets:
|
||||
# - name: ""
|
||||
serviceAccountName: longhorn-service-account
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: "100%"
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: longhorn-manager
|
||||
name: longhorn-backend
|
||||
namespace: longhorn-system
|
||||
spec:
|
||||
type: ClusterIP
|
||||
sessionAffinity: ClientIP
|
||||
selector:
|
||||
app: longhorn-manager
|
||||
ports:
|
||||
- port: 9500
|
||||
targetPort: 9500
|
||||
sessionAffinity: ClientIP
|
||||
- name: manager
|
||||
port: 9500
|
||||
targetPort: manager
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@ -344,13 +346,16 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-ui
|
||||
image: longhornio/longhorn-ui:v0.8.0
|
||||
image: longhornio/longhorn-ui:v0.8.1
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
env:
|
||||
- name: LONGHORN_MANAGER_IP
|
||||
value: "http://longhorn-backend:9500"
|
||||
serviceAccountName: longhorn-service-account
|
||||
# imagePullSecrets:
|
||||
# - name:
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
@ -385,29 +390,20 @@ spec:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-longhorn-manager
|
||||
image: longhornio/longhorn-manager:v0.8.0
|
||||
image: longhornio/longhorn-manager:v0.8.1
|
||||
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:v0.8.0
|
||||
image: longhornio/longhorn-manager:v0.8.1
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- longhorn-manager
|
||||
- -d
|
||||
- deploy-driver
|
||||
- --manager-image
|
||||
- longhornio/longhorn-manager:v0.8.0
|
||||
- longhornio/longhorn-manager:v0.8.1
|
||||
- --manager-url
|
||||
- http://longhorn-backend:9500/v1
|
||||
# manually set root directory for csi
|
||||
#- --kubelet-root-dir
|
||||
#- /var/lib/rancher/k3s/agent/kubelet
|
||||
# manually specify number of CSI attacher replicas
|
||||
#- --csi-attacher-replica-count
|
||||
#- "3"
|
||||
# manually specify number of CSI provisioner replicas
|
||||
#- --csi-provisioner-replica-count
|
||||
#- "3"
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
@ -421,6 +417,27 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
# Manually set root directory for csi
|
||||
#- name: KUBELET_ROOT_DIR
|
||||
# value: /var/lib/rancher/k3s/agent/kubelet
|
||||
# For AirGap Installation
|
||||
# Replace PREFIX with your private registery
|
||||
#- name: CSI_ATTACHER_IMAGE
|
||||
# value: PREFIX/csi-attacher:v2.0.0
|
||||
#- name: CSI_PROVISIONER_IMAGE
|
||||
# value: PREFIX/csi-provisioner:v1.4.0
|
||||
#- name: CSI_NODE_DRIVER_REGISTRAR_IMAGE
|
||||
# value: PREFIX/csi-node-driver-registrar:v1.2.0
|
||||
#- name: CSI_RESIZER_IMAGE
|
||||
# value: PREFIX/csi-resizer:v0.3.0
|
||||
# Manually specify number of CSI attacher replicas
|
||||
#- name: CSI_ATTACHER_REPLICA_COUNT
|
||||
# value: "3"
|
||||
# Manually specify number of CSI provisioner replicas
|
||||
#- name: CSI_PROVISIONER_REPLICA_COUNT
|
||||
# value: "3"
|
||||
#imagePullSecrets:
|
||||
#- name:
|
||||
serviceAccountName: longhorn-service-account
|
||||
---
|
||||
kind: StorageClass
|
||||
|
@ -41,12 +41,13 @@ exec_command() {
|
||||
|
||||
INSTANCE_MANAGER_NAME_FILTER="{.items[?(@.spec.volumeName==\"${VOLUME_NAME}\")].status.instanceManagerName}"
|
||||
INSTANCE_MANAGER_NAME=`kubectl -n ${NS} get lhe --output=jsonpath="${INSTANCE_MANAGER_NAME_FILTER}"`
|
||||
|
||||
|
||||
ENGINE_PORT_FILTER="{.items[?(@.spec.volumeName==\"${VOLUME_NAME}\")].status.port}"
|
||||
ENGINE_PORT=`kubectl -n ${NS} get lhe --output=jsonpath="${ENGINE_PORT_FILTER}"`
|
||||
|
||||
kubectl -n ${NS} exec -it ${INSTANCE_MANAGER_NAME} -- bash -c "longhorn --url localhost:${ENGINE_PORT} ${COMMAND_ARGS}"
|
||||
|
||||
LONGHORN_BIN_PATH=`kubectl -n ${NS} exec -it ${INSTANCE_MANAGER_NAME} -- bash -c "ps -eo command | grep \" ${VOLUME_NAME} \" | grep -v grep | awk '{ printf(\"%s\", \\$1)}'"`
|
||||
|
||||
kubectl -n ${NS} exec -it ${INSTANCE_MANAGER_NAME} -- bash -c "${LONGHORN_BIN_PATH} --url localhost:${ENGINE_PORT} ${COMMAND_ARGS}"
|
||||
}
|
||||
|
||||
|
||||
|
35
scripts/migrate-for-pre-070-volumes.sh
Executable file
35
scripts/migrate-for-pre-070-volumes.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NS="longhorn-system"
|
||||
|
||||
print_usage() {
|
||||
echo "Usage: ${0} [ |-h|--help] [volume_name|--all]"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " ${0} test-vol"
|
||||
echo " ${0} --all"
|
||||
echo ""
|
||||
echo "Note: Must have Longhorn installed in "longhorn-system" namespace"
|
||||
echo ""
|
||||
exit 0
|
||||
}
|
||||
|
||||
exec_command() {
|
||||
COMMAND_ARG="${@}"
|
||||
LONGHORN_MANAGER=$(kubectl -n ${NS} get po -l "app=longhorn-manager" | tr '\000' '\n' | sed -n '2p' | awk '{print $1}')
|
||||
kubectl -n ${NS} exec -it ${LONGHORN_MANAGER} -- bash -c "longhorn-manager migrate-for-pre-070-volumes ${COMMAND_ARG}"
|
||||
}
|
||||
|
||||
|
||||
ARG=$1
|
||||
case $ARG in
|
||||
"" | "-h" | "--help")
|
||||
print_usage
|
||||
;;
|
||||
*)
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Command args number shouldn't be greater than 1"
|
||||
fi
|
||||
exec_command ${@}
|
||||
;;
|
||||
esac
|
@ -58,7 +58,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-uninstall
|
||||
image: longhornio/longhorn-manager:v0.8.0
|
||||
image: longhornio/longhorn-manager:v0.8.1
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- longhorn-manager
|
||||
|
Loading…
Reference in New Issue
Block a user