New static configuration loading system.

Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
Ludovic Fernandez 2019-06-17 11:48:05 +02:00 committed by Traefiker Bot
parent d18edd6f77
commit 8d7eccad5d
165 changed files with 10894 additions and 6076 deletions

View file

@ -17,7 +17,6 @@ import (
"github.com/containous/traefik/pkg/config"
"github.com/containous/traefik/pkg/job"
"github.com/containous/traefik/pkg/log"
"github.com/containous/traefik/pkg/provider/kubernetes/k8s"
"github.com/containous/traefik/pkg/safe"
"github.com/containous/traefik/pkg/tls"
corev1 "k8s.io/api/core/v1"
@ -33,22 +32,22 @@ const (
// Provider holds configurations of the provider.
type Provider struct {
Endpoint string `description:"Kubernetes server endpoint (required for external cluster client)"`
Token string `description:"Kubernetes bearer token (not needed for in-cluster client)"`
CertAuthFilePath string `description:"Kubernetes certificate authority file path (not needed for in-cluster client)"`
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers" export:"true"`
Namespaces k8s.Namespaces `description:"Kubernetes namespaces" export:"true"`
LabelSelector string `description:"Kubernetes Ingress label selector to use" export:"true"`
IngressClass string `description:"Value of kubernetes.io/ingress.class annotation to watch for" export:"true"`
IngressEndpoint *EndpointIngress `description:"Kubernetes Ingress Endpoint"`
Endpoint string `description:"Kubernetes server endpoint (required for external cluster client)."`
Token string `description:"Kubernetes bearer token (not needed for in-cluster client)."`
CertAuthFilePath string `description:"Kubernetes certificate authority file path (not needed for in-cluster client)."`
DisablePassHostHeaders bool `description:"Kubernetes disable PassHost Headers." export:"true"`
Namespaces []string `description:"Kubernetes namespaces." export:"true"`
LabelSelector string `description:"Kubernetes Ingress label selector to use." export:"true"`
IngressClass string `description:"Value of kubernetes.io/ingress.class annotation to watch for." export:"true"`
IngressEndpoint *EndpointIngress `description:"Kubernetes Ingress Endpoint."`
lastConfiguration safe.Safe
}
// EndpointIngress holds the endpoint information for the Kubernetes provider
type EndpointIngress struct {
IP string `description:"IP used for Kubernetes Ingress endpoints"`
Hostname string `description:"Hostname used for Kubernetes Ingress endpoints"`
PublishedService string `description:"Published Kubernetes Service to copy status from"`
IP string `description:"IP used for Kubernetes Ingress endpoints."`
Hostname string `description:"Hostname used for Kubernetes Ingress endpoints."`
PublishedService string `description:"Published Kubernetes Service to copy status from."`
}
func (p *Provider) newK8sClient(ctx context.Context, ingressLabelSelector string) (*clientWrapper, error) {