-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS#15568: Add MicroShift DNS hosts configuration feature #104923
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
|
🤖 Thu Jan 29 18:22:54 - Prow CI generated the docs preview: |
| * Add the following `hosts` plugin at the end of the file: | ||
|
|
||
| [source,yaml] | ||
| ---- |
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.
🤖 [error] AsciiDocDITA.TaskStep: Content other than a single list cannot be mapped to DITA tasks.
|
|
||
| * Save your change in the file. | ||
|
|
||
| [NOTE] |
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.
🤖 [error] AsciiDocDITA.TaskStep: Content other than a single list cannot be mapped to DITA tasks.
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.
After editing Microshift configuration, a service restart is required.
After the restart, will be monitored for changes (without requiring further service restarts),
So we need to restart to activate the feature (so it will start monitoring the specified file), after that, no restart is needed. (unless we change )
| * You have root access to the node. | ||
|
|
||
| .Procedure | ||
| . Edit the `config.yaml` file in the `etc/hosts` directory. |
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.
config.yaml is the standard Microshift configuration file, and that's what we are editing,
/etc/hosts is the default file on the Microshift hosts that will be propagated to the coreDNS to respond to DNS queries originating from the pods (in case is not set).
That file can be changed with the "file: " in the hosts section, as mentioned below.
|
|
||
| .Procedure | ||
| . Edit the `config.yaml` file in the `etc/hosts` directory. | ||
| . Add the following `hosts` plugin at the end of the file: |
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.
| . Add the following `hosts` plugin at the end of the file: | |
| . Add the following `hosts` configuration at the end of the file: |
plugin is not the correct term we use.
| * You have root access to the node. | ||
|
|
||
| .Procedure | ||
| . Edit the `/etc/hosts` file. |
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.
| . Edit the `/etc/hosts` file. | |
| . Edit the microShift configuration in `/etc/microshift/config.yaml` file. |
There is a table describing all the various configuration options in config.yaml, we should add the new options under dns.baseDomain
| hosts.status | Enabled, Disabled | by default set to Disabled when not configured |
| host.file | String| filepath by default set to '/etc/hosts' |
| hosts: | ||
| ---- | ||
|
|
||
| . Save your file update. |
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.
| . Save your file update. | |
| . Save your configuration yaml file. |
| $ sudo systemctl restart microshift | ||
| ---- | ||
| + | ||
| After this initial restart, MicroShift automatically monitors the `hosts` file for updates. You do not have to restart the service for additional changes to the `hosts` file to take effect. |
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.
| After this initial restart, MicroShift automatically monitors the `hosts` file for updates. You do not have to restart the service for additional changes to the `hosts` file to take effect. | |
| After this initial restart, MicroShift automatically monitors the `hosts.file` for updates. You do not have to restart the service for additional changes to the `hosts.file` file to take effect. |
| = Configuring custom hostnames | ||
|
|
||
| [role="_abstract"] | ||
| You can use the `hosts` file to resolve custom hostnames for pod workloads. This enables applications to resolve fixed hostnames, such as the local machine or external services, by applying `/etc/hosts` functionality to DNS queries within the node. The functionality is applied by adding specific configuration to the `etc/hosts` file and completing a service restart. |
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 can use the `hosts` file to resolve custom hostnames for pod workloads. This enables applications to resolve fixed hostnames, such as the local machine or external services, by applying `/etc/hosts` functionality to DNS queries within the node. The functionality is applied by adding specific configuration to the `etc/hosts` file and completing a service restart. | |
| You can use the `hosts` file to resolve custom hostnames for pod workloads. This enables applications to resolve fixed hostnames, such as the local machine or external services, by applying `/etc/hosts` functionality to DNS queries within the node. The functionality is applied by adding specific configuration to the Microshift configuration yaml file and completing a service restart. |
30079b3 to
513c0d9
Compare
|
@eslutsky @kasturinarra I have the updated section links available. Thanks! |
| |`valid domain` | ||
| |Base domain of the node. All managed DNS records are subdomains of this base. | ||
|
|
||
| |`hosts.status` |
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.
| |`hosts.status` | |
| |`dns.hosts.status` |
| |`Enabled`, `Disabled` | ||
| |Default set to `Disabled` when not configured. | ||
|
|
||
| |`host.file` |
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.
| |`host.file` | |
| |`dns.hosts.file` |
| $ sudo systemctl restart microshift | ||
| ---- | ||
| + | ||
| After this initial restart, MicroShift automatically monitors the `hosts.file` file for updates. You do not have to restart the service for additional changes to the `hosts.file` file to take effect. |
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.
| After this initial restart, MicroShift automatically monitors the `hosts.file` file for updates. You do not have to restart the service for additional changes to the `hosts.file` file to take effect. | |
| After this initial restart, if dns.hosts.status is Enabled , MicroShift automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the service for additional changes to the `dns.hosts.file` file to take effect. |
834fba4 to
a5d8a72
Compare
|
@eslutsky one more review...thank you! |
| $ sudo systemctl restart microshift | ||
| ---- | ||
| + | ||
| After this initial restart, if `dns.hosts.status` is set to `Enabled`, MicroShift automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the service before additional changes to the `dns.hosts.file` file are active. |
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.
| After this initial restart, if `dns.hosts.status` is set to `Enabled`, MicroShift automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the service before additional changes to the `dns.hosts.file` file are active. | |
| After this initial restart, if `dns.hosts.status` is set to `Enabled`, MicroShift automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the MicroShift service until the MicroShift configuration yaml is edited again. | |
| . |
| dns: | ||
| hosts: | ||
| status: <Enabled|Disabled> | ||
| file: <filepath> | ||
| dns: | ||
| hosts: |
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.
| dns: | |
| hosts: | |
| status: <Enabled|Disabled> | |
| file: <filepath> | |
| dns: | |
| hosts: |
This part is a duplicate and not needed
eslutsky
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.
few nits.
|
Thanks @eslutsky, I made the updates. @kasturinarra will you review? Thanks ! |
|
/lgtm |
|
/lgtm |
888c1c2 to
7ba0eb6
Compare
|
New changes are detected. LGTM label has been removed. |
|
/label merge-review-needed |
|
/label merge-review-in-progress |
bergerhoffer
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.
One blocker (the DITA migration error) and a few other suggestions to fix before merging!
| + | ||
| After this initial restart, if `dns.hosts.status` is set to `Enabled`, MicroShift automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the {microshift-short} service until the {microshift-short} configuration YAML file is changed again. | ||
|
|
||
| [NOTE] |
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.
The DITA message above is correct - you can't have this NOTE here after the procedure steps. You either have to attach it at the end of the last step, or move it up above the prerequisites. Check out the confluence page if you need more info: https://spaces.redhat.com/spaces/OSDOCS/pages/654185635/Content+updates+in+preparation+for+migrating+to+DITA
| $ sudo systemctl restart microshift | ||
| ---- | ||
| + | ||
| After this initial restart, if `dns.hosts.status` is set to `Enabled`, MicroShift automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the {microshift-short} service until the {microshift-short} configuration YAML file is changed again. |
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.
There are a handful of places that hardcode "MicroShift" - not critical but consider using the attribute like you do elsewhere
| @@ -0,0 +1,42 @@ | |||
| // Module included in the following assemblies: | |||
| // | |||
| // * microshift/using-config-tools.adoc | |||
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.
This looks like it should be:
| // * microshift/using-config-tools.adoc | |
| // * microshift_configuring/microshift-using-config-yaml.adoc |
db36ae1 to
8563937
Compare
|
@tmalove: all tests passed! Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
|
@bergerhoffer I updated the content per your feedback...thanks! |
bergerhoffer
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.
LGTM now, thanks! Merging
|
/cherrypick enterprise-4.21 |
|
@bergerhoffer: new pull request created: #105698 DetailsIn response to this:
Instructions 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-sigs/prow repository. |
Version(s):
4.21+
Issue:
OSDOCS-15568
Link to docs preview:
Configuring custom hostnames
Parameters and values for the MicroShift config.yaml file
QE review: