openshift-metal3 / dev-scripts

Scripts to automate development/test setup for openshift integration with https://github.com/metal3-io/
Apache License 2.0
93 stars 185 forks source link

Work around the impending openshift-sdn deprecation in the installer #1614

Closed danwinship closed 9 months ago

danwinship commented 9 months ago

The installer will soon reject install-configs that specify networkType: OpenShiftSDN. This changes dev-scripts so that if (a) you're installing 4.15 or later, and (b) you explicitly requested NETWORK_TYPE=OpenShiftSDN, then it will sneak behind the installer's back to give you an openshift-sdn cluster.

(For now, if you implicitly requested sdn by specifying IP_STACK=v4 and no NETWORK_TYPE, then it does nothing special and you will eventually get an error from the installer telling you you should be using ovn-kubernetes. Based on discussion in slack, we will probably change the default for IP_STACK=v4, but not until after everything in CI has been updated to deal with the changed default.)

Not sure about the code style... I had to deal with the fact that (a) network.sh can't call openshift_version, and (b) I can't set a variable in generate_ocp_install_config and then check it from create_cluster, because they get called from separate top-level scripts. So I added an extra variable to network.sh and a helper function to ocp_install_env.sh...

/assign @dtantsur

danwinship commented 9 months ago

/retest

dtantsur commented 9 months ago

@danwinship the image registry revert has merged, could you rebase this change on top of it?

dtantsur commented 9 months ago

/approve

openshift-ci[bot] commented 9 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtantsur

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: - ~~[OWNERS](https://github.com/openshift-metal3/dev-scripts/blob/master/OWNERS)~~ [dtantsur] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
dtantsur commented 9 months ago

/cc @zaneb @mkowalski

danwinship commented 9 months ago

/test e2e-metal-ipi-ovn-dualstack

mkowalski commented 9 months ago

/lgtm