source

package
Version: v0.5.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The annotation used for determining if an ALB ingress is dualstack
	ALBDualstackAnnotationKey = "alb.ingress.kubernetes.io/ip-address-type"
	// The value of the ALB dualstack annotation that indicates it is dualstack
	ALBDualstackAnnotationValue = "dualstack"
)
View Source
const (
	// The annotation used for determining if traffic will go through Cloudflare
	CloudflareProxiedKey = "external-dns.alpha.kubernetes.io/cloudflare-proxied"
)

Provider-specific annotations

Variables

View Source
var ErrSourceNotFound = errors.New("source not found")

ErrSourceNotFound is returned when a requested source doesn't exist.

Functions

func NewCFClient added in v0.5.14

func NewCFClient(cfAPIEndpoint string, cfUsername string, cfPassword string) (*cfclient.Client, error)

NewCFClient return a new CF client object.

func NewCRDClientForAPIVersionKind added in v0.5.6

func NewCRDClientForAPIVersionKind(client kubernetes.Interface, kubeConfig, kubeMaster, apiVersion, kind string) (*rest.RESTClient, *runtime.Scheme, error)

NewCRDClientForAPIVersionKind return rest client for the given apiVersion and kind of the CRD

func NewContourClient added in v0.5.16

func NewContourClient(kubeConfig, kubeMaster string, requestTimeout time.Duration) (*contour.Clientset, error)

NewContourClient returns a new Contour client object. It takes a Config and uses KubeMaster and KubeConfig attributes to connect to the cluster. If KubeConfig isn't provided it defaults to using the recommended default.

func NewIstioClient added in v0.5.6

func NewIstioClient(kubeConfig string) (*istiocrd.Client, error)

NewIstioClient returns a new Istio client object. It uses the configured KubeConfig attribute to connect to the cluster. If KubeConfig isn't provided it defaults to using the recommended default. NB: Istio controls the creation of the underlying Kubernetes client, so we have no ability to tack on transport wrappers (e.g., Prometheus request wrappers) to the client's config at this level. Furthermore, the Istio client constructor does not expose the ability to override the Kubernetes master, so the Master config attribute has no effect.

func NewKubeClient added in v0.4.0

func NewKubeClient(kubeConfig, kubeMaster string, requestTimeout time.Duration) (*kubernetes.Clientset, error)

NewKubeClient returns a new Kubernetes client object. It takes a Config and uses KubeMaster and KubeConfig attributes to connect to the cluster. If KubeConfig isn't provided it defaults to using the recommended default.

Types

type ClientGenerator added in v0.4.0

type ClientGenerator interface {
	KubeClient() (kubernetes.Interface, error)
	IstioClient() (istiomodel.ConfigStore, error)
	CloudFoundryClient(cfAPPEndpoint string, cfUsername string, cfPassword string) (*cfclient.Client, error)
	ContourClient() (contour.Interface, error)
}

ClientGenerator provides clients

type Config added in v0.4.0

type Config struct {
	Namespace                   string
	AnnotationFilter            string
	FQDNTemplate                string
	CombineFQDNAndAnnotation    bool
	IgnoreHostnameAnnotation    bool
	Compatibility               string
	PublishInternal             bool
	PublishHostIP               bool
	ConnectorServer             string
	CRDSourceAPIVersion         string
	CRDSourceKind               string
	KubeConfig                  string
	KubeMaster                  string
	ServiceTypeFilter           []string
	IstioIngressGatewayServices []string
	CFAPIEndpoint               string
	CFUsername                  string
	CFPassword                  string
	ContourLoadBalancerService  string
}

Config holds shared configuration options for all Sources.

type SingletonClientGenerator added in v0.4.0

type SingletonClientGenerator struct {
	KubeConfig     string
	KubeMaster     string
	RequestTimeout time.Duration
	// contains filtered or unexported fields
}

SingletonClientGenerator stores provider clients and guarantees that only one instance of client will be generated

