Add TLSStores to Kubernetes CRD

This commit is contained in:
Daniel Tomcej 2020-02-24 08:14:06 -08:00 committed by GitHub
parent 101aefbfe8
commit a474e196ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 1560 additions and 6 deletions

View file

@ -34,6 +34,7 @@ type clientMock struct {
ingressRouteTCPs []*v1alpha1.IngressRouteTCP
middlewares []*v1alpha1.Middleware
tlsOptions []*v1alpha1.TLSOption
tlsStores []*v1alpha1.TLSStore
traefikServices []*v1alpha1.TraefikService
watchChan chan interface{}
@ -65,6 +66,8 @@ func newClientMock(paths ...string) clientMock {
c.traefikServices = append(c.traefikServices, o)
case *v1alpha1.TLSOption:
c.tlsOptions = append(c.tlsOptions, o)
case *v1alpha1.TLSStore:
c.tlsStores = append(c.tlsStores, o)
case *corev1.Secret:
c.secrets = append(c.secrets, o)
default:
@ -106,6 +109,10 @@ func (c clientMock) GetTLSOptions() []*v1alpha1.TLSOption {
return c.tlsOptions
}
func (c clientMock) GetTLSStores() []*v1alpha1.TLSStore {
return c.tlsStores
}
func (c clientMock) GetTLSOption(namespace, name string) (*v1alpha1.TLSOption, bool, error) {
for _, option := range c.tlsOptions {
if option.Namespace == namespace && option.Name == name {