Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove container's ports field #4714

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions internal/infrastructure/kubernetes/proxy/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,6 @@ func expectedProxyContainers(infra *ir.ProxyInfra,
// Define slice to hold container ports
var ports []corev1.ContainerPort

// Iterate over listeners and ports to get container ports
for _, listener := range infra.Listeners {
for _, p := range listener.Ports {
var protocol corev1.Protocol
switch p.Protocol {
case ir.HTTPProtocolType, ir.HTTPSProtocolType, ir.TLSProtocolType, ir.TCPProtocolType:
protocol = corev1.ProtocolTCP
case ir.UDPProtocolType:
protocol = corev1.ProtocolUDP
default:
return nil, fmt.Errorf("invalid protocol %q", p.Protocol)
}
port := corev1.ContainerPort{
Name: p.Name,
ContainerPort: p.ContainerPort,
Protocol: protocol,
}
ports = append(ports, port)
}
}

if enablePrometheus(infra) {
ports = append(ports, corev1.ContainerPort{
Name: "metrics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,6 @@ spec:
port: 19002
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
readinessProbe:
failureThreshold: 1
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,6 @@ spec:
port: 19002
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
readinessProbe:
failureThreshold: 1
httpGet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ spec:
scheme: HTTP
name: envoy
ports:
- containerPort: 8080
name: EnvoyHTTPPort
protocol: TCP
- containerPort: 8443
name: EnvoyHTTPSPort
protocol: TCP
- containerPort: 19001
name: metrics
protocol: TCP
Expand Down
Loading
Loading