Skip to content

Commit e54beae

Browse files
committed
MAJOR: change http and https default ports to 8080 and 8443
with new s6 we completely move to rootless container setup, therefore binding to 80 and 443 is nto possible nor desired by default. if you are using external mode or nodePort setup this needs to be aligned
1 parent 67db961 commit e54beae

File tree

11 files changed

+28
-20
lines changed

11 files changed

+28
-20
lines changed

deploy/haproxy-ingress-daemonset.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,17 @@ spec:
152152
args:
153153
- --configmap=haproxy-controller/haproxy-kubernetes-ingress
154154
securityContext:
155+
runAsNonRoot: true
156+
allowPrivilegeEscalation: false
155157
runAsUser: 1000
156158
runAsGroup: 1000
157159
capabilities:
158160
drop:
159161
- ALL
160162
add:
161163
- NET_BIND_SERVICE
164+
seccompProfile:
165+
type: RuntimeDefault
162166
resources:
163167
limits:
164168
memory: 2560Mi

deploy/haproxy-ingress.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,17 @@ spec:
153153
args:
154154
- --configmap=haproxy-controller/haproxy-kubernetes-ingress
155155
securityContext:
156+
runAsNonRoot: true
157+
allowPrivilegeEscalation: false
156158
runAsUser: 1000
157159
runAsGroup: 1000
158160
capabilities:
159161
drop:
160162
- ALL
161163
add:
162164
- NET_BIND_SERVICE
165+
seccompProfile:
166+
type: RuntimeDefault
163167
resources:
164168
limits:
165169
memory: 2560Mi

deploy/tests/config/3.ingress-controller.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ spec:
8080
type: NodePort
8181
ports:
8282
- name: http
83-
port: 80
84-
targetPort: 80
83+
port: 8080
84+
targetPort: 8080
8585
nodePort: 30080
8686
protocol: TCP
8787
- name: https
88-
port: 443
89-
targetPort: 443
88+
port: 8443
89+
targetPort: 8443
9090
nodePort: 30443
9191
protocol: TCP
9292
- name: stat

deploy/tests/integration/timeout-server/timeoutserver_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func newAppSvc() *store.Service {
132132
{
133133
Name: "https",
134134
Protocol: "TCP",
135-
Port: 443,
135+
Port: 8443,
136136
Status: store.ADDED,
137137
},
138138
},

deploy/tests/tnr/routeacl/suite_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (suite *UseBackendSuite) UseBackendFixture() (eventChan chan k8s.SyncDataEv
154154
{
155155
Name: "https",
156156
Protocol: "TCP",
157-
Port: 443,
157+
Port: 8443,
158158
Status: store.ADDED,
159159
},
160160
},

