Skip to content

Commit

Permalink
Leo Feedback: use same port all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
derpsteb committed Oct 5, 2023
1 parent 5ebb5b9 commit c17ca57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 3 additions & 7 deletions s3proxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

const (
// defaultPort is the default port to listen on.
defaultPort = 443
defaultPort = 4433
// defaultIP is the default IP to listen on.
defaultIP = "0.0.0.0"
// defaultRegion is the default AWS region to use.
Expand Down Expand Up @@ -55,16 +55,12 @@ func main() {
}

func runServer(flags cmdFlags, log *logger.Logger) error {
log.With(zap.String("ip", flags.ip), zap.Bool("port", flags.noTLS), zap.String("region", flags.region)).Infof("listening")
log.With(zap.String("ip", flags.ip), zap.Int("port", defaultPort), zap.String("region", flags.region)).Infof("listening")

router := router.New(flags.region, log)

port := defaultPort
if flags.noTLS {
port = 80
}
server := http.Server{
Addr: fmt.Sprintf("%s:%d", flags.ip, port),
Addr: fmt.Sprintf("%s:%d", flags.ip, defaultPort),
Handler: http.HandlerFunc(router.Serve),
// Disable HTTP/2. Serving HTTP/2 will cause some clients to use HTTP/2.
// It seems like AWS S3 does not support HTTP/2.
Expand Down
7 changes: 4 additions & 3 deletions s3proxy/deploy/deployment-s3proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ spec:
- name: regcred
containers:
- name: s3proxy
image: ghcr.io/edgelesssys/constellation/s3proxy@sha256:13afd7e14fc5bb3ea8acdc4e78c96ce35919d34bc162d98466ca6e975a26f592
image: ghcr.io/edgelesssys/constellation/s3proxy@sha256:2394a804e8b5ff487a55199dd83138885322a4de8e71ac7ce67b79d4ffc842b2
args:
- "--level=-1"
ports:
- containerPort: 443
- containerPort: 4433
name: s3proxy-port
volumeMounts:
- name: tls-cert-data
mountPath: /etc/s3proxy/certs/s3proxy.crt
Expand Down Expand Up @@ -80,7 +81,7 @@ spec:
ports:
- name: https
port: 443
targetPort: 443
targetPort: s3proxy-port
type: ClusterIP
---
apiVersion: v1
Expand Down

0 comments on commit c17ca57

Please sign in to comment.