Skip to content

Commit

Permalink
fix: set pathType when creating ingress (#3322) (#3323)
Browse files Browse the repository at this point in the history
* fix: set pathType when creating ingress

* feature: rm useless file

Co-authored-by: 悟空 <rainchan365@163.com>
  • Loading branch information
erda-bot and dspo committed Dec 9, 2021
1 parent aaf404e commit a5cc182
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pkg/k8s/typed/networking/v1/ingress.go
Expand Up @@ -70,14 +70,16 @@ func (ing IngressHelper) NewIngress(material union_interface.IngressMaterial) in
}
}
for _, route := range material.Routes {
pathType := PathTypeImplementationSpecific
ingress.Spec.Rules = append(ingress.Spec.Rules, IngressRule{
Host: route.Domain,
IngressRuleValue: IngressRuleValue{
HTTP: &HTTPIngressRuleValue{
Paths: []HTTPIngressPath{
{
Path: route.Path,
Backend: ingressBackend,
Path: route.Path,
PathType: &pathType,
Backend: ingressBackend,
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions pkg/k8s/typed/networking/v1beta1/ingress.go
Expand Up @@ -67,14 +67,16 @@ func (ing IngressHelper) NewIngress(material union_interface.IngressMaterial) in
}
}
for _, route := range material.Routes {
pathType := PathTypeImplementationSpecific
ingress.Spec.Rules = append(ingress.Spec.Rules, IngressRule{
Host: route.Domain,
IngressRuleValue: IngressRuleValue{
HTTP: &HTTPIngressRuleValue{
Paths: []HTTPIngressPath{
{
Path: route.Path,
Backend: ingressBackend,
Path: route.Path,
PathType: &pathType,
Backend: ingressBackend,
},
},
},
Expand Down

0 comments on commit a5cc182

Please sign in to comment.