HostsReconciler populates an /etc/hosts style file in the CoreDNS config map, supporting in-pod resolution of our k8s.local entries.
| 41 | // HostsReconciler populates an /etc/hosts style file in the CoreDNS config map, |
| 42 | // supporting in-pod resolution of our k8s.local entries. |
| 43 | type 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 |
| 64 | func NewHostsReconciler(mgr manager.Manager, opt *config.Options, configMapID types.NamespacedName) (*HostsReconciler, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected