Documentation ¶
Index ¶
- Constants
- Variables
- func Equivalent(s1, s2 *v1.Service) bool
- func UpdateIngressAnnotation(service *v1.Service, ingress *FederatedServiceIngress) *v1.Service
- type FederatedServiceIngress
- func (ingress *FederatedServiceIngress) AddClusterLoadBalancerIngresses(cluster string, loadbalancerIngresses []v1.LoadBalancerIngress)
- func (ingress *FederatedServiceIngress) AddEndpoints(cluster string, endpoints []string) *FederatedServiceIngress
- func (ingress *FederatedServiceIngress) GetClusterLoadBalancerIngresses(cluster string) []v1.LoadBalancerIngress
- func (ingress *FederatedServiceIngress) Len() int
- func (ingress *FederatedServiceIngress) Less(i, j int) bool
- func (ingress *FederatedServiceIngress) RemoveEndpoint(cluster string, endpoint string) *FederatedServiceIngress
- func (ingress *FederatedServiceIngress) String() string
- func (ingress *FederatedServiceIngress) Swap(i, j int)
- type ServiceController
- type ServiceDNSController
Constants ¶
const ( DNSControllerName = "service-dns" DNSUserAgentName = "federation-service-dns-controller" )
const ( UserAgentName = "federation-service-controller" ControllerName = "services" )
const (
FederatedServiceIngressAnnotation = "federation.kubernetes.io/service-ingresses"
)
Variables ¶
var (
RequiredResources = []schema.GroupVersionResource{v1.SchemeGroupVersion.WithResource("services")}
)
Functions ¶
func Equivalent ¶ added in v1.7.0
Equivalent Checks if cluster-independent, user provided data in two given services are equal. If in the future the services structure is expanded then any field that is not populated by the api server should be included here.
func UpdateIngressAnnotation ¶
func UpdateIngressAnnotation(service *v1.Service, ingress *FederatedServiceIngress) *v1.Service
UpdateIngressAnnotation updates the federated service with service ingress annotation
Types ¶
type FederatedServiceIngress ¶
type FederatedServiceIngress struct {
fedapi.FederatedServiceIngress
}
FederatedServiceIngress implements sort.Interface.
func NewFederatedServiceIngress ¶
func NewFederatedServiceIngress() *FederatedServiceIngress
func ParseFederatedServiceIngress ¶
func ParseFederatedServiceIngress(service *v1.Service) (*FederatedServiceIngress, error)
ParseFederatedServiceIngress extracts federated service ingresses from a federated service
func (*FederatedServiceIngress) AddClusterLoadBalancerIngresses ¶
func (ingress *FederatedServiceIngress) AddClusterLoadBalancerIngresses(cluster string, loadbalancerIngresses []v1.LoadBalancerIngress)
AddClusterLoadBalancerIngresses adds the ladbalancer ingresses for a given cluster to federated service ingress
func (*FederatedServiceIngress) AddEndpoints ¶
func (ingress *FederatedServiceIngress) AddEndpoints(cluster string, endpoints []string) *FederatedServiceIngress
AddEndpoints add one or more endpoints to federated service ingress. endpoints are federated cluster's loadbalancer ip/hostname for the service
func (*FederatedServiceIngress) GetClusterLoadBalancerIngresses ¶
func (ingress *FederatedServiceIngress) GetClusterLoadBalancerIngresses(cluster string) []v1.LoadBalancerIngress
GetClusterLoadBalancerIngresses returns loadbalancer ingresses for given cluster if exist otherwise returns an empty slice
func (*FederatedServiceIngress) Len ¶
func (ingress *FederatedServiceIngress) Len() int
Len is to satisfy of sort.Interface.
func (*FederatedServiceIngress) Less ¶
func (ingress *FederatedServiceIngress) Less(i, j int) bool
Less is to satisfy of sort.Interface.
func (*FederatedServiceIngress) RemoveEndpoint ¶
func (ingress *FederatedServiceIngress) RemoveEndpoint(cluster string, endpoint string) *FederatedServiceIngress
RemoveEndpoint removes a single endpoint (ip/hostname) from the federated service ingress
func (*FederatedServiceIngress) String ¶
func (ingress *FederatedServiceIngress) String() string
func (*FederatedServiceIngress) Swap ¶
func (ingress *FederatedServiceIngress) Swap(i, j int)
Swap is to satisfy of sort.Interface.
type ServiceController ¶
type ServiceController struct {
// contains filtered or unexported fields
}
func New ¶
func New(federationClient fedclientset.Interface) *ServiceController
New returns a new service controller to keep DNS provider service resources (like Kubernetes Services and DNS server records for service discovery) in sync with the registry.
func (*ServiceController) Run ¶
func (s *ServiceController) Run(workers int, stopCh <-chan struct{})
It's an error to call Run() more than once for a given ServiceController object.
type ServiceDNSController ¶
type ServiceDNSController struct {
// contains filtered or unexported fields
}
func NewServiceDNSController ¶
func NewServiceDNSController(client fedclientset.Interface, dnsProvider, dnsProviderConfig, federationName, serviceDNSSuffix, zoneName, zoneID string) (*ServiceDNSController, error)
NewServiceDNSController returns a new service dns controller to manage DNS records for federated services
func (*ServiceDNSController) DNSControllerRun ¶
func (s *ServiceDNSController) DNSControllerRun(workers int, stopCh <-chan struct{})