-
Notifications
You must be signed in to change notification settings - Fork 123
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
k8s, cluster-up: Copy istio CNI net conf to where Multus expects #932
Merged
Merged
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 |
---|---|---|
|
@@ -88,6 +88,16 @@ function wait_for_istio_ready() { | |
fi | ||
} | ||
|
||
# copy_istio_cni_conf_files copy the generated Istio CNI net conf file | ||
# (at '/etc/cni/multus/net.d/') to where Multus expect CNI net conf files ('/etc/cni/net.d/') | ||
function copy_istio_cni_conf_files() { | ||
if [ "$KUBEVIRT_DEPLOY_ISTIO" == "true" ] && [ "$KUBEVIRT_WITH_CNAO" == "true" ]; then | ||
for nodeNum in $(seq -f "%02g" 1 $KUBEVIRT_NUM_NODES); do | ||
$ssh node${nodeNum} -- sudo cp -uv /etc/cni/multus/net.d/*istio*.conf /etc/cni/net.d/ | ||
done | ||
fi | ||
} | ||
|
||
function deploy_cdi() { | ||
if [ "$KUBEVIRT_DEPLOY_CDI" == "true" ]; then | ||
$kubectl create -f /opt/cdi-*-operator.yaml | ||
|
@@ -155,4 +165,8 @@ function up() { | |
sleep 5 | ||
done | ||
|
||
# FIXME: remove 'copy_istio_cni_conf_files()' as soon as [1] and [2] are resolved | ||
# [1] https://github.com/kubevirt/kubevirtci/issues/906 | ||
# [2] https://github.com/k8snetworkplumbingwg/multus-cni/issues/982 | ||
copy_istio_cni_conf_files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a FIXME comment linking to a tracker on Multus and also open an Issue under this repository, so we don't forget to clean up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
} |
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.
what about
KUBVIRT_WITH_CNAO_SKIP_CONFIG
?The CR might be installed bit later and include the multus (but not sure if those folders do exists in this case at this stage ?)
can be ignored, if there is code that returns error upon this configuration
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.
If by CR you mean CNAO CR, in the scenrtio where Multus deployment hangs no harm will do to the cluster if Istio confs will be copied to
/etc/cni/net.d
(it is already created by kubeadm IIRC)Note that
copy_istio_cni_conf_files
is called only after both CNAO and Istio deployments are ready, so it is not likely to happen.I am not sure what you mean, the error flag is set for script.
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 mean that the condition checks
KUBEVIRT_WITH_CNAO
but doesnt check the possibleKUBVIRT_WITH_CNAO_SKIP_CONFIG
That allows you to install CNAO but wihtout the CNAO CR (where you say which components to install)
So if CNAO will be installed without CR (i.e using
KUBVIRT_WITH_CNAO_SKIP_CONFIG
)and Istio will be installed
and later the CNAO CR will install multus, this WA code wont run and we will have the bug
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 for explaining.
I think it's better to have it the way it is (w/o handling
KUBVIRT_WITH_CNAO_SKIP_CONFIG
) because it's we want it run when both Istio and Multus (through CNAO) are deployed.BTW, I couldn't find usage of
KUBVIRT_WITH_CNAO_SKIP_CONFIG
on kubevirt CI jobs, perhaps it should be removed.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 am fine to not handle it (we just need to know we don't support this config)
but please don't remove it .
We are using
KUBVIRT_WITH_CNAO_SKIP_CONFIG
on KubeSecondaryDNS.It is helpful once you want to deploy the cached CNAO, but with your CR.
This way you don't need to care about CNAO bumps, as it is part of the kubevirtci TAG that you need to bump anyhow