-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
federation: fix dns provider initialization issues #27252
Changes from all commits
29cc7c0
318f37c
72a0806
dd78dd8
8e26283
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,10 @@ type ControllerManagerConfiguration struct { | |
Port int `json:"port"` | ||
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces). | ||
Address string `json:"address"` | ||
// federation name. | ||
FederationName string `json:"federationName"` | ||
// zone name, like example.com. | ||
ZoneName string `json:"zoneName"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which zone is this? The zone in which federation control plane is running? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: at other places we just use Zone (or Zones) rather than ZoneName There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nikhil this is the DNS zone name of the federation (see comment directly above). We could perhaps prefix it with "dns" to make that clearer. Zone or Zones usually refer to structs or interfaces, not plain names. Make sense? |
||
// dnsProvider is the provider for dns services. | ||
DnsProvider string `json:"dnsProvider"` | ||
// dnsConfigFile is the path to the dns provider configuration file. | ||
|
@@ -90,6 +94,8 @@ func NewCMServer() *CMServer { | |
func (s *CMServer) AddFlags(fs *pflag.FlagSet) { | ||
fs.IntVar(&s.Port, "port", s.Port, "The port that the controller-manager's http service runs on") | ||
fs.Var(componentconfig.IPVar{Val: &s.Address}, "address", "The IP address to serve on (set to 0.0.0.0 for all interfaces)") | ||
fs.StringVar(&s.FederationName, "federation-name", s.FederationName, "Federation name.") | ||
fs.StringVar(&s.ZoneName, "zone-name", s.ZoneName, "Zone name, like example.com.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I think that we should call this "DNSZoneName", "dns-zone-name" etc, to disambiguate it from an availability zone name. Comment/doc field should similarly include "DNS" to make it clearer. |
||
fs.IntVar(&s.ConcurrentServiceSyncs, "concurrent-service-syncs", s.ConcurrentServiceSyncs, "The number of service syncing operations that will be done concurrently. Larger number = faster endpoint updating, but more CPU (and network) load") | ||
fs.DurationVar(&s.ClusterMonitorPeriod.Duration, "cluster-monitor-period", s.ClusterMonitorPeriod.Duration, "The period for syncing ClusterStatus in ClusterController.") | ||
fs.BoolVar(&s.EnableProfiling, "profiling", true, "Enable profiling via web interface host:port/debug/pprof/") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I choose any name? Does it have to match a DNS config parameter?
Or any other parameter anywhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikhiljindal Yes, any name, provided that all federations of which a cluster is a member have unique names. The federation name does not need to match any DNS configuration parameters, or anything else (that I can think of).