Sync with manager:
commit 7cefc46ec36e193bf78f15d3c306dee4b011e751 Author: Sheng Yang <sheng.yang@rancher.com> Date: Thu Nov 7 22:31:46 2019 -0800 Longhorn v0.7.0-rc1 release Signed-off-by: Sheng Yang <sheng.yang@rancher.com>
This commit is contained in:
parent
1f197678e1
commit
d2211cc23f
@ -33,11 +33,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: ["*"]
|
||||||
@ -60,9 +68,9 @@ kind: CustomResourceDefinition
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: Engine
|
longhorn-manager: Engine
|
||||||
name: engines.longhorn.rancher.io
|
name: engines.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: Engine
|
kind: Engine
|
||||||
listKind: EngineList
|
listKind: EngineList
|
||||||
@ -71,16 +79,18 @@ spec:
|
|||||||
- lhe
|
- lhe
|
||||||
singular: engine
|
singular: engine
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: Replica
|
longhorn-manager: Replica
|
||||||
name: replicas.longhorn.rancher.io
|
name: replicas.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: Replica
|
kind: Replica
|
||||||
listKind: ReplicaList
|
listKind: ReplicaList
|
||||||
@ -89,16 +99,18 @@ spec:
|
|||||||
- lhr
|
- lhr
|
||||||
singular: replica
|
singular: replica
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: Setting
|
longhorn-manager: Setting
|
||||||
name: settings.longhorn.rancher.io
|
name: settings.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: Setting
|
kind: Setting
|
||||||
listKind: SettingList
|
listKind: SettingList
|
||||||
@ -107,16 +119,16 @@ spec:
|
|||||||
- lhs
|
- lhs
|
||||||
singular: setting
|
singular: setting
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: Volume
|
longhorn-manager: Volume
|
||||||
name: volumes.longhorn.rancher.io
|
name: volumes.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: Volume
|
kind: Volume
|
||||||
listKind: VolumeList
|
listKind: VolumeList
|
||||||
@ -125,16 +137,18 @@ spec:
|
|||||||
- lhv
|
- lhv
|
||||||
singular: volume
|
singular: volume
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: EngineImage
|
longhorn-manager: EngineImage
|
||||||
name: engineimages.longhorn.rancher.io
|
name: engineimages.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: EngineImage
|
kind: EngineImage
|
||||||
listKind: EngineImageList
|
listKind: EngineImageList
|
||||||
@ -143,16 +157,18 @@ spec:
|
|||||||
- lhei
|
- lhei
|
||||||
singular: engineimage
|
singular: engineimage
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: Node
|
longhorn-manager: Node
|
||||||
name: nodes.longhorn.rancher.io
|
name: nodes.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: Node
|
kind: Node
|
||||||
listKind: NodeList
|
listKind: NodeList
|
||||||
@ -161,16 +177,18 @@ spec:
|
|||||||
- lhn
|
- lhn
|
||||||
singular: node
|
singular: node
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
---
|
---
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
longhorn-manager: InstanceManager
|
longhorn-manager: InstanceManager
|
||||||
name: instancemanagers.longhorn.rancher.io
|
name: instancemanagers.longhorn.io
|
||||||
spec:
|
spec:
|
||||||
group: longhorn.rancher.io
|
group: longhorn.io
|
||||||
names:
|
names:
|
||||||
kind: InstanceManager
|
kind: InstanceManager
|
||||||
listKind: InstanceManagerList
|
listKind: InstanceManagerList
|
||||||
@ -179,7 +197,9 @@ spec:
|
|||||||
- lhim
|
- lhim
|
||||||
singular: instancemanager
|
singular: instancemanager
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
version: v1alpha1
|
version: v1beta1
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
@ -220,7 +240,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: longhorn-manager
|
- name: longhorn-manager
|
||||||
image: longhornio/longhorn-manager:v0.6.2
|
image: longhornio/longhorn-manager:v0.7.0-rc1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
@ -229,9 +249,9 @@ spec:
|
|||||||
- -d
|
- -d
|
||||||
- daemon
|
- daemon
|
||||||
- --engine-image
|
- --engine-image
|
||||||
- longhornio/longhorn-engine:v0.6.2
|
- longhornio/longhorn-engine:v0.7.0-rc1
|
||||||
- --manager-image
|
- --manager-image
|
||||||
- longhornio/longhorn-manager:v0.6.2
|
- longhornio/longhorn-manager:v0.7.0-rc1
|
||||||
- --service-account
|
- --service-account
|
||||||
- longhorn-service-account
|
- longhorn-service-account
|
||||||
ports:
|
ports:
|
||||||
@ -316,7 +336,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: longhorn-ui
|
- name: longhorn-ui
|
||||||
image: longhornio/longhorn-ui:v0.6.2
|
image: longhornio/longhorn-ui:v0.7.0-rc1
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
env:
|
env:
|
||||||
@ -356,18 +376,18 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: wait-longhorn-manager
|
- name: wait-longhorn-manager
|
||||||
image: longhornio/longhorn-manager:v0.6.2
|
image: longhornio/longhorn-manager:v0.7.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']
|
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:
|
containers:
|
||||||
- name: longhorn-driver-deployer
|
- name: longhorn-driver-deployer
|
||||||
image: longhornio/longhorn-manager:v0.6.2
|
image: longhornio/longhorn-manager:v0.7.0-rc1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
command:
|
command:
|
||||||
- longhorn-manager
|
- longhorn-manager
|
||||||
- -d
|
- -d
|
||||||
- deploy-driver
|
- deploy-driver
|
||||||
- --manager-image
|
- --manager-image
|
||||||
- longhornio/longhorn-manager:v0.6.2
|
- longhornio/longhorn-manager:v0.7.0-rc1
|
||||||
- --manager-url
|
- --manager-url
|
||||||
- http://longhorn-backend:9500/v1
|
- http://longhorn-backend:9500/v1
|
||||||
# manually choose "flexvolume" or "csi"
|
# manually choose "flexvolume" or "csi"
|
||||||
|
32
examples/block_volume.yaml
Normal file
32
examples/block_volume.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: longhorn-block-vol
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
volumeMode: Block
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: block-volume-test
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: block-volume-test
|
||||||
|
image: nginx:stable-alpine
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
volumeDevices:
|
||||||
|
- devicePath: /dev/longhorn/testblk
|
||||||
|
name: block-vol
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumes:
|
||||||
|
- name: block-vol
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: longhorn-block-vol
|
@ -10,7 +10,7 @@ spec:
|
|||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
persistentVolumeReclaimPolicy: Delete
|
persistentVolumeReclaimPolicy: Delete
|
||||||
csi:
|
csi:
|
||||||
driver: io.rancher.longhorn
|
driver: driver.longhorn.io
|
||||||
fsType: ext4
|
fsType: ext4
|
||||||
volumeAttributes:
|
volumeAttributes:
|
||||||
numberOfReplicas: '3'
|
numberOfReplicas: '3'
|
||||||
|
@ -2,7 +2,7 @@ kind: StorageClass
|
|||||||
apiVersion: storage.k8s.io/v1
|
apiVersion: storage.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn
|
name: longhorn
|
||||||
provisioner: rancher.io/longhorn
|
provisioner: driver.longhorn.io
|
||||||
parameters:
|
parameters:
|
||||||
numberOfReplicas: "3"
|
numberOfReplicas: "3"
|
||||||
staleReplicaTimeout: "2880"
|
staleReplicaTimeout: "2880"
|
||||||
|
@ -24,7 +24,10 @@ rules:
|
|||||||
- apiGroups: ["batch"]
|
- apiGroups: ["batch"]
|
||||||
resources: ["jobs", "cronjobs"]
|
resources: ["jobs", "cronjobs"]
|
||||||
verbs: ["*"]
|
verbs: ["*"]
|
||||||
- apiGroups: ["longhorn.rancher.io"]
|
- apiGroups: ["storage.k8s.io"]
|
||||||
|
resources: ["csidrivers"]
|
||||||
|
verbs: ["*"]
|
||||||
|
- apiGroups: ["longhorn.io"]
|
||||||
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"]
|
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes", "instancemanagers"]
|
||||||
verbs: ["*"]
|
verbs: ["*"]
|
||||||
---
|
---
|
||||||
@ -55,7 +58,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: longhorn-uninstall
|
- name: longhorn-uninstall
|
||||||
image: longhornio/longhorn-manager:v0.6.2
|
image: longhornio/longhorn-manager:v0.7.0-rc1
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
command:
|
command:
|
||||||
- longhorn-manager
|
- longhorn-manager
|
||||||
|
Loading…
Reference in New Issue
Block a user