Commit 680c0e4f by James Oliver Committed by Sheng Yang

Update templates for v0.3.0

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