-
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
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
1 similar comment
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
5a8a751
to
e855199
Compare
Reviewing now... |
// 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 comment
The 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?
k8s clusters could be in multiple zones.
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.
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 comment
The 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?
@mfanjie Thanks for that great test matrix. We can add more columns noting who is working on adding a test for each of them (@madhusudancs is adding a few in #26636) |
@@ -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 comment
The 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.
@mfanjie Thanks! A few nits that can be addressed in a followup PR. I assume that you ran all of the tests in the attached test matrix manually and they passed? Adding LGTM to get this merged, as it's strictly an improvement over current HEAD, even if all tests are not passing consistently yet. |
ok to test |
Fixed the release note label (and the title) and added back LGTM |
unit test seems to have failed to come up |
@k8s-bot node e2e test this issue: #IGNORE (Logs say all tests passed) |
I saw UT failure, fixing |
fix two more issues:
|
Thanks adding back LGTM |
I think @quinton-hoole has helped to answer most of the questions. |
@@ -242,6 +248,24 @@ func (s *ServiceController) Run(workers int, stopCh <-chan struct{}) error { | |||
return nil | |||
} | |||
|
|||
func (s *ServiceController) init() error { | |||
if s.federationName == "" { | |||
return fmt.Errorf("ServiceController should not be run without federationName.") |
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.
You will need to add these flags to the controller-manager YAML: https://github.com/kubernetes/kubernetes/blob/master/federation/manifests/federation-controller-manager-deployment.yaml#L22. Otherwise, the e2e tests will start failing as soon as this PR is merged.
You can use the FEDERATION_NAME env var for federation name:
kubernetes/federation/cluster/common.sh
Line 96 in 6e5faf5
export FEDERATION_NAME="${FEDERATION_NAME:-federation}" |
You will have to add a similar env var for ZoneName
…creation 2. ensure dns record removal when service being removed
@nikhiljindal thanks for reminding, cloud you please help to review the last commit in this PR. |
lgtm, thx |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 8e26283. |
Automatic merge from submit-queue |
This PR is based on the integration test with Google DNS API. This is the first time of full integration test.
So multiple issues was found and I combined all of them in this single PR
@nikhiljindal , can you help to add 1.3 milestone when @quinton-hoole is on leave?
Thanks.