Skip to content

Commit

Permalink
support EiT
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvz committed Oct 14, 2024
1 parent b5b50fc commit 781651d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ spec:
- mountPath: /lib/modules
name: lib-modules
readOnly: true
- mountPath: /etc/stunnel/microsoft/aznfs/nfsv4_fileShare
name: stunnel-config
- mountPath: /etc/stunnel/microsoft/aznfs/nfsv4_fileShare/logs
name: stunnel-logs
{{- end }}
resources: {{- toYaml .Values.linux.resources.azurefile | nindent 12 }}
{{- if .Values.node.enableAznfsMount }}
Expand All @@ -224,6 +228,10 @@ spec:
- mountPath: {{ .Values.linux.kubelet }}/
mountPropagation: Bidirectional
name: mountpoint-dir
- mountPath: /etc/stunnel/microsoft/aznfs/nfsv4_fileShare
name: stunnel-config
- mountPath: /etc/stunnel/microsoft/aznfs/nfsv4_fileShare/logs
name: stunnel-logs
{{- end }}
volumes:
- hostPath:
Expand Down Expand Up @@ -263,5 +271,13 @@ spec:
hostPath:
path: /lib/modules
type: DirectoryOrCreate
- name: stunnel-config
hostPath:
path: /etc/stunnel/microsoft/aznfs/nfsv4_fileShare
type: DirectoryOrCreate
- name: stunnel-logs
hostPath:
path: /etc/stunnel/microsoft/aznfs/nfsv4_fileShare/logs
type: DirectoryOrCreate
{{- end }}
{{- end -}}
18 changes: 4 additions & 14 deletions pkg/azurefileplugin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,18 @@ ARG binary=./_output/${ARCH}/azurefileplugin
COPY ${binary} /azurefileplugin
COPY --from=builder --chown=root:root /usr/local/bin/azcopy /usr/local/bin/azcopy

# packages that are only needed by aznfs: procps conntrack iptables bind9-host iproute2 bash netcat sysvinit-utils kmod net-tools
RUN apt update && apt upgrade -y && apt-mark unhold libcap2 && clean-install ca-certificates cifs-utils util-linux e2fsprogs mount udev xfsprogs nfs-common netbase procps conntrack iptables bind9-host iproute2 bash netcat-traditional sysvinit-utils kmod net-tools
# packages that are only needed by aznfs: procps conntrack iptables bind9-host iproute2 bash netcat sysvinit-utils kmod net-tools stunnel4
RUN apt update && apt upgrade -y && apt-mark unhold libcap2 && clean-install ca-certificates cifs-utils util-linux e2fsprogs mount udev xfsprogs nfs-common netbase wget procps conntrack iptables bind9-host iproute2 bash netcat-traditional sysvinit-utils kmod net-tools stunnel4

# install aznfs
ARG aznfsVer=0.1.349
# TODO: Dont use wget to download and install aznfs
ARG aznfsVer=0.1.394
RUN if [ "$ARCH" = "amd64" ] ; then \
wget -O aznfs.tar.gz https://github.com/Azure/AZNFS-mount/releases/download/${aznfsVer}/aznfs-${aznfsVer}-1.x86_64.tar.gz; \
else \
wget -O aznfs.tar.gz https://github.com/Azure/AZNFS-mount/releases/download/${aznfsVer}/aznfs-${aznfsVer}-1.arm64.tar.gz;fi
RUN tar xvzf aznfs.tar.gz -C / --keep-directory-symlink && rm aznfs.tar.gz

# install azcopy
ARG azcopyURL=https://azcopyvnext.azureedge.net/releases/release-10.25.1-20240612/azcopy_linux_amd64_10.25.1.tar.gz
RUN if [ "$ARCH" == "arm64" ] ; then \
azcopyURL=https://azcopyvnext.azureedge.net/releases/release-10.25.1-20240612/azcopy_linux_arm64_10.25.1.tar.gz; fi
RUN wget -O azcopy.tar.gz ${azcopyURL} && \
tar xvzf azcopy.tar.gz -C . && rm azcopy.tar.gz && \
mv ./azcopy_linux_$ARCH_*/azcopy /usr/local/bin/azcopy && \
rm -rf ./azcopy_linux_$ARCH_*
RUN chmod +x /usr/local/bin/azcopy
RUN apt remove wget -y

LABEL maintainers="andyzhangx"
LABEL description="AzureFile CSI Driver"

Expand Down

0 comments on commit 781651d

Please sign in to comment.