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

dockerfile: include CA certificates #1879

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

giorio94
Copy link
Member

@giorio94 giorio94 commented Jul 31, 2023

Busybox does not include CA certificates by default, which causes https requests to fail during certificate verification. For instance, the Cilium CLI fails to retrieve the hem chart with the following error:

looks like "https://helm.cilium.io" is not a valid chart repository or cannot be reached: Get "https://helm.cilium.io/index.yaml": tls: failed to verify certificate: x509: certificate signed by unknown authority

Hence, let's propagate the CA certificates from the builder container.

Note: this error did not show up previously because the helm charts were vendored inside the CLI binary, hence avoiding the need to contact an external website. The v1.14 one, instead, is not vendored (yet?), hence causing all workflows to fail due to the impossibility of reaching helm.cilium.io.

Additionally, the second commit fixes the external-workloads workflow, which is currently broken due to a conflict in the configured options.

Busybox does not include CA certificates by default, which causes https
requests to fail during certificate verification. For instance, the
Cilium CLI fails to retrieve the hem chart with the following error:

looks like "https://helm.cilium.io" is not a valid chart repository or
cannot be reached: Get "https://helm.cilium.io/index.yaml": tls: failed
to verify certificate: x509: certificate signed by unknown authority

Hence, let's propagate the CA certificates from the builder container.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 requested a review from a team as a code owner July 31, 2023 12:12
@giorio94 giorio94 requested a review from derailed July 31, 2023 12:12
@giorio94 giorio94 temporarily deployed to ci July 31, 2023 12:12 — with GitHub Actions Inactive
Previously, the tunneling mode was specified through an extra config,
which caused the CLI to override it with the autodetected value,
causing a conflict (as the tunnel option is now deprecated). Let's
fix this issue explicitly setting the routingMode (cilium#24561).

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 requested a review from a team as a code owner July 31, 2023 13:45
@giorio94 giorio94 requested a review from brlbil July 31, 2023 13:45
@giorio94 giorio94 temporarily deployed to ci July 31, 2023 13:45 — with GitHub Actions Inactive
Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

fascinating

@giorio94
Copy link
Member Author

Successful run for the external workloads workflow: https://github.com/cilium/cilium-cli/actions/runs/5715701135/job/15485617703?pr=1880 (it needed to be tested separately since this PR is from a fork, and the workflow is run as pull_request_target).

Copy link
Contributor

@brlbil brlbil left a comment

Choose a reason for hiding this comment

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

LGTM

@giorio94
Copy link
Member Author

giorio94 commented Jul 31, 2023

Reviews are in, the failure is expected as the fix will take effect only once merged. Marking as ready to merge /cc @michi-covalent 🙏

@giorio94 giorio94 added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 31, 2023
@michi-covalent michi-covalent merged commit de05d6a into cilium:main Jul 31, 2023
17 of 19 checks passed
@giorio94 giorio94 deleted the mio/dockerfile-certs branch July 31, 2023 14:49
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants