Skip to content

Commit 950dde6

Browse files
authored
fix: remove container's ports field (envoyproxy#4714)
Signed-off-by: Kebe <[email protected]>
1 parent a924cec commit 950dde6

39 files changed

+1
-246
lines changed

internal/infrastructure/kubernetes/proxy/resource.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,6 @@ func expectedProxyContainers(infra *ir.ProxyInfra,
8989
// Define slice to hold container ports
9090
var ports []corev1.ContainerPort
9191

92-
// Iterate over listeners and ports to get container ports
93-
for _, listener := range infra.Listeners {
94-
for _, p := range listener.Ports {
95-
var protocol corev1.Protocol
96-
switch p.Protocol {
97-
case ir.HTTPProtocolType, ir.HTTPSProtocolType, ir.TLSProtocolType, ir.TCPProtocolType:
98-
protocol = corev1.ProtocolTCP
99-
case ir.UDPProtocolType:
100-
protocol = corev1.ProtocolUDP
101-
default:
102-
return nil, fmt.Errorf("invalid protocol %q", p.Protocol)
103-
}
104-
port := corev1.ContainerPort{
105-
Name: p.Name,
106-
ContainerPort: p.ContainerPort,
107-
Protocol: protocol,
108-
}
109-
ports = append(ports, port)
110-
}
111-
}
112-
11392
if enablePrometheus(infra) {
11493
ports = append(ports, corev1.ContainerPort{
11594
Name: "metrics",

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/component-level.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ spec:
6666
scheme: HTTP
6767
name: envoy
6868
ports:
69-
- containerPort: 8080
70-
name: EnvoyHTTPPort
71-
protocol: TCP
72-
- containerPort: 8443
73-
name: EnvoyHTTPSPort
74-
protocol: TCP
7569
- containerPort: 19001
7670
name: metrics
7771
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/custom.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,6 @@ spec:
249249
scheme: HTTP
250250
name: envoy
251251
ports:
252-
- containerPort: 8080
253-
name: EnvoyHTTPPort
254-
protocol: TCP
255-
- containerPort: 8443
256-
name: EnvoyHTTPSPort
257-
protocol: TCP
258252
- containerPort: 19001
259253
name: metrics
260254
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default-env.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,6 @@ spec:
248248
scheme: HTTP
249249
name: envoy
250250
ports:
251-
- containerPort: 8080
252-
name: EnvoyHTTPPort
253-
protocol: TCP
254-
- containerPort: 8443
255-
name: EnvoyHTTPSPort
256-
protocol: TCP
257251
- containerPort: 19001
258252
name: metrics
259253
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,6 @@ spec:
233233
scheme: HTTP
234234
name: envoy
235235
ports:
236-
- containerPort: 8080
237-
name: EnvoyHTTPPort
238-
protocol: TCP
239-
- containerPort: 8443
240-
name: EnvoyHTTPSPort
241-
protocol: TCP
242236
- containerPort: 19001
243237
name: metrics
244238
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/disable-prometheus.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,6 @@ spec:
206206
port: 19002
207207
scheme: HTTP
208208
name: envoy
209-
ports:
210-
- containerPort: 8080
211-
name: EnvoyHTTPPort
212-
protocol: TCP
213-
- containerPort: 8443
214-
name: EnvoyHTTPSPort
215-
protocol: TCP
216209
readinessProbe:
217210
failureThreshold: 1
218211
httpGet:

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/extension-env.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ spec:
252252
scheme: HTTP
253253
name: envoy
254254
ports:
255-
- containerPort: 8080
256-
name: EnvoyHTTPPort
257-
protocol: TCP
258-
- containerPort: 8443
259-
name: EnvoyHTTPSPort
260-
protocol: TCP
261255
- containerPort: 19001
262256
name: metrics
263257
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/override-labels-and-annotations.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,6 @@ spec:
242242
scheme: HTTP
243243
name: envoy
244244
ports:
245-
- containerPort: 8080
246-
name: EnvoyHTTPPort
247-
protocol: TCP
248-
- containerPort: 8443
249-
name: EnvoyHTTPSPort
250-
protocol: TCP
251245
- containerPort: 19001
252246
name: metrics
253247
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/patch-daemonset.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,6 @@ spec:
233233
scheme: HTTP
234234
name: envoy
235235
ports:
236-
- containerPort: 8080
237-
name: EnvoyHTTPPort
238-
protocol: TCP
239-
- containerPort: 8443
240-
name: EnvoyHTTPSPort
241-
protocol: TCP
242236
- containerPort: 19001
243237
name: metrics
244238
protocol: TCP

internal/infrastructure/kubernetes/proxy/testdata/daemonsets/shutdown-manager.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,6 @@ spec:
233233
scheme: HTTP
234234
name: envoy
235235
ports:
236-
- containerPort: 8080
237-
name: EnvoyHTTPPort
238-
protocol: TCP
239-
- containerPort: 8443
240-
name: EnvoyHTTPSPort
241-
protocol: TCP
242236
- containerPort: 19001
243237
name: metrics
244238
protocol: TCP

0 commit comments

Comments
 (0)