Skip to content

Commit

Permalink
fix: Use distinct container port names (#354)
Browse files Browse the repository at this point in the history
This introduces the port name "php" for the additional PHP container.

Using the same port name twice can lead to situations where a service
pointing to a named port would route the traffic to the wrong container.
  • Loading branch information
anothertobi authored Aug 13, 2024
1 parent 475f206 commit c4b5f16
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion internal/servicetypes/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ var nginxPHP = ServiceType{
SecurityContext: &corev1.SecurityContext{},
Ports: []corev1.ContainerPort{
{
Name: "http",
Name: "php",
ContainerPort: defaultPHPPort,
Protocol: corev1.ProtocolTCP,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down Expand Up @@ -228,7 +228,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down Expand Up @@ -229,7 +229,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ spec:
name: php
ports:
- containerPort: 9000
name: http
name: php
protocol: TCP
readinessProbe:
initialDelaySeconds: 2
Expand Down

0 comments on commit c4b5f16

Please sign in to comment.