Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
Types ¶
type ConfigMapClient ¶ added in v1.1.1
type ConfigMapClient interface { Get(ctx context.Context) (*v1.ConfigMap, error) Update(ctx context.Context, cfg *v1.ConfigMap) error }
ConfigMapClient is an abstraction over different ways to interact with a ConfigMap.
type DNSManager ¶ added in v1.1.1
type DNSManager interface { GetConfigMap(ctx context.Context) (*v1.ConfigMap, error) AddDNSEntryToConfigMap(ctx context.Context, updatedData map[string]string) error RemoveDNSRecords(ctx context.Context, removals map[string][]string) error ListDNSRecords(ctx context.Context) (map[string][]string, error) AddDNSEntry(ctx context.Context, dnsName, ipAddress string) error RemoveDNSEntry(ctx context.Context, key string) error AddServerToConfigMap(ctx context.Context, domainName, serverDomain, serverPort string) error }
DNSManager defines the interface for managing CoreDNS ConfigMaps.
func NewDNSManager ¶ added in v1.1.1
func NewDNSManager(namespace, configMap string, k8sConfig *rest.Config, crClient client.Client) (DNSManager, error)
NewDNSManager is the factory function that creates a DNSManager. If crClient is provided (non-nil), it uses the controller-runtime client; otherwise, it falls back to using the standard Kubernetes clientset.
Click to show internal directories.
Click to hide internal directories.