Skip to content

Commit

Permalink
Merge pull request #12 from mrtamm/dev-builtin-htsget-crypt4gh
Browse files Browse the repository at this point in the history
Built-in Htsget and Crypt4gh for the HTSGET storage
  • Loading branch information
xhejtman committed Sep 5, 2024
2 parents e8b0d09 + b923c22 commit cccb4b6
Show file tree
Hide file tree
Showing 18 changed files with 1,586 additions and 251 deletions.
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

0 comments on commit cccb4b6

Please sign in to comment.