Documentation ¶
Index ¶
- Constants
- Variables
- func BaseController(name string, config config.OptionSource) controller.Configuration
- func GetEndpoints(logger *utils.Notifier, obj resources.Object) []net.IP
- func GetServicePort(cntr controller.Interface, name string, kind string, proto corev1.Protocol) (int, error)
- func IsLocalLink(klink *api.KubeLink) bool
- func ObjectName(name kubelink.LinkName) resources.ObjectName
- func SecretCacheReconciler(config controller.Configuration) controller.Configuration
- func String(r netlink.Route) string
- type Common
- type Config
- type EmbeddingFunction
- type LinkInfo
- type LinkTool
- func (this *LinkTool) AppendRule(t string, c string, r iptables.Rule) error
- func (this *LinkTool) AssureChains(logger utils.NotificationLogger, header string, chains iptables.Requests, ...) error
- func (this *LinkTool) AssureRule(logger utils.NotificationLogger, t string, c string, r iptables.Rule, ...) error
- func (this *LinkTool) ChainRequest(logger utils.NotificationLogger, req *iptables.ChainRequest) error
- func (this *LinkTool) ClearChain(logger utils.NotificationLogger, t string, c string) error
- func (this *LinkTool) DeleteChain(logger utils.NotificationLogger, t string, c string) error
- func (this *LinkTool) DeleteRule(t string, c string, r iptables.Rule) error
- func (this *LinkTool) ExistsRule(t string, c string, r iptables.Rule) (bool, error)
- func (this *LinkTool) HandleFirewall(logger logger.LogContext, chains iptables.Requests) error
- func (this *LinkTool) HandleNat(logger logger.LogContext, chains iptables.Requests) error
- func (this *LinkTool) ListChains(t string) ([]string, error)
- func (this *LinkTool) ManageChains(logger logger.LogContext, area string, embed EmbeddingFunction, ...) error
- func (this *LinkTool) NatRulesAppend(rule ...string) error
- func (this *LinkTool) NatRulesDelete(rule ...string) error
- func (this *LinkTool) NatRulesExists(rule ...string) (bool, error)
- func (this *LinkTool) PrepareLink(logger logger.LogContext, link netlink.Link, clusterAddresses tcp.CIDRList, ...) (func(), error)
- func (this *LinkTool) SetLinkAddress(link netlink.Link, addr *net.IPNet) error
- func (this *LinkTool) SetNATRule(link netlink.Link, clusterAddress *net.IPNet) (func(), error)
- func (this *LinkTool) UpdateLinkAddresses(logger logger.LogContext, link netlink.Link, addrs tcp.CIDRList) error
- type LocalGatewayInfo
- type NotificationHandler
- type Reconciler
- func (this *Reconciler) Command(logger logger.LogContext, cmd string) reconcile.Status
- func (this *Reconciler) Config() config.OptionSource
- func (this *Reconciler) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status
- func (this *Reconciler) Deleted(logger logger.LogContext, key resources.ClusterObjectKey) reconcile.Status
- func (this *Reconciler) LinkTool() *LinkTool
- func (this *Reconciler) Links() kubelink.Links
- func (this *Reconciler) NodeInterface() *kubelink.NodeInterface
- func (this *Reconciler) Reconcile(logger logger.LogContext, obj resources.Object) reconcile.Status
- func (this *Reconciler) ReconcileAndGetLink(logger logger.LogContext, obj resources.Object) (*kubelink.Link, reconcile.Status)
- func (this *Reconciler) ReconcileLink(logger logger.LogContext, obj resources.Object) reconcile.Status
- func (this *Reconciler) Setup()
- func (this *Reconciler) SetupIPIP() error
- func (this *Reconciler) Start()
- func (this *Reconciler) WaitIPIP()
- func (this *Reconciler) WaitNetworkReady()
- type ReconcilerImplementation
- type SecretCache
- func (this *SecretCache) AddNotificationHandler(h NotificationHandler, names ...resources.ObjectName) error
- func (this *SecretCache) AllocSecret(name resources.ObjectName, link resources.ObjectName)
- func (this *SecretCache) GetSecretUsers(name resources.ObjectName) resources.ObjectNameSet
- func (this *SecretCache) Notify(name resources.ObjectName, obj resources.Object)
- func (this *SecretCache) ReleaseSecret(name resources.ObjectName, link resources.ObjectName)
- func (this *SecretCache) ReleaseSecretForLink(link resources.ObjectName)
- func (this *SecretCache) RemoveNotificationHandler(h NotificationHandler, names ...resources.ObjectName) error
- func (this *SecretCache) UpdateSecret(name resources.ObjectName, link resources.ObjectName)
- type StatusUpdater
Constants ¶
View Source
const CMD_UPDATE = "update"
View Source
const IPCHAIN = "POSTROUTING"
View Source
const IPIP_CONFIGURE = "configure"
View Source
const IPIP_NONE = "none"
View Source
const IPIP_SHARED = "shared"
View Source
const IPTAB = "nat"
Variables ¶
View Source
var ENDPOINTS = resources.NewGroupKind("", "Endpoints")
View Source
var SECRET = resources.NewGroupKind("", "Secret")
View Source
var SERVICE = resources.NewGroupKind("", "Service")
Functions ¶
func BaseController ¶
func BaseController(name string, config config.OptionSource) controller.Configuration
func GetServicePort ¶
func IsLocalLink ¶
func ObjectName ¶
func ObjectName(name kubelink.LinkName) resources.ObjectName
func SecretCacheReconciler ¶
func SecretCacheReconciler(config controller.Configuration) controller.Configuration
Types ¶
type Common ¶
type Common struct { reconcile.DefaultReconciler // contains filtered or unexported fields }
func NewCommon ¶
func NewCommon(controller controller.Interface) Common
func (*Common) Controller ¶
func (this *Common) Controller() controller.Interface
func (*Common) TriggerLink ¶
func (*Common) TriggerUpdate ¶
func (this *Common) TriggerUpdate()
type LinkTool ¶
type LinkTool struct {
// contains filtered or unexported fields
}
func NewLinkTool ¶
func (*LinkTool) AppendRule ¶
func (*LinkTool) AssureChains ¶
func (*LinkTool) AssureRule ¶
func (*LinkTool) ChainRequest ¶
func (this *LinkTool) ChainRequest(logger utils.NotificationLogger, req *iptables.ChainRequest) error
func (*LinkTool) ClearChain ¶
func (*LinkTool) DeleteChain ¶
func (*LinkTool) DeleteRule ¶
func (*LinkTool) ExistsRule ¶
func (*LinkTool) HandleFirewall ¶
func (*LinkTool) ManageChains ¶
func (this *LinkTool) ManageChains(logger logger.LogContext, area string, embed EmbeddingFunction, chains iptables.Requests) error
func (*LinkTool) NatRulesAppend ¶
func (*LinkTool) NatRulesDelete ¶
func (*LinkTool) NatRulesExists ¶
func (*LinkTool) PrepareLink ¶
func (*LinkTool) SetLinkAddress ¶
func (*LinkTool) SetNATRule ¶
func (*LinkTool) UpdateLinkAddresses ¶
type LocalGatewayInfo ¶
type NotificationHandler ¶
type NotificationHandler interface {
NotifyChange(name resources.ObjectName, object resources.Object)
}
func NotificationFunction ¶
func NotificationFunction(f func(resources.ObjectName, resources.Object)) NotificationHandler
type Reconciler ¶
type Reconciler struct { Common // contains filtered or unexported fields }
func CreateBaseReconciler ¶
func CreateBaseReconciler(controller controller.Interface, impl ReconcilerImplementation, defaultport int) (*Reconciler, error)
func (*Reconciler) Command ¶
func (this *Reconciler) Command(logger logger.LogContext, cmd string) reconcile.Status
func (*Reconciler) Config ¶
func (this *Reconciler) Config() config.OptionSource
func (*Reconciler) Delete ¶
func (this *Reconciler) Delete(logger logger.LogContext, obj resources.Object) reconcile.Status
func (*Reconciler) Deleted ¶
func (this *Reconciler) Deleted(logger logger.LogContext, key resources.ClusterObjectKey) reconcile.Status
func (*Reconciler) LinkTool ¶
func (this *Reconciler) LinkTool() *LinkTool
func (*Reconciler) Links ¶
func (this *Reconciler) Links() kubelink.Links
func (*Reconciler) NodeInterface ¶
func (this *Reconciler) NodeInterface() *kubelink.NodeInterface
func (*Reconciler) Reconcile ¶
func (this *Reconciler) Reconcile(logger logger.LogContext, obj resources.Object) reconcile.Status
func (*Reconciler) ReconcileAndGetLink ¶
func (this *Reconciler) ReconcileAndGetLink(logger logger.LogContext, obj resources.Object) (*kubelink.Link, reconcile.Status)
func (*Reconciler) ReconcileLink ¶
func (this *Reconciler) ReconcileLink(logger logger.LogContext, obj resources.Object) reconcile.Status
func (*Reconciler) Setup ¶
func (this *Reconciler) Setup()
func (*Reconciler) SetupIPIP ¶
func (this *Reconciler) SetupIPIP() error
func (*Reconciler) Start ¶
func (this *Reconciler) Start()
func (*Reconciler) WaitIPIP ¶
func (this *Reconciler) WaitIPIP()
func (*Reconciler) WaitNetworkReady ¶
func (this *Reconciler) WaitNetworkReady()
type ReconcilerImplementation ¶
type ReconcilerImplementation interface { IsManagedRoute(*netlink.Route, kubelink.Routes) bool RequiredRoutes() kubelink.Routes RequiredIPTablesChains() iptables.Requests BaseConfig(config.OptionSource) *Config Gateway(obj *api.KubeLink) (*LocalGatewayInfo, error) GetLinkInfo(link *api.KubeLink) *LinkInfo HandleReconcile(logger logger.LogContext, obj resources.Object, entry *kubelink.Link) (error, error) HandleDelete(logger logger.LogContext, name kubelink.LinkName, obj resources.Object) (bool, error) }
type SecretCache ¶
type SecretCache struct {
// contains filtered or unexported fields
}
func GetSharedSecrets ¶
func GetSharedSecrets(controller controller.Interface) *SecretCache
func NewSecretCache ¶
func NewSecretCache(r resources.ResourcesSource) *SecretCache
func (*SecretCache) AddNotificationHandler ¶
func (this *SecretCache) AddNotificationHandler(h NotificationHandler, names ...resources.ObjectName) error
func (*SecretCache) AllocSecret ¶
func (this *SecretCache) AllocSecret(name resources.ObjectName, link resources.ObjectName)
func (*SecretCache) GetSecretUsers ¶
func (this *SecretCache) GetSecretUsers(name resources.ObjectName) resources.ObjectNameSet
func (*SecretCache) Notify ¶
func (this *SecretCache) Notify(name resources.ObjectName, obj resources.Object)
func (*SecretCache) ReleaseSecret ¶
func (this *SecretCache) ReleaseSecret(name resources.ObjectName, link resources.ObjectName)
func (*SecretCache) ReleaseSecretForLink ¶
func (this *SecretCache) ReleaseSecretForLink(link resources.ObjectName)
func (*SecretCache) RemoveNotificationHandler ¶
func (this *SecretCache) RemoveNotificationHandler(h NotificationHandler, names ...resources.ObjectName) error
func (*SecretCache) UpdateSecret ¶
func (this *SecretCache) UpdateSecret(name resources.ObjectName, link resources.ObjectName)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.