-
Notifications
You must be signed in to change notification settings - Fork 200
Add interface for custom networkConfig #1418
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 interface for custom networkConfig #1418
Conversation
|
/hold This is only a partial implementation (for static IPs we need a way to add DNS entries too), but I wanted to get it pushed as an example of what I was thinking for a generic networkConfig interface. |
|
/cc @creydr This is working for me locally. We do need to sync with @derekhiggins to see if we can implement his static ip patch using this mechanism. I tested with this network config directory: |
|
@cybertron: GitHub didn't allow me to request PR reviews from the following users: creydr. Note that only openshift-metal3 members and repo collaborators can review this PR, and authors cannot review their own PRs. 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/test-infra repository. |
|
This now includes all of the changes needed to deploy with bonds. It still needs documentation, but I wanted to get feedback on whether the approach is okay before I do that work. |
|
/hold I randomly discovered that this breaks the additional networks functionality needed for kubernetes-nmstate testing. I need to figure out how to make those play nicely before this goes in. |
|
/hold cancel This version plays nice with extra networks too. |
|
I tried this on my dev server with: static IPs , static IPs with vlan, and also interface.ipv4.dhcp: true without a hosts.yaml file. All worked. |
|
/retest |
|
/approved |
This provides a way to specify a custom networkConfig for each node in a deployment. The user sets NETWORK_CONFIG_FOLDER to a path that contains YAML files named for each node. The contents of these files are included in the install-config definition for the appropriate node.
To support custom networkConfigs that include static IPs (which
require reverse DNS records for each node so a hostname can be
assigned), this adds the ability to specify additional DNS hosts
that will be added to the regular list of hosts that dev-scripts
creates in DNS.
This config is only added if NETWORK_CONFIG_FOLDER is set and the
file 'hosts.yaml' exists in that location. The file contents should
be a list of IPs and hostnames, such as:
- ip: 192.168.111.110
hostnames:
- "master-0"
- ip: 192.168.111.111
hostnames:
- "master-1"
etc.
In order to test deployment on bonds we need a way to have two interfaces on the baremetal network. This adds a new environment variable, BOND_PRIMARY_INTERFACE, that adds two NICs on the baremetal network to each node.
|
Since it seems like people are happy with this I added documentation and made the folder path a little more user-friendly. I think this should be good to go. |
Also makes NETWORK_CONFIG_FOLDER able to handle relative paths.
|
/retest |
1 similar comment
|
/retest |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: derekhiggins The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@cybertron: The following tests failed, say
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/test-infra repository. I understand the commands that are listed here. |
|
/retest |
These are some example configs that can be used with the NETWORK_CONFIG_FOLDER option added in openshift-metal3#1418. In addition to making it easy for new users to test the networkConfig feature, this will also make it easier to run such configurations in CI. To use, just set the variable to the appropriate path. For example: export NETWORK_CONFIG_FOLDER=network-configs/static
These are some example configs that can be used with the NETWORK_CONFIG_FOLDER option added in #1418. In addition to making it easy for new users to test the networkConfig feature, this will also make it easier to run such configurations in CI. To use, just set the variable to the appropriate path. For example: export NETWORK_CONFIG_FOLDER=network-configs/static
This provides a way to specify a custom networkConfig for each node
in a deployment. The user sets NETWORK_CONFIG_FOLDER to a path that
contains YAML files named for each node. The contents of these files
are included in the install-config definition for the appropriate
node.