Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fuse fixes #233

Merged
merged 3 commits into from
Sep 12, 2022
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
23 changes: 11 additions & 12 deletions fuse/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
FROM golang:1.13.15-alpine3.12 as builder
FROM ubuntu:22.04 as builder

RUN apt update && apt install golang git build-essential -y

ENV CGO_ENABLED=0

WORKDIR /build

# Configure STScI cert generally
COPY tls-ca-bundle.pem /tmp/cert.pem
RUN mv /etc/ssl/cert.pem /etc/ssl/cert.pem.org && \
mv /tmp/cert.pem /etc/ssl
RUN mv /tmp/cert.pem /etc/ssl

# Install git and configure STScI cert for git
RUN apk add -U git && \
git config --global http.sslCAInfo /etc/ssl/cert.pem
RUN git config --global http.sslCAInfo /etc/ssl/cert.pem

# Build goofys
RUN git clone https://github.com/kahing/goofys.git . && \
git checkout 08534b2 && \
git checkout 829d8e5 && \
go build -ldflags "-X main.Version=`git rev-parse HEAD`"

# Build s3fs-fuse
RUN apk add --no-cache -U build-base autoconf automake libxml2-dev fuse-dev curl-dev
RUN apt install -y autoconf automake libxml2-dev libfuse-dev libcurl4-openssl-dev pkg-config libssl-dev

RUN git clone https://github.com/s3fs-fuse/s3fs-fuse.git && \
cd s3fs-fuse && \
git checkout v1.91 && \
Expand All @@ -31,14 +32,12 @@ RUN git clone https://github.com/s3fs-fuse/s3fs-fuse.git && \

# -------------------------------------------------------------------

FROM alpine:3.12
FROM ubuntu:22.04

COPY tls-ca-bundle.pem /tmp/cert.pem
RUN mv /etc/ssl/cert.pem /etc/ssl/cert.pem.org && \
mv /tmp/cert.pem /etc/ssl

RUN apk add --no-cache -U fuse curl libxml2 libstdc++ mailcap tini
RUN mv /tmp/cert.pem /etc/ssl

RUN apt update && apt -y install fuse curl libxml2 libstdc++6 mailcap tini
COPY --from=builder /build/goofys .
COPY --from=builder /build/s3fs .

Expand Down
3 changes: 1 addition & 2 deletions fuse/helm/templates/daemonset-s3fs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ spec:
- name: s3-fs-{{ $bucketName }}
image: {{ $imageRepository }}:{{ $imageTag }}
imagePullPolicy: Always
command: ["./s3fs", "-f", "{{ $bucketName }}", "/s3/fs/{{ $bucketName }}",
"-o", "_netdev,umask=0222,uid=1000,gid=1000,connect_timeout=20,readwrite_timeout=20,retries=2,use_cache=/tmp/s3fs,ensure_diskfree=10000,max_stat_cache_size=20000,stat_cache_expire=900,list_object_max_keys=1000,endpoint={{ $awsRegion }},iam_role=auto,ro,allow_other,noatime,noexec,nodev,nosuid"]
command: ["./s3fs", "-f", "{{ $bucketName }}", "/s3/fs/{{ $bucketName }}", "-o", "_netdev,umask=0222,uid=1000,gid=1000,connect_timeout=20,readwrite_timeout=20,retries=2,use_cache=/tmp/s3fs,ensure_diskfree=10000,max_stat_cache_size=20000,stat_cache_expire=900,list_object_max_keys=1000,endpoint={{ $awsRegion }},iam_role=auto,ro,allow_other,noatime,noexec,nodev,nosuid"]
lifecycle:
preStop:
exec:
Expand Down