Documentation ¶
Index ¶
- Variables
- func NewKubeClient(kubeConfig, kubeMaster string) (*kubernetes.Clientset, error)
- type ClientGenerator
- type Config
- type NodeIPs
- type SingletonClientGenerator
- type Source
- func BuildWithConfig(source string, p ClientGenerator, cfg *Config, clusterName string) (Source, error)
- func ByNames(p ClientGenerator, names []string, cfg *Config, clusterName string) ([]Source, error)
- func NewFakeSource(fqdnTemplate string) (Source, error)
- func NewMultiSource(children []Source) Source
- func NewServiceSource(kubeClient kubernetes.Interface, ...) (Source, error)
Constants ¶
This section is empty.
Variables ¶
var ErrSourceNotFound = errors.New("source not found")
ErrSourceNotFound is returned when a requested source doesn't exist.
Functions ¶
func NewKubeClient ¶
func NewKubeClient(kubeConfig, kubeMaster string) (*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 ¶
type ClientGenerator interface {
KubeClient() (kubernetes.Interface, error)
}
ClientGenerator provides clients
type Config ¶
type Config struct { Namespace string AnnotationFilter string FQDNTemplate string CombineFQDNAndAnnotation bool Compatibility string PublishInternal bool DryRun bool }
Config holds shared configuration options for all Sources.
type SingletonClientGenerator ¶
type SingletonClientGenerator struct { KubeConfig string KubeMaster string sync.Once // contains filtered or unexported fields }
SingletonClientGenerator stores provider clients and guarantees that only one instance of client will be generated
func (*SingletonClientGenerator) KubeClient ¶
func (p *SingletonClientGenerator) KubeClient() (kubernetes.Interface, error)
KubeClient generates a kube client if it was not created before
type Source ¶
type Source interface {
ExternalIPSetting() (*setting.ExternalIPSetting, error)
}
Source defines the interface Endpoint sources should implement.
func BuildWithConfig ¶
func BuildWithConfig(source string, p ClientGenerator, cfg *Config, clusterName string) (Source, error)
BuildWithConfig allows to generate a Source implementation from the shared config
func NewFakeSource ¶
NewFakeSource creates a new fakeSource with the given config.
func NewMultiSource ¶
NewMultiSource creates a new multiSource.
func NewServiceSource ¶
func NewServiceSource(kubeClient kubernetes.Interface, clusterName, namespace, annotationFilter string, fqdnTemplate string, combineFqdnAnnotation bool, compatibility string, publishInternal bool, dryRun bool) (Source, error)
NewServiceSource creates a new serviceSource with the given config.