// Mutate allows applying pre-defined modifications to the config before it's marshaled. func (kc *kubeletConfig) Mutate() error { … } // mutateResolverConfig mutates the ResolverConfig in the kubeletConfig dynamically. func mutateResolverConfig(cfg *kubeletconfig.KubeletConfiguration, isServiceActiveFunc func(string) (bool, error)) error { … } // isServiceActive checks whether the given service exists and is running func isServiceActive(name string) (bool, error) { … }