Update linode from upstream
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2020-10-29 12:18:08 +01:00
parent f599c99ee8
commit 058d9bd8e1
21 changed files with 434 additions and 458 deletions

View file

@ -1,11 +1,10 @@
# pkg/linode-bs/deploy/kubernetes/07-ds-csi-linode-node.yaml
kind: DaemonSet
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: csi-linode-node
namespace: kube-system
labels:
app: csi-linode-node
name: csi-linode-node
namespace: kube-system
spec:
selector:
matchLabels:
@ -16,129 +15,124 @@ spec:
app: csi-linode-node
role: csi-linode
spec:
serviceAccount: csi-node-sa
initContainers:
- name: init
image: bitnami/kubectl:1.16.3-debian-10-r36
command:
- /scripts/get-linode-id.sh
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: linode-info
mountPath: /linode-info
- name: get-linode-id
mountPath: /scripts
hostNetwork: true
containers:
- name: driver-registrar
image: quay.io/k8scsi/driver-registrar:v1.0-canary
args:
- "--v=2"
- "--csi-address=$(ADDRESS)"
- "--mode=node-register"
- "--driver-requires-attachment=true"
- "--pod-info-mount-version=\"v1\""
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/linodebs.csi.linode.com/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: plugin-dir
mountPath: /csi/
- name: registration-dir
mountPath: /registration/
- name: csi-linode-plugin
image: linode/linode-blockstorage-csi-driver:v0.2.0
args :
- "--endpoint=$(CSI_ENDPOINT)"
- "--token=$(LINODE_TOKEN)"
- "--url=$(LINODE_API_URL)"
- "--node=$(NODE_NAME)"
- "--v=2"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: LINODE_API_URL
value: https://api.linode.com/v4
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: LINODE_TOKEN
valueFrom:
secretKeyRef:
name: linode
key: token
imagePullPolicy: "Always"
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
volumeMounts:
- name: linode-info
mountPath: /linode-info
- name: get-linode-id
mountPath: /scripts
- name: plugin-dir
mountPath: /csi
- name: pods-mount-dir
mountPath: /var/lib/kubelet
# needed so that any mounts setup inside this container are
# propagated back to the host machine.
mountPropagation: "Bidirectional"
- mountPath: /dev
name: device-dir
- args:
- --v=2
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/linodebs.csi.linode.com/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v1.3.0
name: csi-node-driver-registrar
volumeMounts:
- mountPath: /csi
name: plugin-dir
- mountPath: /registration
name: registration-dir
- args:
- --endpoint=$(CSI_ENDPOINT)
- --token=$(LINODE_TOKEN)
- --url=$(LINODE_API_URL)
- --node=$(NODE_NAME)
- --v=2
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: LINODE_API_URL
value: https://api.linode.com/v4
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: LINODE_TOKEN
valueFrom:
secretKeyRef:
key: token
name: linode
image: linode/linode-blockstorage-csi-driver:v0.3.0
imagePullPolicy: Always
name: csi-linode-plugin
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- SYS_ADMIN
privileged: true
volumeMounts:
- mountPath: /linode-info
name: linode-info
- mountPath: /scripts
name: get-linode-id
- mountPath: /csi
name: plugin-dir
- mountPath: /var/lib/kubelet
mountPropagation: Bidirectional
name: pods-mount-dir
- mountPath: /dev
name: device-dir
hostNetwork: true
initContainers:
- command:
- /scripts/get-linode-id.sh
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: bitnami/kubectl:1.16.3-debian-10-r36
name: init
volumeMounts:
- mountPath: /linode-info
name: linode-info
- mountPath: /scripts
name: get-linode-id
serviceAccount: csi-node-sa
volumes:
- name: linode-info
emptyDir: {}
- name: get-linode-id
configMap:
name: get-linode-id
defaultMode: 493
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
type: DirectoryOrCreate
- name: kubelet-dir
hostPath:
path: /var/lib/kubelet
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/linodebs.csi.linode.com
type: DirectoryOrCreate
- name: pods-mount-dir
hostPath:
path: /var/lib/kubelet
type: Directory
- name: device-dir
hostPath:
path: /dev
# The following mounts are required to trigger host udevadm from container
- name: udev-rules-etc
hostPath:
path: /etc/udev
type: Directory
- name: udev-rules-lib
hostPath:
path: /lib/udev
type: Directory
- name: udev-socket
hostPath:
path: /run/udev
type: Directory
- name: sys
hostPath:
path: /sys
type: Directory
- emptyDir: {}
name: linode-info
- configMap:
defaultMode: 493
name: get-linode-id
name: get-linode-id
- hostPath:
path: /var/lib/kubelet/plugins_registry/
type: DirectoryOrCreate
name: registration-dir
- hostPath:
path: /var/lib/kubelet
type: Directory
name: kubelet-dir
- hostPath:
path: /var/lib/kubelet/plugins/linodebs.csi.linode.com
type: DirectoryOrCreate
name: plugin-dir
- hostPath:
path: /var/lib/kubelet
type: Directory
name: pods-mount-dir
- hostPath:
path: /dev
name: device-dir
- hostPath:
path: /etc/udev
type: Directory
name: udev-rules-etc
- hostPath:
path: /lib/udev
type: Directory
name: udev-rules-lib
- hostPath:
path: /run/udev
type: Directory
name: udev-socket
- hostPath:
path: /sys
type: Directory
name: sys