Documentation ¶
Index ¶
- Variables
- func NPGenerate(ip_map *dnsv1alpha1.IPMap) (np *networking.NetworkPolicy)
- type DNSResolverReconciler
- type IPCacheT
- func (cache *IPCacheT) CleanUp(name types.NamespacedName)
- func (cache *IPCacheT) Delete(name types.NamespacedName, ip string)
- func (cache *IPCacheT) Get(name types.NamespacedName, ip string) time.Time
- func (cache *IPCacheT) NameExists(name types.NamespacedName) bool
- func (cache *IPCacheT) Set(name types.NamespacedName, ip string, expires time.Time)
Constants ¶
This section is empty.
Variables ¶
View Source
var Config struct { EnableIPv6 bool IPExpiration time.Duration MaxRequeueTime uint32 DNS *dns.ClientConfig DNSProtocol string DNSEnvironment string UpstreamDNSService string }
Functions ¶
func NPGenerate ¶
func NPGenerate(ip_map *dnsv1alpha1.IPMap) (np *networking.NetworkPolicy)
Types ¶
type DNSResolverReconciler ¶
func (DNSResolverReconciler) NPReconcile ¶
func (r DNSResolverReconciler) NPReconcile(ctx context.Context, ip_map *dnsv1alpha1.IPMap) error
Create or update the NetworkPolicy associated with ip_map
func (*DNSResolverReconciler) Reconcile ¶
func (r *DNSResolverReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile makes sure that each DNSResolver has an associated IPMap. It gets triggered by changes in DNSResolvers
func (*DNSResolverReconciler) SetupWithManager ¶
func (r *DNSResolverReconciler) SetupWithManager(mgr ctrl.Manager) error
type IPCacheT ¶
type IPCacheT struct {
// contains filtered or unexported fields
}
IPCache keeps track of when an IP that is no longer seen should be removed from an IPMap
var IPCache IPCacheT
func (*IPCacheT) CleanUp ¶
func (cache *IPCacheT) CleanUp(name types.NamespacedName)
Remove expired IPs from cache
func (*IPCacheT) Get ¶
Return the expiration time for an IPMap and IP if it exists, the zero time if not
func (*IPCacheT) NameExists ¶
func (cache *IPCacheT) NameExists(name types.NamespacedName) bool
Click to show internal directories.
Click to hide internal directories.