-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[openstack] Custom dns prefixes and domains #6349
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
Conversation
|
Hi @bogdando. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@tomassedovic PTAL |
|
Can one of the admins verify this patch?
|
|
e2e with defaults works for me, @tomassedovic |
|
@tomassedovic @e-minguez PTAL . The provided documentation for external DNS services deployment works for me locally. I was using these custom vars for osp10-dns-service's vars.yaml and openshift cluster's external_dns.yaml. |
Support separate public/private DNS records, yet limited to an external DNS managed elsewhere. Users may benefit from this feature by sending nsupdates to private and/or public servers as they want it. Additional changes: * Name Heat stack by openshift_openstack_full_public_dns_domain * Add openshift_openstack_public_dns_domain to the role defaults to not rely on the group vars example only. * Move openshift_master_cluster_public_hostname and openshift_master_default_subdomain from the group vars example to the role defaults, where the values these take are now evaluated. * Evaluate openshift_master_cluster_hostname based on a private domain name as it may be different to the public name now. Signed-off-by: Bogdan Dobrelya <[email protected]>
Describe configuration scenarios for external public and private DNS servers managing public and custom private domain records for the openshift cluster nodes. Specify manual commands required to deploy DNS service with automation playbooks for osp 10 on ocp 3.6 ref arch coming from openshift-ansible-contrib. This improves UX with DNS stack not managed in openshift-ansible. Signed-off-by: Bogdan Dobrelya <[email protected]>
tomassedovic
left a comment
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! I still see the same issue as in the contrib patch: this should be doing hostname suffixes not zone prefixes.
When I have a DNS server configured with the openshift.example.com zone, then setting:
openshift_openstack_private_hostname_suffix: private
I expect it to create entries with the master-0.private or even master-0private hostname and openhsift.example.com zone.
Instead, it keeps hostname as: master-0 and changes the zone to private.openshift.example.com, resulting in the following failure:
failed: [localhost] (item=({u'key_algorithm': u'hmac-sha256', u'zone': u'private.openshift.example.com', u'key_name': u'private-openshift.example.com', u'server': u'10.40.128.138', u'key_secret': u'l[redacted]', u'view': u'private'}, {'ip': u'192.168.99.13', 'hostname': u'master-0', 'type': u'A'})) => {"attempts": 10, "changed": false, "dns_rc": 9, "dns_rc_str": "NOTAUTH", "failed": true, "item": [{"key_algorithm": "hmac-sha256", "key_name": "private-openshift.example.com", "key_secret": "l[redacted]", "server": "10.40.128.138", "view": "private", "zone": "private.openshift.example.com"}, {"hostname": "master-0", "ip": "192.168.99.13", "type": "A"}], "msg": "Failed to create DNS record (rc: 9)"}
Please update the code to leave the zones alone (or possibly as another option), but update the hostname entries.
Just to clarify, it should put 'master-0.private' entries (the shortname 'master-0' kept intact) living in a subdomain 'private' of the main (unchanged) openshift.example.com. So, FQDN would be master-0.private.openshift.example.com and nodes can resolve master-0.private? |
|
I'm sorry @bogdando, I should have specified this more clearly. I'll try to do better next time. This should not even treat it as a subdomain. Just a hostname/record suffix. With If we set Here's the nsupdate entry this should generate: nsupdate:
record: "master-0-private"
zone: "openshift.example.com"
...The nodes resolve the FQDN (just like they do today), so: If we set The resulting nsupdate would look like this: nsupdate:
record: "master-0.private"
zone: "openshift.example.com"
...But no matter what we put in |
I'd like to not modify hostnames, yet using subdomains. Updated for that case. See the docs update to test please.
Is it a strict requirement? I'll have to rework once again then... |
Document additional DNS configuration example for custom a subdomain containing private records. Rework hostname suffixes to alter subdomain of the full domain. Signed-off-by: Bogdan Dobrelya <[email protected]>
|
Yes, the zone must not change. The feature we need is very simple: if you specify a suffix, that string gets concatenated in the And yeah, this shouldn't modify the hostnames. Just the nsupdate records. |
|
@tomassedovic this illustrates your case, yet using subdomains. I found this simpler to implement and bringing less changes into the code than manipulating the hostnames (in the populate-dns task). I'd prefer to not touch hostnames at all. Let's please keep shortnames intact, if possible. Just thinking of the populate-dns taks complexity, it's overcomplicated allready, let's not make it even more complex :) On the other hand, we'll end up having a two separate DNS services (if not using multi views) anyway. And to me it seems not very important, which zone will be hosting the 2nd one, used for private names only. One can put whatever he wants for his private domains/subdomains/zones. Those can't be seen from outside, right? I think we should keep this simple and just using this implementation (w/o touching the populate-dns thing)... |
|
@tomassedovic note, we already have role names suffixes that alter nova servers' names, we need no another altering suffix for this case IMO |
| openshift_openstack_public_subdomain: "{{ openshift_openstack_clusterid|trim + '.' + openshift_openstack_public_dns_domain }}" | ||
| openshift_openstack_private_subdomain: "{{ openshift_openstack_clusterid|trim + '.' + openshift_openstack_private_dns_domain }}" | ||
| openshift_openstack_full_public_dns_domain: "{{ (openshift_openstack_public_hostname_suffix|trim == '') | ternary(openshift_openstack_public_subdomain, openshift_openstack_public_hostname_suffix + '.' + openshift_openstack_public_subdomain) }}" | ||
| openshift_openstack_full_private_dns_domain: "{{ (openshift_openstack_private_hostname_suffix|trim == '') | ternary(openshift_openstack_private_subdomain, openshift_openstack_private_hostname_suffix + '.' + openshift_openstack_private_subdomain) }}" |
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.
@tomassedovic I think subdomains give more flexibility than just hostname suffixes. You cannot alter private domain fully with the latter it seems.
|
Anyway, to make it with hostnames suffixes, let's think of integrating this into openshift_openstack_master_hostname et al as well ... @tomassedovic any ideas? |
|
This is what we need: Plus making sure this propagates to the dynamic inventory. That is all. We can set the domain already by changing the cluster id and default subdomain. It is possible we might want to add support for two completely separate configurable domains at some point, but that should be a separate change. |
I see. I'll keep this PR for that future case then. So I got it, it seems all we want is a single public DNS service capable to resolve |
|
@tomassedovic shall those suffixes be added to FWIW, that's my current understanding I'm gonna put into the new PR docs' pages: please confirm if I got that right! :) The most concerning part is inventory hostnames. Is it enough for the change, or other vars like Sigh. That becomes too complicated |
|
So we decided to stick with the nsupdates only suffixes #6381 . |
Support separate public/private DNS records, yet limited to an
external DNS managed elsewhere. Users may benefit from this
feature by sending nsupdates to private and/or public servers
as they want it.
Additional changes:
to not rely on the group vars example only.
and openshift_master_default_subdomain from the group vars
example to the role defaults, where the values these take are
now evaluated.
domain name as it may be different to the public name now.
Describe configuration scenarios for external public and private
DNS servers managing public and custom private domain records for the
openshift cluster nodes.
Specify manual commands required to deploy DNS service with automation
playbooks for osp 10 on ocp 3.6 ref arch coming from openshift-ansible-contrib.
This improves UX with DNS stack not managed in openshift-ansible.
How to test: