func()

in cmd/kube-dns/app/options/options.go [148:192]


func (s *KubeDNSConfig) AddFlags(fs *pflag.FlagSet) {
	fs.Var(clusterDomainVar{&s.ClusterDomain}, "domain",
		"domain under which to create names")

	fs.StringVar(&s.NameServers, "nameservers", s.NameServers,
		"List of ip:port, separated by commas of nameservers to forward queries to. "+
			"If set, overrides upstream servers taken from the nameserver option in /etc/resolv.conf. "+
			"Example: 8.8.8.8:53,8.8.4.4 (default port is 53)")

	fs.StringVar(&s.KubeConfigFile, "kubecfg-file", s.KubeConfigFile,
		"Location of kubecfg file for access to kubernetes master service;"+
			" --kube-master-url overrides the URL part of this; if this is not"+
			" provided, defaults to service account tokens")
	fs.Var(kubeMasterURLVar{&s.KubeMasterURL}, "kube-master-url",
		"URL to reach kubernetes master. Env variables in this flag will be expanded.")

	fs.IntVar(&s.HealthzPort, "healthz-port", s.HealthzPort,
		"port on which to serve a kube-dns HTTP readiness probe.")
	fs.StringVar(&s.DNSBindAddress, "dns-bind-address", s.DNSBindAddress,
		"address on which to serve DNS requests.")
	fs.IntVar(&s.DNSPort, "dns-port", s.DNSPort, "port on which to serve DNS requests.")

	fs.Var(federationsVar{s.Federations}, "federations",
		"a comma separated list of the federation names and their corresponding"+
			" domain names to which this cluster belongs. Example:"+
			" \"myfederation1=example.com,myfederation2=example2.com,myfederation3=example.com\"."+
			" It is an error to set both the federations and config-map or config-dir flags.")
	fs.MarkDeprecated("federations", "use config-dir instead. Will be removed in future version")

	fs.StringVar(&s.ConfigMapNs, "config-map-namespace", s.ConfigMapNs,
		"namespace for the config-map")
	fs.StringVar(&s.ConfigMap, "config-map", s.ConfigMap,
		"config-map name. If empty, then the config-map will not used. Cannot be "+
			"used in conjunction with federations or config-dir flag. config-map contains "+
			"dynamically adjustable configuration.")
	fs.DurationVar(&s.InitialSyncTimeout, "initial-sync-timeout", s.InitialSyncTimeout,
		"Timeout for initial resource sync.")

	fs.StringVar(&s.ConfigDir, "config-dir", s.ConfigDir,
		"directory to read config values from. Cannot be "+
			"used in conjunction with federations or config-map flag.")
	fs.DurationVar(&s.ConfigPeriod, "config-period", s.ConfigPeriod,
		"period at which to check for updates in config-dir.")
	fs.BoolVar(&s.Profiling, "profiling", s.Profiling, "specifies whether to enable profiling")
}