Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions assets/overlays/openstack-manila/generated/hypershift/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,28 @@ spec:
name: registration-dir
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
initContainers:
- command:
- sh
- -c
- |
until [ -S /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock ]; do
echo "Waiting for NFS CSI plugin socket..."
sleep 2
done
image: ${DRIVER_IMAGE}
name: wait-for-nfs-plugin
resources:
requests:
cpu: 10m
memory: 50Mi
securityContext:
privileged: false
readOnlyRootFilesystem: true
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /var/lib/kubelet/plugins/csi-nfsplugin
name: fwd-plugin-dir
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
Expand Down
22 changes: 22 additions & 0 deletions assets/overlays/openstack-manila/generated/standalone/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,28 @@ spec:
name: registration-dir
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
initContainers:
- command:
- sh
- -c
- |
until [ -S /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock ]; do
echo "Waiting for NFS CSI plugin socket..."
sleep 2
done
image: ${DRIVER_IMAGE}
name: wait-for-nfs-plugin
resources:
requests:
cpu: 10m
memory: 50Mi
securityContext:
privileged: false
readOnlyRootFilesystem: true
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /var/lib/kubelet/plugins/csi-nfsplugin
name: fwd-plugin-dir
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-node-critical
Expand Down
22 changes: 22 additions & 0 deletions assets/overlays/openstack-manila/patches/node_add_driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,28 @@ spec:
cpu: 10m
memory: 50Mi
terminationMessagePolicy: FallbackToLogsOnError
initContainers:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we could file this as an upstream bug and add a link to that here? We'll want to backport this so this approach makes sense for now, but I believe it would be a good idea to remove this in the future if possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed this offline and this isn't an either-or thing: we actually want both fixes. This change to add an explicit order for containers to start is correct (and not expensive) when we know one depends on the other. Let's capture that instead (via a comment or the commit message) for future us

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reported the issue for the manila driver at kubernetes/cloud-provider-openstack#3111.

- name: wait-for-nfs-plugin
image: ${DRIVER_IMAGE}
command:
- sh
- -c
- |
until [ -S /var/lib/kubelet/plugins/csi-nfsplugin/csi.sock ]; do
echo "Waiting for NFS CSI plugin socket..."
sleep 2
done
securityContext:
readOnlyRootFilesystem: true
privileged: false
resources:
requests:
cpu: 10m
memory: 50Mi
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- name: fwd-plugin-dir
mountPath: /var/lib/kubelet/plugins/csi-nfsplugin
volumes:
- name: cloud-credentials
secret:
Expand Down