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
test: Enable embedded Hubble globally #11378
Conversation
@@ -184,7 +190,7 @@ func init() { | |||
defaultHelmOptions["global.tag"] = version | |||
// This always works because SplitContainerURL would not return | |||
// isFullyQualified == true otherwise | |||
parts := strings.SplitN(image, "/", 1) | |||
parts := strings.SplitN(image, "/", 2) |
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'm not sure i get this change, what exactly is going on here?
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.
ok yeah sorry i should have added more description in the commit message. basically this chunk of code is for extracting docker registry (e.g. quay.io/cilium
) from CILIUM_IMAGE env variable. say CILIUM_IMAGE is set to quay.io/cilium/cilium:latest
. then:
registry, image, version, isFullyQualified := SplitContainerURL(v)
splits it intoquay.io
,cilium/cilium
, andlatest
.- get the "organization" part from
cilium/cilium
by splitting it by slashes. - set
global.registry
toquay.io/cilium
.
the issue is that SplitN
returns the string itself if the third argument is set to one.
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 will be a great step forward. 🚀
On the approach: I'm not entirely sure if we really want to deploy the CLI pods unconditionally in each test. It is unquestionably useful, but it introduces another moving part. It might be something we only want to once a test failed. Or maybe we could add the Hubble CLI to the log-gatherer pods instead, which are already used for the purpose of fetching the logs when tests fail.
Secondly, on a technical note, I believe this will deploy the Hubble CLI and relay pods for all tests using DeployCiliumOptionsAndDNS
, but will likely not remove them at the end of each test, since most tests seem to use kubectl.DeleteCiliumDS()
, which only removes the cilium-agent. This has already bitten us in the Hubble testsuite (#11141)
This is not the fault of this PR per se, but unfortunately I think we first have to review all uses of DeleteCiliumDS()
in all tests. The new deployment manager (#11170) would solve that, but as far as I can tell, tests are not using it yet.
@gandro how about just doing
|
Yes, that's what we currently do in cilium/test/k8sT/DatapathConfiguration.go Line 60 in e0fbe8a
But most other testsuite are not using it yet, since it is a recent addition. |
got it that makes sense. in that case i guess i should migrate existing tests to use deployment manager first. |
blocked on #11330 as well |
bd463c3
to
05ac5a2
Compare
had an offline conversation with @gandro and others. we'll enable embedded hubble to start with, and then follow up with cli/relay later. |
Commit fd3c71aa9dd0f0cccbed1b3deeda4cfe90d199b4 does not contain "Signed-off-by". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
- Enable embedded Hubble in the end-to-end testing by default. - Set `global.registry` properly by splitting the image into 2 parts. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
fd3c71a
to
e9c03df
Compare
test-me-please |
test: Enable embedded Hubble globally
global.registry
properly by splitting the image into 2 parts.Signed-off-by: Michi Mutsuzaki michi@isovalent.com