Do not update a secret not referenced by ingress rules
This commit is contained in:
parent
90eff7d34c
commit
a36cd10041
5 changed files with 303 additions and 4 deletions
|
|
@ -172,6 +172,26 @@ func (f *Framework) WaitForNginxServer(name string, matcher func(cfg string) boo
|
|||
return wait.PollImmediate(Poll, time.Minute*2, f.matchNginxConditions(name, matcher))
|
||||
}
|
||||
|
||||
// NginxLogs returns the logs of the nginx ingress controller pod running
|
||||
func (f *Framework) NginxLogs() (string, error) {
|
||||
l, err := f.KubeClientSet.CoreV1().Pods("ingress-nginx").List(metav1.ListOptions{
|
||||
LabelSelector: "app=ingress-nginx",
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if len(l.Items) == 0 {
|
||||
return "", fmt.Errorf("no nginx ingress controller pod is running")
|
||||
}
|
||||
|
||||
if len(l.Items) != 1 {
|
||||
return "", fmt.Errorf("unexpected number of nginx ingress controller pod is running (%v)", len(l.Items))
|
||||
}
|
||||
|
||||
return f.Logs(&l.Items[0])
|
||||
}
|
||||
|
||||
func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) bool) wait.ConditionFunc {
|
||||
return func() (bool, error) {
|
||||
l, err := f.KubeClientSet.CoreV1().Pods("ingress-nginx").List(metav1.ListOptions{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue