Skip to content
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 hubble tls in ci #13232

Merged
merged 2 commits into from
Sep 23, 2020
Merged

Conversation

kaworu
Copy link
Member

@kaworu kaworu commented Sep 21, 2020

Enable TLS for Hubble and verify that the expected certificate is served.

@kaworu kaworu added release-note/misc This PR makes changes that have no direct user impact. sig/hubble Impacts hubble server or relay labels Sep 21, 2020
@kaworu kaworu requested a review from a team as a code owner September 21, 2020 12:33
@kaworu kaworu self-assigned this Sep 21, 2020
@kaworu kaworu linked an issue Sep 21, 2020 that may be closed by this pull request
Copy link
Member

@rolinh rolinh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! It's nice that all it takes to enable TLS in the CI is to remove global.hubble.tls.enabled=false!

test/k8sT/hubble.go Outdated Show resolved Hide resolved
@kaworu kaworu force-pushed the pr/kaworu/enable-hubble-tls-in-ci branch from fdd057a to 092c0cd Compare September 21, 2020 14:57
@kaworu kaworu requested a review from gandro September 21, 2020 15:24
@kaworu
Copy link
Member Author

kaworu commented Sep 21, 2020

test-me-please

Copy link
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, just a few minor comments.

test/k8sT/hubble.go Outdated Show resolved Hide resolved
test/k8sT/hubble.go Outdated Show resolved Hide resolved
test/k8sT/hubble.go Outdated Show resolved Hide resolved
@kaworu kaworu force-pushed the pr/kaworu/enable-hubble-tls-in-ci branch from 092c0cd to eaf1a7b Compare September 22, 2020 09:08
Signed-off-by: Alexandre Perrin <alex@kaworu.ch>
Signed-off-by: Alexandre Perrin <alex@kaworu.ch>
@kaworu
Copy link
Member Author

kaworu commented Sep 22, 2020

test-me-please

Copy link
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for adding those extra pieces, makes the tests more readable.

expected := string(res.GetStdOut().Bytes())

serverName := fmt.Sprintf("%s.default.hubble-grpc.cilium.io", helpers.K8s1)
cmd := helpers.OpenSSLShowCerts("localhost", defaults.ServerPort, serverName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a nice change as well!

Comment on lines +176 to +180
// ReadFile returns the string representing a cat command to read the file at
// the give path.
func ReadFile(path string) string {
return fmt.Sprintf("cat %q", path)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the helpers!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 22, 2020
@qmonnet qmonnet merged commit 6953fe8 into master Sep 23, 2020
@qmonnet qmonnet deleted the pr/kaworu/enable-hubble-tls-in-ci branch September 23, 2020 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/hubble Impacts hubble server or relay
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: enable mTLS for Hubble and Hubble Relay in CI tests
5 participants