Skip to content

Commit

Permalink
fix(): Option to disable dns proxy
Browse files Browse the repository at this point in the history
Signed-off-by: Bharath Horatti <[email protected]>
  • Loading branch information
bharath-avesha committed Jun 17, 2024
1 parent b9323ce commit f72291c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ type Config struct {
AwarenessGroups awarenessgroups.Decoder `defailt:"" desc:"Awareness groups for mutually aware NSEs" split_words:"true"`
LogLevel string `default:"INFO" desc:"Log level" split_words:"true"`
OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint"`
LocalDNSServerEnabled bool `default:"true" desc:"Local DNS Server enabled/disabled"`
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func main() {
// This is a bug in istio-proxy and we need to workaround it for now.
// NOTE: The /etc/resolv.conf would contain two nameservers only momentarily until the cmd-nsc sidecar
// overwrites it.
if initDnsConfig {
if rootConf.LocalDNSServerEnabled && initDnsConfig {
// Copy the original resolv.conf to the backup directory so that the cmd-nsc sidecar can
// read from the backup and initialize its data structures related to dns resolution.
storeResolvConfigFile := "/etc/nsm-dns-config/resolv.conf.restore"
Expand Down

0 comments on commit f72291c

Please sign in to comment.