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

Built-in Htsget and Crypt4gh for the HTSGET storage #12

Merged
merged 11 commits into from
Sep 5, 2024
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
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build make build

# final stage
FROM debian
RUN apt-get update && apt-get install -y --no-install-recommends curl python3-pip && pip3 install htsget crypt4gh --break-system-packages && rm -rf ~/.cache
FROM alpine
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.dind
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build make build

# final stage
FROM docker:dind
RUN apk add --update --no-cache curl python3 py3-pip && pip3 install htsget crypt4gh --break-system-packages
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dind-rootless
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build make build

# final stage
FROM docker:stable-dind-rootless
FROM docker:dind-rootless
WORKDIR /opt/funnel
VOLUME /opt/funnel/funnel-work-dir
EXPOSE 8000 9090
Expand Down
7 changes: 4 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,14 @@ func (h FTPStorage) Valid() bool {
return !h.Disabled
}

// HTSGETStorage configures the http storage backend.
// HTSGETStorage configures the storage backend for the HTSGET protocol.
type HTSGETStorage struct {
// Controls whether HTSGET storage is disabled (defaults to false)
Disabled bool
// Actual protocol for fetching the resource (defaults to 'https')
Protocol string
// Whether Funnel should generate and send its crypt4gh public key (default: false)
SendPublicKey bool
// Timeout for each HTSGET request (defaults to 30 seconds)
Timeout Duration
}

// Valid validates the HTSGETStorage configuration.
Expand Down
2 changes: 1 addition & 1 deletion config/default-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,4 @@ FTPStorage:
HTSGETStorage:
Disabled: false
Protocol: https
SendPublicKey: false
Timeout: 30s
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ require (
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.19.0
golang.org/x/net v0.21.0
golang.org/x/oauth2 v0.17.0
golang.org/x/term v0.17.0
Expand Down Expand Up @@ -156,7 +157,6 @@ require (
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand Down
Loading