documentation/annotations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This is autogenerated from [doc.yaml](doc.yaml). Description can be found in [ge
7474
| [ssl-passthrough](#https) | [bool](#bool) | "false" | |:large_blue_circle:|:large_blue_circle:|:large_blue_circle:|
7575
| [ssl-redirect](#https) | [bool](#bool) | "false" | https |:large_blue_circle:|:large_blue_circle:|:white_circle:|
7676
| [ssl-redirect-code](#https) | [301, 302, 303] | "302" | ssl-redirect |:large_blue_circle:|:large_blue_circle:|:white_circle:|
77-
| [ssl-redirect-port](#https) | number | 443 | ssl-redirect |:large_blue_circle:|:large_blue_circle:|:white_circle:|
77+
| [ssl-redirect-port](#https) | number | 8443 | ssl-redirect |:large_blue_circle:|:large_blue_circle:|:white_circle:|
7878
| [syslog-server](#logging) | [syslog](#syslog-fields) | "address:127.0.0.1, facility: local0, level: notice" | |:large_blue_circle:|:white_circle:|:white_circle:|
7979
| [standalone-backend](#standalone-backend) | [bool](#bool) | | |:white_circle:|:large_blue_circle:|:large_blue_circle:|
8080
| [timeout-check](#timeouts) | [time](#time) | | |:large_blue_circle:|:large_blue_circle:|:large_blue_circle:|

documentation/controller.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Image can be run with arguments:
2828
| [`--disable-ipv6`](#--disable-ipv6) | `false` |
2929
| [`--ipv4-bind-address`](#--ipv4-bind-address) | `0.0.0.0` |
3030
| [`--ipv6-bind-address`](#--ipv6-bind-address) | `::` |
31-
| [`--http-bind-port`](#--http-bind-port) | `80` |
32-
| [`--https-bind-port`](#--https-bind-port) | `443` |
31+
| [`--http-bind-port`](#--http-bind-port) | `8080` |
32+
| [`--https-bind-port`](#--https-bind-port) | `8443` |
3333
| [`--disable-http`](#--disable-http) | `false` |
3434
| [`--disable-https`](#--disable-https) | `false` |
3535
| [`--sync-period`](#--sync-period) | `5s` |
@@ -478,7 +478,7 @@ Example:
478478

479479
Possible values:
480480

481-
- A valid port in the range. Default: 80
481+
- A valid port in the range. Default: 8080
482482

483483
Example:
484484

@@ -496,7 +496,7 @@ Example:
496496

497497
Possible values:
498498

499-
- A valid port in the range. Default: 443
499+
- A valid port in the range. Default: 8443
500500

501501
Example:
502502

documentation/custom-resources.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,5 @@ spec:
165165
- protocol: TCP
166166
port: 443
167167
name: https
168-
targetPort: 443
168+
targetPort: 8443
169169
```

documentation/doc.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ image_arguments:
241241
- argument: --http-bind-port
242242
description: Customize the HTTP frontend binding port.
243243
values:
244-
- "A valid port in the range. Default: 80"
245-
default: 80
244+
- "A valid port in the range. Default: 8080"
245+
default: 8080
246246
version_min: "1.5"
247247
example: --http-bind-port=8080
248248
helm: |-
@@ -251,8 +251,8 @@ image_arguments:
251251
- argument: --https-bind-port
252252
description: Customize the HTTPS frontend binding port.
253253
values:
254-
- "A valid port in the range. Default: 443"
255-
default: 443
254+
- "A valid port in the range. Default: 8443"
255+
default: 8443
256256
version_min: "1.5"
257257
example: --http-bind-port=8443
258258
helm: |-
@@ -1605,7 +1605,7 @@ annotations:
16051605
type: number
16061606
group: https
16071607
dependencies: ssl-redirect
1608-
default: "443"
1608+
default: "8443"
16091609
description:
16101610
- Sets the HTTPS port to redirect to when HTTP to HTTPS traffic redirection is enabled when `ssl-redirect` is true.
16111611
tip:

pkg/annotations/common/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var DefaultValues = map[string]string{
5656
"request-capture-len": "128",
5757
"ssl-redirect-code": "302",
5858
"request-redirect-code": "302",
59-
"ssl-redirect-port": "443",
59+
"ssl-redirect-port": "8443",
6060
"ssl-passthrough": "false",
6161
"server-ssl": "false",
6262
"scale-server-slots": "42",

pkg/utils/flags.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ type OSArgs struct {
9090
DefaultBackendPort int `long:"default-backend-port" description:"port to use for default service" default:"6061"`
9191
ChannelSize int64 `long:"channel-size" description:"sets the size of controller buffers used to receive and send k8s events.NOTE: increase the value to accommodate large number of resources "`
9292
ControllerPort int `long:"controller-port" description:"port to listen on for controller data: prometheus, pprof" default:"6060"`
93-
HTTPBindPort int64 `long:"http-bind-port" default:"80" description:"port to listen on for HTTP traffic"`
94-
HTTPSBindPort int64 `long:"https-bind-port" default:"443" description:"port to listen on for HTTPS traffic"`
93+
HTTPBindPort int64 `long:"http-bind-port" default:"8080" description:"port to listen on for HTTP traffic"`
94+
HTTPSBindPort int64 `long:"https-bind-port" default:"8443" description:"port to listen on for HTTPS traffic"`
9595
SyncPeriod time.Duration `long:"sync-period" default:"5s" description:"Sets the period at which the controller syncs HAProxy configuration file"`
9696
CacheResyncPeriod time.Duration `long:"cache-resync-period" default:"10m" description:"Sets the underlying Shared Informer resync period: resyncing controller with informers cache"`
9797
HealthzBindPort int64 `long:"healthz-bind-port" default:"1042" description:"port to listen on for probes"`

0 commit comments

Comments
 (0)