-
Notifications
You must be signed in to change notification settings - Fork 93
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
design-proposal: dns probe name customize #1281
Open
qinqon
wants to merge
1
commit into
nmstate:main
Choose a base branch
from
qinqon:design-proposal-customize-dns-probe-name
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Globally customize DNS cluster health probe. | ||
|
||
## Summary | ||
|
||
Support customize kubernetes-nmstate DNS resolving probes at NMState CR. | ||
|
||
## Motivation | ||
|
||
At some cluster their network configuration is not compatible with DNS health | ||
probe the kubernetes-nmstate cluster health probes, so the NNCPs will fail. | ||
|
||
### User Stories | ||
|
||
- As a cluster administrator, I want to customize globally the kubernetes-nmstate DNS health probes so they work for my cluster. | ||
|
||
### Goals | ||
|
||
- Allow users to customize cluster health probes DNS globally using the NMState CR | ||
|
||
### Non-Goals | ||
|
||
- Allow user to disable DNS probe | ||
- Allow user to customize cluster health probes per NNCP | ||
|
||
## Proposal | ||
|
||
### User roles | ||
|
||
**cluster admin** is a user responsible for managing the cluster node | ||
networking and install operators | ||
|
||
### Workflow Description (customize DNS probe name to resolve) | ||
|
||
1. The cluster admin configures DNS probe name to resolve at NMState CR. | ||
2. The cluster admin creates an NNCP and kubernetes-nmstate will use the custom DNS probe name to check cluster health | ||
|
||
### Workflow Description (go back to default DNS probe) | ||
|
||
1. The cluster admin remove the DNS probe customization | ||
2. The cluster admin creates an NNCP and the default name resolution is use for the DNS probe | ||
|
||
### Alternatives | ||
|
||
#### Add a DNS probe fallback using global name | ||
|
||
A possible alternative is the DNS probe in case of current implementation | ||
failing doing a fallback to use a global name like "redhat.com" or the like and | ||
the golang call `LookupNetIP` this can be done before apply the NNCP to select | ||
the proper mechanism to check after apply NNCP, it can be done at installation | ||
time too. | ||
|
||
### API Extensions | ||
|
||
This proposal add a new `probes` field under the `NMState` CR to configure the | ||
DNS probes name resolution, this way if the other probes need to be customize | ||
in the future more fields can be added there | ||
|
||
Following is the `NMState` CR example with custom DNS probe name resolution: | ||
|
||
```yaml | ||
apiVersion: nmstate.io/v1 | ||
kind: NMState | ||
metadata: | ||
name: nmstate | ||
spec: | ||
probes: | ||
DNS: | ||
name: "redhat.com" | ||
``` | ||
|
||
After doing this the probe will use golang `LookupNetIP` function instead of | ||
current `LookupNS` to resolve the specified `spec.probes.DNS.name` "redhat.com". |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 also list the alternatives in this document. e.g. making the probe smarter, and having this configured on NNCP-level
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.
I will add an alternative about probe doing fallaback to a global name, about NNCP is stated as non goal and if needed can be done a new enhancement, we want this one to be very specific to reduce the number of knobs that we really need.