Skip to content

Commit

Permalink
Add name attribute to ServicePort
Browse files Browse the repository at this point in the history
  • Loading branch information
daniddelrio committed Feb 7, 2023
1 parent 93add01 commit e54d4cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions experiments/experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ func (ec *experimentContext) createTemplateService(template *v1alpha1.TemplateSp
for _, ctr := range rs.Spec.Template.Spec.Containers {
for _, port := range ctr.Ports {
servicePort := corev1.ServicePort{
Name: port.Name,
Protocol: port.Protocol,
Port: port.ContainerPort,
TargetPort: intstr.FromInt(int(port.ContainerPort)),
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/functional/experiment-with-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ spec:
memory: 16Mi
cpu: 1m
ports:
- protocol: TCP
- name: api
protocol: TCP
containerPort: 8080

0 comments on commit e54d4cd

Please sign in to comment.