func (*SingletonClientGenerator) CloudFoundryClient added in v0.5.14

func (p *SingletonClientGenerator) CloudFoundryClient(cfAPIEndpoint string, cfUsername string, cfPassword string) (*cfclient.Client, error)

CloudFoundryClient generates a cf client if it was not created before

func (*SingletonClientGenerator) ContourClient added in v0.5.16

func (p *SingletonClientGenerator) ContourClient() (contour.Interface, error)

ContourClient generates a contour client if it was not created before

func (*SingletonClientGenerator) IstioClient added in v0.5.6

IstioClient generates an istio client if it was not created before

func (*SingletonClientGenerator) KubeClient added in v0.4.0

KubeClient generates a kube client if it was not created before

type Source

type Source interface {
	Endpoints() ([]*endpoint.Endpoint, error)
}

Source defines the interface Endpoint sources should implement.

func BuildWithConfig added in v0.4.0

func BuildWithConfig(source string, p ClientGenerator, cfg *Config) (Source, error)

BuildWithConfig allows to generate a Source implementation from the shared config

func ByNames added in v0.4.0

func ByNames(p ClientGenerator, names []string, cfg *Config) ([]Source, error)

ByNames returns multiple Sources given multiple names.

func NewCRDSource added in v0.5.6

func NewCRDSource(crdClient rest.Interface, namespace, kind string, scheme *runtime.Scheme) (Source, error)

NewCRDSource creates a new crdSource with the given config.

func NewCloudFoundrySource added in v0.5.14

func NewCloudFoundrySource(cfClient *cfclient.Client) (Source, error)

NewCloudFoundrySource creates a new cloudfoundrySource with the given config

func NewConnectorSource added in v0.5.2

func NewConnectorSource(remoteServer string) (Source, error)

NewConnectorSource creates a new connectorSource with the given config.

func NewContourIngressRouteSource added in v0.5.16

func NewContourIngressRouteSource(
	kubeClient kubernetes.Interface,
	contourClient contour.Interface,
	contourLoadBalancerService string,
	namespace string,
	annotationFilter string,
	fqdnTemplate string,
	combineFqdnAnnotation bool,
	ignoreHostnameAnnotation bool,
) (Source, error)

NewIngressRouteSource creates a new ingressRouteSource with the given config.

func NewDedupSource added in v0.3.0

func NewDedupSource(source Source) Source

NewDedupSource creates a new dedupSource wrapping the provided Source.

func NewEmptySource added in v0.5.15

func NewEmptySource() Source

NewEmptySource creates a new emptySource.

func NewFakeSource added in v0.4.0

func NewFakeSource(fqdnTemplate string) (Source, error)

NewFakeSource creates a new fakeSource with the given config.

func NewIngressSource

func NewIngressSource(kubeClient kubernetes.Interface, namespace, annotationFilter string, fqdnTemplate string, combineFqdnAnnotation bool, ignoreHostnameAnnotation bool) (Source, error)

NewIngressSource creates a new ingressSource with the given config.

func NewIstioGatewaySource added in v0.5.6

func NewIstioGatewaySource(
	kubeClient kubernetes.Interface,
	istioClient istiomodel.ConfigStore,
	istioIngressGatewayServices []string,
	namespace string,
	annotationFilter string,
	fqdnTemplate string,
	combineFqdnAnnotation bool,
	ignoreHostnameAnnotation bool,
) (Source, error)

NewIstioGatewaySource creates a new gatewaySource with the given config.

func NewMultiSource

func NewMultiSource(children []Source) Source

NewMultiSource creates a new multiSource.

func NewServiceSource

func NewServiceSource(kubeClient kubernetes.Interface, namespace, annotationFilter string, fqdnTemplate string, combineFqdnAnnotation bool, compatibility string, publishInternal bool, publishHostIP bool, serviceTypeFilter []string, ignoreHostnameAnnotation bool) (Source, error)

NewServiceSource creates a new serviceSource with the given config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL