Merge pull request #90234 from jsafrane/remove-prestop-hook

Sync csi-hostpath manifests
This commit is contained in:
Kubernetes Prow Robot 2020-04-17 07:41:06 -07:00 committed by GitHub
commit 87eb688ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 47 deletions

View File

@ -40,7 +40,7 @@ spec:
serviceAccountName: csi-attacher serviceAccountName: csi-attacher
containers: containers:
- name: csi-attacher - name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v2.1.0 image: quay.io/k8scsi/csi-attacher:v2.2.0
args: args:
- --v=5 - --v=5
- --csi-address=/csi/csi.sock - --csi-address=/csi/csi.sock

View File

@ -3,8 +3,10 @@ kind: CSIDriver
metadata: metadata:
name: hostpath.csi.k8s.io name: hostpath.csi.k8s.io
spec: spec:
# Supports both modes, but needs pod info for that to determine the actual mode. # Supports persistent and ephemeral inline volumes.
podInfoOnMount: true
volumeLifecycleModes: volumeLifecycleModes:
- Persistent - Persistent
- Ephemeral - Ephemeral
# To determine at runtime which mode a volume uses, pod info and its
# "csi.storage.k8s.io/ephemeral" entry are needed.
podInfoOnMount: true

View File

@ -36,11 +36,7 @@ spec:
spec: spec:
containers: containers:
- name: node-driver-registrar - name: node-driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0 image: quay.io/k8scsi/csi-node-driver-registrar:v1.3.0
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "rm -rf /registration/csi-hostpath /registration/csi-hostpath-reg.sock"]
args: args:
- --v=5 - --v=5
- --csi-address=/csi/csi.sock - --csi-address=/csi/csi.sock
@ -71,6 +67,8 @@ spec:
- "--v=5" - "--v=5"
- "--endpoint=$(CSI_ENDPOINT)" - "--endpoint=$(CSI_ENDPOINT)"
- "--nodeid=$(KUBE_NODE_NAME)" - "--nodeid=$(KUBE_NODE_NAME)"
# The only difference to github.com/kubernetes-csi/csi-driver-host-path/deploy
# - we have a tests that checks node limits.
- "--maxvolumespernode=10" - "--maxvolumespernode=10"
env: env:
- name: CSI_ENDPOINT - name: CSI_ENDPOINT
@ -107,7 +105,6 @@ spec:
name: csi-data-dir name: csi-data-dir
- mountPath: /dev - mountPath: /dev
name: dev-dir name: dev-dir
- name: liveness-probe - name: liveness-probe
volumeMounts: volumeMounts:
- mountPath: /csi - mountPath: /csi
@ -115,7 +112,6 @@ spec:
image: quay.io/k8scsi/livenessprobe:v1.1.0 image: quay.io/k8scsi/livenessprobe:v1.1.0
args: args:
- --csi-address=/csi/csi.sock - --csi-address=/csi/csi.sock
- --connection-timeout=3s
- --health-port=9898 - --health-port=9898
volumes: volumes:

View File

@ -40,11 +40,11 @@ spec:
serviceAccountName: csi-provisioner serviceAccountName: csi-provisioner
containers: containers:
- name: csi-provisioner - name: csi-provisioner
image: quay.io/k8scsi/csi-provisioner:v1.5.0 image: quay.io/k8scsi/csi-provisioner:v1.6.0
args: args:
- -v=5 - -v=5
- --csi-address=/csi/csi.sock - --csi-address=/csi/csi.sock
- --connection-timeout=15s - --feature-gates=Topology=true
securityContext: securityContext:
# This is necessary only for systems with SELinux, where # This is necessary only for systems with SELinux, where
# non-privileged sidecar containers cannot access unix domain socket # non-privileged sidecar containers cannot access unix domain socket

View File

@ -27,16 +27,23 @@ spec:
labels: labels:
app: csi-hostpath-resizer app: csi-hostpath-resizer
spec: spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- csi-hostpathplugin
topologyKey: kubernetes.io/hostname
serviceAccountName: csi-resizer serviceAccountName: csi-resizer
containers: containers:
- name: csi-resizer - name: csi-resizer
image: quay.io/k8scsi/csi-resizer:v0.4.0 image: quay.io/k8scsi/csi-resizer:v0.5.0
args: args:
- "--v=5" - -v=5
- "--csi-address=$(ADDRESS)" - -csi-address=/csi/csi.sock
env:
- name: ADDRESS
value: /csi/csi.sock
securityContext: securityContext:
# This is necessary only for systems with SELinux, where # This is necessary only for systems with SELinux, where
# non-privileged sidecar containers cannot access unix domain socket # non-privileged sidecar containers cannot access unix domain socket

View File

@ -1,52 +1,59 @@
kind: Service kind: Service
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: csi-snapshotter name: csi-hostpath-snapshotter
labels: labels:
app: csi-snapshotter app: csi-hostpath-snapshotter
spec: spec:
selector: selector:
app: csi-snapshotter app: csi-hostpath-snapshotter
ports: ports:
- name: dummy - name: dummy
port: 12345 port: 12345
--- ---
kind: StatefulSet kind: StatefulSet
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
name: csi-snapshotter name: csi-hostpath-snapshotter
spec: spec:
serviceName: "csi-snapshotter" serviceName: "csi-hostpath-snapshotter"
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: csi-snapshotter app: csi-hostpath-snapshotter
template: template:
metadata: metadata:
labels: labels:
app: csi-snapshotter app: csi-hostpath-snapshotter
spec: spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- csi-hostpathplugin
topologyKey: kubernetes.io/hostname
serviceAccount: csi-snapshotter serviceAccount: csi-snapshotter
containers: containers:
- name: csi-snapshotter - name: csi-snapshotter
image: quay.io/k8scsi/csi-snapshotter:v2.0.0 image: quay.io/k8scsi/csi-snapshotter:v2.1.0
args: args:
- "--v=5" - -v=5
- "--csi-address=$(ADDRESS)" - --csi-address=/csi/csi.sock
env: securityContext:
- name: ADDRESS # This is necessary only for systems with SELinux, where
value: /csi/csi.sock # non-privileged sidecar containers cannot access unix domain socket
securityContext: # created by privileged CSI driver container.
# This is necessary only for systems with SELinux, where privileged: true
# non-privileged sidecar containers cannot access unix domain socket volumeMounts:
# created by privileged CSI driver container. - mountPath: /csi
privileged: true name: socket-dir
volumeMounts:
- name: socket-dir
mountPath: /csi
volumes: volumes:
- hostPath: - hostPath:
path: /var/lib/kubelet/plugins/csi-hostpath path: /var/lib/kubelet/plugins/csi-hostpath
type: DirectoryOrCreate type: DirectoryOrCreate
name: socket-dir name: socket-dir