mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
fix fallback rule and wordings (#9074)
This commit is contained in:
parent
79822e1d3b
commit
90759182db
2 changed files with 26 additions and 17 deletions
|
@ -207,11 +207,13 @@ func (kcl *KubeClient) CreateIngress(namespace string, info models.K8sIngressInf
|
|||
})
|
||||
}
|
||||
|
||||
if len(rules) == 0 {
|
||||
for _, host := range info.Hosts {
|
||||
ingress.Spec.Rules = []netv1.IngressRule{{
|
||||
// Add rules for hosts that does not have paths.
|
||||
// e.g. dafault ingress rule without path to support what we had in 2.15
|
||||
for _, host := range info.Hosts {
|
||||
if _, ok := rules[host]; !ok {
|
||||
ingress.Spec.Rules = append(ingress.Spec.Rules, netv1.IngressRule{
|
||||
Host: host,
|
||||
}}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,11 +289,13 @@ func (kcl *KubeClient) UpdateIngress(namespace string, info models.K8sIngressInf
|
|||
})
|
||||
}
|
||||
|
||||
if len(rules) == 0 {
|
||||
for _, host := range info.Hosts {
|
||||
ingress.Spec.Rules = []netv1.IngressRule{{
|
||||
// Add rules for hosts that does not have paths.
|
||||
// e.g. dafault ingress rule without path to support what we had in 2.15
|
||||
for _, host := range info.Hosts {
|
||||
if _, ok := rules[host]; !ok {
|
||||
ingress.Spec.Rules = append(ingress.Spec.Rules, netv1.IngressRule{
|
||||
Host: host,
|
||||
}}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue