Commit 680c0e4f by James Oliver Committed by Sheng Yang

Update templates for v0.3.0

parent 07b4164f
apiVersion: v1
description: Longhorn is a distributed block storage system for Kubernetes powered by Rancher Labs.
name: longhorn
version: 0.1.0
version: 0.3.0
kubeVersion: ^1.8.x
description: Longhorn is a distributed block storage system for Kubernetes powered by Rancher Labs.
keywords:
- longhorn
- storage
- distributed
- block
- device
- iscsi
home: https://github.com/rancher/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
maintainers:
- name: Rancher Labs
email: charts@rancher.com
icon: https://s3.us-east-2.amazonaws.com/longhorn-assets/longhorn-logo.svg
# Longhorn
Longhorn is a lightweight, reliable and easy to use distributed block sotrage system for Kubernetes. Once deployed, users can leverage peristenv volumes provided by Longhorn.
Longhorn is a lightweight, reliable and easy to use distributed block storage system for Kubernetes. Once deployed, users can leverage persistent volumes provided by Longhorn.
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!
......@@ -2,45 +2,24 @@ categories:
- storage
labels:
io.rancher.certified: experimental
namespace: longhorn-system
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker image"
label: Use Default Image
type: boolean
group: "Container Images"
show_subquestion_if: false
- variable: driver
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 Settings"
show_subquestion_if: flexvolume
subquestions:
- variable: image.longhorn.engine
default: "rancher/longhorn-engine"
description: "longhorn engine image name"
type: string
label: Longhorn Engine Image Name
- variable: image.longhorn.engineTag
default: "de88734"
description: "longhorn engineTag image tag"
- variable: persistence.flexvolumePath
default: "/var/lib/kubelet/volumeplugins"
description: "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 Engine Image Tag
- variable: image.longhorn.manager
default: "rancher/longhorn-manager"
description: "longhorn manager image name"
type: string
label: Longhorn Manager Image Name
- variable: image.longhorn.managerTag
default: "1ebf5cb"
description: "longhorn managerTag image tag"
type: string
label: Longhorn Manager Image Tag
- variable: image.longhorn.ui
default: "rancher/longhorn-ui"
description: "longhorn ui image name"
type: string
label: Longhorn UI Image Name
- variable: image.longhorn.uiTag
default: "1455f4f"
description: "longhorn uiTag image tag"
type: string
label: Longhorn UI Image Tag
label: Longhorn Flexvolume Path
- variable: persistence.defaultClass
default: "true"
description: "Set as default StorageClass"
......@@ -48,12 +27,6 @@ questions:
type: boolean
required: true
label: Default Storage Class
- variable: persistence.flexvolumePath
default: "/var/lib/kubelet/volumeplugins"
description: "For GKE uses `/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
group: "Longhorn Settings"
- variable: ingress.enabled
default: "true"
description: "Expose app using Layer 7 Load Balancer - ingress"
......@@ -75,6 +48,7 @@ questions:
options:
- "ClusterIP"
- "NodePort"
- "LoadBalancer"
label: Longhorn UI Service
show_if: "ingress.enabled=false"
group: "Services and Load Balancing"
......@@ -86,5 +60,5 @@ questions:
type: int
min: 30000
max: 32767
show_if: "service.ui.type=NodePort"
show_if: "service.ui.type=NodePort||service.ui.type=LoadBalancer"
label: UI Service NodePort number
......@@ -10,29 +10,20 @@ rules:
verbs:
- "*"
- apiGroups: [""]
resources: ["pods", "events", "persistentvolumes", "persistentvolumeclaims", "nodes", "proxy/nodes"]
resources: ["pods", "events", "persistentvolumes", "persistentvolumeclaims", "nodes", "proxy/nodes", "pods/log", "secrets", "services"]
verbs: ["*"]
- apiGroups: ["extensions"]
resources: ["daemonsets"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["daemonsets", "statefulsets"]
verbs: ["*"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["*"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["*"]
- apiGroups: ["longhorn.rancher.io"]
resources: ["nodes"]
verbs: ["*"]
- apiGroups: ["longhorn.rancher.io"]
resources: ["volumes"]
verbs: ["*"]
- apiGroups: ["longhorn.rancher.io"]
resources: ["engines"]
verbs: ["*"]
- apiGroups: ["longhorn.rancher.io"]
resources: ["replicas"]
resources: ["storageclasses", "volumeattachments"]
verbs: ["*"]
- apiGroups: ["longhorn.rancher.io"]
resources: ["settings"]
resources: ["volumes", "engines", "replicas", "settings", "engineimages", "nodes"]
verbs: ["*"]
......@@ -69,3 +69,39 @@ spec:
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: extensions/v1beta1
apiVersion: apps/v1beta2
kind: DaemonSet
metadata:
labels:
......@@ -6,18 +6,14 @@ metadata:
name: longhorn-manager
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: longhorn-manager
template:
metadata:
labels:
app: longhorn-manager
spec:
initContainers:
- name: init-container
image: "{{ .Values.image.longhorn.engine }}:{{ .Values.image.longhorn.engineTag }}"
command: ['sh', '-c', 'cp /usr/local/bin/* /data/']
volumeMounts:
- name: execbin
mountPath: /data/
containers:
- name: longhorn-manager
image: "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
......@@ -46,8 +42,7 @@ spec:
mountPath: /var/run/
- name: longhorn
mountPath: /var/lib/rancher/longhorn/
- name: execbin
mountPath: /usr/local/bin/
mountPropagation: Bidirectional
env:
- name: POD_NAMESPACE
valueFrom:
......@@ -76,12 +71,10 @@ spec:
- name: longhorn
hostPath:
path: /var/lib/rancher/longhorn/
- name: execbin
emptyDir: {}
serviceAccountName: longhorn-service-account
---
kind: Service
apiVersion: v1
kind: Service
metadata:
labels:
app: longhorn-manager
......
apiVersion: apps/v1beta1
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: longhorn-flexvolume-driver-deployer
name: longhorn-driver-deployer
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: longhorn-driver-deployer
template:
metadata:
labels:
app: longhorn-flexvolume-driver-deployer
app: longhorn-driver-deployer
spec:
initContainers:
- name: wait-longhorn-manager
image: "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
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-flexvolume-driver-deployer
- name: longhorn-driver-deployer
image: "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
imagePullPolicy: Always
command:
- longhorn-manager
- -d
- deploy-flexvolume-driver
- deploy-driver
- --manager-image
- "{{ .Values.image.longhorn.manager }}:{{ .Values.image.longhorn.managerTag }}"
- --manager-url
- http://longhorn-backend:9500/v1
- --driver
- "{{ .Values.driver }}"
env:
- name: POD_NAMESPACE
valueFrom:
......@@ -29,6 +40,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: SERVICE_ACCOUNT
valueFrom:
fieldRef:
fieldPath: spec.serviceAccountName
- name: FLEXVOLUME_DIR
value: {{ .Values.persistence.flexvolumePath }}
serviceAccountName: longhorn-service-account
apiVersion: apps/v1beta1
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
app: {{ .Release.Name }}-ui
app: longhorn-ui
name: longhorn-ui
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: longhorn-ui
template:
metadata:
labels:
app: {{ .Release.Name }}-ui
app: longhorn-ui
spec:
containers:
- name: longhorn-ui
......@@ -26,13 +29,13 @@ kind: Service
apiVersion: v1
metadata:
labels:
app: {{ .Release.Name }}-ui
app: longhorn-ui
name: longhorn-frontend
namespace: {{ .Release.Namespace }}
spec:
type: {{ .Values.service.ui.type }}
selector:
app: {{ .Release.Name }}-ui
app: longhorn-ui
ports:
- name: longhorn-ui
port: 80
......
......@@ -2,9 +2,9 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ .Release.Name }}-ingress
name: longhorn-ingress
labels:
app: {{ .Release.Name }}-ingress
app: longhorn-ingress
annotations:
{{- if .Values.ingress.tls }}
ingress.kubernetes.io/secure-backends: "true"
......
......@@ -2,3 +2,4 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: longhorn-service-account
namespace: {{ .Release.Namespace }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .Release.Name }}
name: longhorn
{{- if .Values.persistence.defaultClass }}
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
......@@ -9,8 +9,9 @@ metadata:
annotations:
storageclass.beta.kubernetes.io/is-default-class: "false"
{{- end }}
provisioner: rancher.io/{{ .Release.Name }}
provisioner: rancher.io/longhorn
parameters:
numberOfReplicas: "3"
staleReplicaTimeout: "30"
fromBackup: ""
baseImage: ""
......@@ -3,9 +3,9 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}
name: longhorn
labels:
app: {{ .Release.Name }}
app: longhorn
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
......
......@@ -4,21 +4,24 @@
image:
longhorn:
engine: rancher/longhorn-engine
engineTag: de88734
engineTag: v0.3.0
manager: rancher/longhorn-manager
managerTag: 1ebf5cb
managerTag: v0.3.0
ui: rancher/longhorn-ui
uiTag: 1455f4f
uiTag: v0.3.0
pullPolicy: IfNotPresent
service:
ui:
type: NodePort
type: LoadBalancer
nodePort: ""
manager:
type: ClusterIP
nodePort: ""
# deploy either 'flexvolume' or 'csi' driver
driver: csi
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.
......
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