MCPcopy
hub / github.com/kubernetes/kops / HostsReconciler

Struct HostsReconciler

cmd/kops-controller/controllers/hosts_controller.go:43–61  ·  view source on GitHub ↗

HostsReconciler populates an /etc/hosts style file in the CoreDNS config map, supporting in-pod resolution of our k8s.local entries.

Source from the content-addressed store, hash-verified

41// HostsReconciler populates an /etc/hosts style file in the CoreDNS config map,
42// supporting in-pod resolution of our k8s.local entries.
43type HostsReconciler struct {
44 // clusterName identifies the kOps cluster
45 clusterName string
46
47 // configMapID identifies the configmap we should update
48 configMapID types.NamespacedName
49
50 // client is the controller-runtime client
51 client client.Client
52
53 // log is a logr
54 log logr.Logger
55
56 // dynamicClient is a client-go client for patching ConfigMaps
57 dynamicClient dynamic.Interface
58
59 // lastUpdate holds the last value we updated, to reduce spurious updates.
60 lastUpdate *managedConfigMap
61}
62
63// NewHostsReconciler is the constructor for a HostsReconciler
64func NewHostsReconciler(mgr manager.Manager, opt *config.Options, configMapID types.NamespacedName) (*HostsReconciler, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected