Only support SSL dynamic mode
This commit is contained in:
parent
333d9fd48d
commit
80bd481abb
40 changed files with 415 additions and 709 deletions
|
|
@ -165,6 +165,23 @@ func (f *Framework) GetNginxIP() string {
|
|||
return s.Spec.ClusterIP
|
||||
}
|
||||
|
||||
// GetNginxPodIP returns the IP addres/es of the running pods
|
||||
func (f *Framework) GetNginxPodIP() []string {
|
||||
e, err := f.KubeClientSet.
|
||||
CoreV1().
|
||||
Endpoints(f.Namespace).
|
||||
Get("ingress-nginx", metav1.GetOptions{})
|
||||
Expect(err).NotTo(HaveOccurred(), "unexpected error obtaning NGINX IP address")
|
||||
eips := make([]string, 0)
|
||||
for _, s := range e.Subsets {
|
||||
for _, a := range s.Addresses {
|
||||
eips = append(eips, a.IP)
|
||||
}
|
||||
}
|
||||
|
||||
return eips
|
||||
}
|
||||
|
||||
// GetURL returns the URL should be used to make a request to NGINX
|
||||
func (f *Framework) GetURL(scheme RequestScheme) string {
|
||||
ip := f.GetNginxIP()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue