-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add a default A record for each VM #65
Conversation
ff8deea
to
6d74931
Compare
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.
Thanks
Worth to describe please the the FQDN includes cluster_name vm.namespace.<cluster_name>.
(as mentioned on ticket / done by tests)
func getIPFromARecord(record string) string { | ||
index := strings.Index(record, "IN A") | ||
ipAddress := record[index+len("IN A"):] | ||
return strings.TrimSpace(ipAddress) | ||
} |
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.
Please consider (it assumes there is a match, because we know exactly how the string is built)
var re = regexp.MustCompile(`IN A ([\d.]+)`)
...
func getIPFromARecord(record string) string {
return re.FindStringSubmatch(record)[1]
}
or just to capture the IP during the loop here
https://github.com/kubevirt/kubesecondarydns/pull/65/files#diff-a30c82f2c74defbce7c4500610281c5da73d3882f7323c22a5223d1632a2011eR116
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.
done.
Describe where? It is written in the PR description - "make vm.namespace. resolve to one of the VM-reported IP addresses. " |
In the PR desc itself please, just to add there that <cluster_name> should be part of the query (PR desc atm doesn't mention <cluster_name> as part of the query) |
make vm.namespace.<cluster> resolve to one of the VM-reported IP addresses. This may make it a bit easier to find the VM even if the user does not recall its interface names. Signed-off-by: Dan Kenigsberg <[email protected]> Signed-off-by: Alona Paz <[email protected]>
Signed-off-by: Alona Paz <[email protected]>
6d74931
to
7970921
Compare
/test pull-kubesecondarydns-e2e-k8s failure not relevant |
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.
Thanks
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlonaKaplan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
make
vm.namespace.<cluster>.
resolve to one of the VM-reported IP addresses. This may make it a bit easier to find the VM even if the user does not recall its interface names.What this PR does / why we need it:
make
vm.namespace.<cluster>.
resolve to one of the VM-reported IP addresses. This may make it a bit easier to find the VM even if the user does not recall its interface names.This intends to resolve https://issues.redhat.com/browse/CNV-30087
Special notes for your reviewer:
Finalizing PR #60