Skip to content

Commit

Permalink
use ports 443, 80
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdoxsey committed Jan 7, 2025
1 parent 63ce446 commit da85774
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
7 changes: 4 additions & 3 deletions cmd/all_in_one.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func AllInOneCommand() (*cobra.Command, error) {
Command: cobra.Command{
Use: "all-in-one",
Short: "run ingress controller together with pomerium in all-in-one mode",
}}
},
}
cmd.RunE = cmd.exec
if err := cmd.setupFlags(); err != nil {
return nil, err
Expand Down Expand Up @@ -113,8 +114,8 @@ func (s *allCmd) setupFlags() error {
flags.BoolVar(&s.debugEnvoy, debugEnvoy, false, "enable debug logging for envoy")
flags.StringVar(&s.metricsBindAddress, metricsBindAddress, "", "host:port for aggregate metrics. host is mandatory")
flags.StringVar(&s.adminBindAddr, debugAdminBindAddr, "", "host:port for admin server")
flags.StringVar(&s.serverAddr, "server-addr", ":8443", "the address the HTTPS server would bind to")
flags.StringVar(&s.httpRedirectAddr, "http-redirect-addr", ":8080", "the address HTTP redirect would bind to")
flags.StringVar(&s.serverAddr, "server-addr", ":443", "the address the HTTPS server would bind to")
flags.StringVar(&s.httpRedirectAddr, "http-redirect-addr", ":80", "the address HTTP redirect would bind to")
flags.StringVar(&s.deriveTLS, "databroker-auto-tls", "", "enable auto TLS and generate server certificate for the domain")
flags.DurationVar(&s.configControllerShutdownTimeout, configControllerShutdown, time.Second*30, "timeout waiting for graceful config controller shutdown")

Expand Down
6 changes: 6 additions & 0 deletions config/pomerium/deployment/no-root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ spec:
spec:
securityContext:
runAsNonRoot: true
sysctls:
- name: net.ipv4.ip_unprivileged_port_start
value: "80"
containers:
- name: pomerium
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsGroup: 65532
runAsUser: 65532
6 changes: 3 additions & 3 deletions config/pomerium/deployment/ports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ spec:
containers:
- name: pomerium
ports:
- containerPort: 8443
- containerPort: 443
name: https
protocol: TCP
- containerPort: 8443
- containerPort: 443
name: quic
protocol: UDP
- name: http
containerPort: 8080
containerPort: 80
protocol: TCP
- name: metrics
containerPort: 9090
Expand Down
12 changes: 9 additions & 3 deletions deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -770,13 +770,13 @@ spec:
imagePullPolicy: Always
name: pomerium
ports:
- containerPort: 8443
- containerPort: 443
name: https
protocol: TCP
- containerPort: 8443
- containerPort: 443
name: quic
protocol: UDP
- containerPort: 8080
- containerPort: 80
name: http
protocol: TCP
- containerPort: 9090
Expand All @@ -791,6 +791,9 @@ spec:
memory: 200Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 65532
runAsNonRoot: true
Expand All @@ -802,6 +805,9 @@ spec:
kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
sysctls:
- name: net.ipv4.ip_unprivileged_port_start
value: "80"
serviceAccountName: pomerium-controller
terminationGracePeriodSeconds: 10
volumes:
Expand Down

0 comments on commit da85774

Please sign in to comment.