ansible-role-k8s-storage/files/longhorn/longhorn-driver-deployer-Deployment.yaml
Adrien 8cc1e01af4
All checks were successful
continuous-integration/drone/push Build is passing
Update longhorn
2020-08-24 15:20:25 +02:00

70 lines
2.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: longhorn-driver-deployer
namespace: longhorn-system
spec:
replicas: 1
selector:
matchLabels:
app: longhorn-driver-deployer
template:
metadata:
labels:
app: longhorn-driver-deployer
spec:
initContainers:
- name: wait-longhorn-manager
image: longhornio/longhorn-manager:v1.0.2
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:v1.0.2
imagePullPolicy: IfNotPresent
command:
- longhorn-manager
- -d
- deploy-driver
- --manager-image
- longhornio/longhorn-manager:v1.0.2
- --manager-url
- http://longhorn-backend:9500/v1
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: SERVICE_ACCOUNT
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"
#- name: CSI_RESIZER_REPLICA_COUNT
# value: "3"
#imagePullSecrets:
#- name:
serviceAccountName: longhorn-service-account
securityContext:
runAsUser: 0