Define TLS options on the Router configuration for Kubernetes
Co-authored-by: juliens <julien@containo.us>
This commit is contained in:
parent
69cf05df9a
commit
80b35575df
48 changed files with 2374 additions and 53 deletions
|
@ -37,6 +37,7 @@ type clientMock struct {
|
|||
ingressRoutes []*v1alpha1.IngressRoute
|
||||
ingressRouteTCPs []*v1alpha1.IngressRouteTCP
|
||||
middlewares []*v1alpha1.Middleware
|
||||
tlsOptions []*v1alpha1.TLSOption
|
||||
|
||||
watchChan chan interface{}
|
||||
}
|
||||
|
@ -63,6 +64,8 @@ func newClientMock(paths ...string) clientMock {
|
|||
c.ingressRouteTCPs = append(c.ingressRouteTCPs, o)
|
||||
case *v1alpha1.Middleware:
|
||||
c.middlewares = append(c.middlewares, o)
|
||||
case *v1alpha1.TLSOption:
|
||||
c.tlsOptions = append(c.tlsOptions, o)
|
||||
case *v1beta12.Ingress:
|
||||
c.ingresses = append(c.ingresses, o)
|
||||
case *corev1.Secret:
|
||||
|
@ -88,6 +91,20 @@ func (c clientMock) GetMiddlewares() []*v1alpha1.Middleware {
|
|||
return c.middlewares
|
||||
}
|
||||
|
||||
func (c clientMock) GetTLSOptions() []*v1alpha1.TLSOption {
|
||||
return c.tlsOptions
|
||||
}
|
||||
|
||||
func (c clientMock) GetTLSOption(namespace, name string) (*v1alpha1.TLSOption, bool, error) {
|
||||
for _, option := range c.tlsOptions {
|
||||
if option.Namespace == namespace && option.Name == name {
|
||||
return option, true, nil
|
||||
}
|
||||
}
|
||||
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
func (c clientMock) GetIngresses() []*extensionsv1beta1.Ingress {
|
||||
return c.ingresses
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue