Sync with manager
commit 36b37fcb5955ef5b45ca53cb0dea630806d24541 Author: Sheng Yang <sheng.yang@rancher.com> Date: Wed Sep 18 18:03:02 2019 -0700 Longhorn v0.6.0-rc2 release Signed-off-by: Sheng Yang <sheng.yang@rancher.com>
This commit is contained in:
parent
15551d1add
commit
f1a19e3c61
@ -220,7 +220,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-manager
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc1
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc2
|
||||
imagePullPolicy: Always
|
||||
securityContext:
|
||||
privileged: true
|
||||
@ -229,9 +229,9 @@ spec:
|
||||
- -d
|
||||
- daemon
|
||||
- --engine-image
|
||||
- longhornio/longhorn-engine:v0.6.0-rc1
|
||||
- longhornio/longhorn-engine:v0.6.0-rc2
|
||||
- --manager-image
|
||||
- longhornio/longhorn-manager:v0.6.0-rc1
|
||||
- longhornio/longhorn-manager:v0.6.0-rc2
|
||||
- --service-account
|
||||
- longhorn-service-account
|
||||
ports:
|
||||
@ -316,7 +316,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-ui
|
||||
image: longhornio/longhorn-ui:v0.6.0-rc1
|
||||
image: longhornio/longhorn-ui:v0.6.0-rc2
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
@ -356,18 +356,18 @@ spec:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-longhorn-manager
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc1
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc2
|
||||
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.6.0-rc1
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc2
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- longhorn-manager
|
||||
- -d
|
||||
- deploy-driver
|
||||
- --manager-image
|
||||
- longhornio/longhorn-manager:v0.6.0-rc1
|
||||
- longhornio/longhorn-manager:v0.6.0-rc2
|
||||
- --manager-url
|
||||
- http://longhorn-backend:9500/v1
|
||||
# manually choose "flexvolume" or "csi"
|
||||
|
@ -14,7 +14,7 @@ spec:
|
||||
fsType: ext4
|
||||
volumeAttributes:
|
||||
numberOfReplicas: '3'
|
||||
staleReplicaTimeout: '30'
|
||||
staleReplicaTimeout: '2880'
|
||||
volumeHandle: existing-longhorn-volume
|
||||
---
|
||||
apiVersion: v1
|
||||
|
@ -30,6 +30,9 @@ metadata:
|
||||
labels:
|
||||
app: mysql
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mysql # has to match .spec.template.metadata.labels
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
|
@ -5,7 +5,7 @@ metadata:
|
||||
provisioner: rancher.io/longhorn
|
||||
parameters:
|
||||
numberOfReplicas: '3'
|
||||
staleReplicaTimeout: '30'
|
||||
staleReplicaTimeout: '2880'
|
||||
reclaimPolicy: Delete
|
||||
---
|
||||
apiVersion: v1
|
||||
|
@ -1,43 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
app: flexvol-baseimage
|
||||
name: flexvol-baseimage
|
||||
namespace: default
|
||||
spec:
|
||||
containers:
|
||||
- name: flexvol-baseimage
|
||||
image: nginx:stable-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: flexvol
|
||||
mountPath: /usr/share/nginx/html
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumes:
|
||||
- name: flexvol
|
||||
flexVolume:
|
||||
driver: rancher.io/longhorn
|
||||
options:
|
||||
size: 32Mi
|
||||
numberOfReplicas: "3"
|
||||
staleReplicaTimeout: "20"
|
||||
fromBackup: ""
|
||||
baseImage: rancher/longhorn-test:baseimage-ext4
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: flexvol-baseimage
|
||||
name: flexvol-baseimage
|
||||
namespace: default
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
port: 80
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: flexvol-baseimage
|
||||
type: LoadBalancer
|
@ -1,63 +0,0 @@
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
labels:
|
||||
app: provisioner-baseimage
|
||||
name: baseimage-storageclass
|
||||
provisioner: rancher.io/longhorn
|
||||
parameters:
|
||||
numberOfReplicas: '3'
|
||||
staleReplicaTimeout: '30'
|
||||
fromBackup: ''
|
||||
baseImage: rancher/longhorn-test:baseimage-ext4
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: provisioner-baseimage
|
||||
name: provisioner-baseimage-service
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
name: web
|
||||
selector:
|
||||
app: provisioner-baseimage
|
||||
type: LoadBalancer
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: provisioner-baseimage
|
||||
name: provisioner-baseimage-statefulset
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: provisioner-baseimage
|
||||
serviceName: provisioner-baseimage
|
||||
replicas: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: provisioner-baseimage
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:stable-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: baseimage-vol
|
||||
mountPath: /usr/share/nginx/html
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: baseimage-vol
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
storageClassName: baseimage-storageclass
|
||||
resources:
|
||||
requests:
|
||||
storage: 32Mi
|
@ -1,94 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: restore-to-file
|
||||
namespace: longhorn-system
|
||||
spec:
|
||||
nodeName: <NODE_NAME>
|
||||
initContainers:
|
||||
- name: prime-base-image
|
||||
# set base image here
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- echo primed-base-image
|
||||
# set base image here
|
||||
image: <BASE_IMAGE>
|
||||
imagePullPolicy: Always
|
||||
containers:
|
||||
- name: base-image
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- mkdir -p /share/base_image &&
|
||||
mount --bind /base_image/ /share/base_image &&
|
||||
echo base image mounted at /share/base_image &&
|
||||
trap 'umount /share/base_image && echo unmounted' TERM &&
|
||||
while true; do $(ls /talk/done 2>&1); if [ $? -eq 0 ]; then break;
|
||||
fi; echo waiting; sleep 1; done;
|
||||
umount /share/base_image && echo unmounted
|
||||
# set base image here
|
||||
image: <BASE_IMAGE>
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /share
|
||||
mountPropagation: Bidirectional
|
||||
- name: talk
|
||||
mountPath: /talk
|
||||
- name: restore-to-file
|
||||
command:
|
||||
# set restore-to-file arguments here
|
||||
- /bin/sh
|
||||
- -c
|
||||
- while true; do list=$(ls /share/base_image/* 2>&1); if [ $? -eq 0 ]; then break;
|
||||
fi; echo waiting; sleep 1; done; echo Directory found $list;
|
||||
longhorn backup restore-to-file
|
||||
'<BACKUP_URL>'
|
||||
--backing-file $list
|
||||
--output-file '/tmp/restore/<OUTPUT_FILE>'
|
||||
--output-format <OUTPUT_FORMAT>
|
||||
&& touch /talk/done && chmod 777 /talk/done && echo created /share/done
|
||||
# the version of longhorn engine should be v0.4.1 or higher
|
||||
image: rancher/longhorn-engine:v0.4.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /share
|
||||
mountPropagation: HostToContainer
|
||||
readOnly: true
|
||||
- name: talk
|
||||
mountPath: /talk
|
||||
- name: disk-directory
|
||||
mountPath: /tmp/restore # the argument <output-file> should be in this directory
|
||||
env:
|
||||
# set Backup Target Credential Secret here.
|
||||
- name: AWS_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: <S3_SECRET_NAME>
|
||||
key: AWS_ACCESS_KEY_ID
|
||||
- name: AWS_SECRET_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: <S3_SECRET_NAME>
|
||||
key: AWS_SECRET_ACCESS_KEY
|
||||
- name: AWS_ENDPOINTS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: <S3_SECRET_NAME>
|
||||
key: AWS_ENDPOINTS
|
||||
volumes:
|
||||
- name: share
|
||||
emptyDir: {}
|
||||
- name: talk
|
||||
emptyDir: {}
|
||||
# the output file can be found on this host path
|
||||
- name: disk-directory
|
||||
hostPath:
|
||||
path: /tmp/restore
|
||||
restartPolicy: Never
|
@ -5,7 +5,10 @@ metadata:
|
||||
provisioner: rancher.io/longhorn
|
||||
parameters:
|
||||
numberOfReplicas: "3"
|
||||
staleReplicaTimeout: "30"
|
||||
staleReplicaTimeout: "2880"
|
||||
fromBackup: ""
|
||||
# diskSelector: "ssd,fast"
|
||||
# nodeSelector: "storage,fast"
|
||||
# recurringJobs: '[{"name":"snap", "task":"snapshot", "cron":"*/1 * * * *", "retain":1},
|
||||
# {"name":"backup", "task":"backup", "cron":"*/2 * * * *", "retain":1}]'
|
||||
# {"name":"backup", "task":"backup", "cron":"*/2 * * * *", "retain":1,
|
||||
# "labels": {"interval":"2m"}}]'
|
||||
|
@ -55,7 +55,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: longhorn-uninstall
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc1
|
||||
image: longhornio/longhorn-manager:v0.6.0-rc2
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- longhorn-manager
|
||||
|
Loading…
Reference in New Issue
Block a user