Skip to content

Commit

Permalink
Use Prefix PathType in ingresses everywhere (#3094)
Browse files Browse the repository at this point in the history
Signed-off-by: JamesMurkin <[email protected]>
Co-authored-by: JamesMurkin <[email protected]>
  • Loading branch information
d80tb7 and JamesMurkin authored Nov 10, 2023
1 parent 0db72d2 commit 949f011
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion deployment/armada/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
http:
paths:
- path: /
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "armada.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion deployment/armada/templates/ingressrest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
http:
paths:
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "armada.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion deployment/binoculars/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
http:
paths:
- path: /
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "binoculars.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion deployment/binoculars/templates/ingressrest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
http:
paths:
- path: /api(/|$)(.*)
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "binoculars.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion deployment/jobservice/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
http:
paths:
- path: /
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "jobservice.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion deployment/lookout-v2/templates/ingressweb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
http:
paths:
- path: /
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "lookout_v2.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion deployment/scheduler/templates/scheduler-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
http:
paths:
- path: /
pathType: ImplementationSpecific
pathType: Prefix
backend:
service:
name: {{ include "armada-scheduler.name" $root }}
Expand Down
2 changes: 1 addition & 1 deletion internal/common/eventutil/eventutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func TestK8sServicesIngressesFromApiJob(t *testing.T) {
)

expectedIngressRules := make([]networking.IngressRule, 2)
pathType := networking.PathTypeImplementationSpecific
pathType := networking.PathTypePrefix
for i, container := range apiJob.PodSpec.Containers {
expectedIngressRules[i] = networking.IngressRule{
Host: fmt.Sprintf("%s-%d-armada-%s-0.%s.%s",
Expand Down
2 changes: 1 addition & 1 deletion internal/executor/reporter/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func createNodeAllocatedPod() *v1.Pod {
}

func createIngress(hostname string, port int32) *networking.Ingress {
pathType := networking.PathTypeImplementationSpecific
pathType := networking.PathTypePrefix
return &networking.Ingress{
Spec: networking.IngressSpec{
Rules: []networking.IngressRule{
Expand Down
2 changes: 1 addition & 1 deletion internal/executor/util/kubernetes_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func CreateIngress(
tlsHosts = append(tlsHosts, host)

// Workaround to get constant's address
pathType := networking.PathTypeImplementationSpecific
pathType := networking.PathTypePrefix
path := networking.IngressRule{
Host: host,
IngressRuleValue: networking.IngressRuleValue{
Expand Down
4 changes: 2 additions & 2 deletions internal/executor/util/kubernetes_objects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestCreateIngress_Basic(t *testing.T) {

result := CreateIngress("testIngress", job, pod, service, ingressConfig, jobConfig)

pathType := networking.PathTypeImplementationSpecific
pathType := networking.PathTypePrefix
expectedIngressSpec := networking.IngressSpec{
TLS: []networking.IngressTLS{},
Rules: []networking.IngressRule{
Expand Down Expand Up @@ -228,7 +228,7 @@ func TestCreateIngress_TLS(t *testing.T) {

result := CreateIngress("testIngress", job, pod, service, ingressConfig, jobConfig)

pathType := networking.PathTypeImplementationSpecific
pathType := networking.PathTypePrefix
expectedIngressSpec := networking.IngressSpec{
TLS: []networking.IngressTLS{
{
Expand Down

0 comments on commit 949f011

Please sign in to comment.