Skip to content

Commit

Permalink
Add localtime mounts + Remove timezone configuration in image
Browse files Browse the repository at this point in the history
Signed-off-by: Blake Devcich <[email protected]>
  • Loading branch information
bdevcich committed Jan 9, 2025
1 parent 9c25390 commit 77c4c30
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ ENTRYPOINT ["/bin/sh"]
# is what we've built the Cray /sbin/mount.lustre user-space tool for.
FROM registry.suse.com/bci/bci-base:latest

# Remove timezone configuration so we can inherit from host
RUN rm -rf /etc/timezone && rm -rf /etc/localtime

WORKDIR /
# Retrieve executable from previous layer
COPY --from=builder /workspace/lustre-csi-driver .
Expand Down
18 changes: 18 additions & 0 deletions deploy/kubernetes/base/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ spec:
- name: mnt-dir
mountPath: /mnt
mountPropagation: Bidirectional
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: tzdata
mountPath: /usr/share/zoneinfo
readOnly: true

# The node-driver-registrar is a sidecar container that registers the CSI driver with Kubelet
# using the kubelet plugin registration mechanism. This is necessary because Kubelet is
Expand Down Expand Up @@ -102,6 +108,12 @@ spec:
mountPath: /csi
- name: registration-dir
mountPath: /registration
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: tzdata
mountPath: /usr/share/zoneinfo
readOnly: true

volumes:
# This volume is where the socket for the kubelet->driver communication is done.
Expand Down Expand Up @@ -131,3 +143,9 @@ spec:
hostPath:
path: /mnt
type: Directory
- name: localtime
hostPath:
path: /etc/localtime
- name: tzdata
hostPath:
path: /usr/share/zoneinfo

0 comments on commit 77c4c30

Please sign in to comment.