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

MON-3701: clean-up injection of trusted CA bundle for main Alertmanager #2310

Merged

Conversation

simonpasquier
Copy link
Contributor

@simonpasquier simonpasquier commented Apr 10, 2024

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 10, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 10, 2024

@simonpasquier: This pull request references MON-3701 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.16.0" version, but no target version was set.

In response to this:

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 10, 2024
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2024
@simonpasquier
Copy link
Contributor Author

/retest-required

1 similar comment
@simonpasquier
Copy link
Contributor Author

/retest-required

@simonpasquier
Copy link
Contributor Author

/skip

@simonpasquier
Copy link
Contributor Author

/test e2e-aws-ovn-upgrade

@simonpasquier simonpasquier changed the title [WIP] MON-3701: clean-up injection of trusted CA bundles MON-3701: clean-up injection of trusted CA bundles for Alertmanager Apr 12, 2024
@simonpasquier simonpasquier changed the title MON-3701: clean-up injection of trusted CA bundles for Alertmanager MON-3701: clean-up injection of trusted CA bundle for main Alertmanager Apr 12, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 12, 2024
CMO needed to inject the hashed version of the trusted CA bundle
ConfigMap into the Alertmanager resource when OAuth proxy was used
because it couldn't detect updates to the bundle and reload it.

The trusted CA bundle is still required to be mounted into the pod for
the Alertmanager container but it is declared directly in the static
manifest instead of being injected at runtime by CMO since Alertmanager
reloads the CA whenever it changes.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier
Copy link
Contributor Author

/skip

Copy link
Contributor

openshift-ci bot commented Apr 12, 2024

@simonpasquier: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-single-node ca92ea3 link false /test e2e-aws-ovn-single-node
ci/prow/versions ca92ea3 link false /test versions

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@simonpasquier
Copy link
Contributor Author

/skip

@simonpasquier
Copy link
Contributor Author

/hold
want to test a small variation

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2024
Copy link
Contributor Author

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2024
factory: t.factory,
prefix: "alertmanager",
}
trustedCA, err = cbs.syncTrustedCABundle(ctx, trustedCA)
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool that we're simplifying code like this.
I had a question about a similar practice (generating secrets with hashes...) here #2293 (comment)
and it'd be great if we can get rid of the logic there as well and only use the "secret/config hash on Deployment's template" approach as simpler.


I have a question about the root CA hot-reloading though, I know KRP supports that, but I think it only concerns --tls-cert-file and --tls-private-key-file, I think root CA from /etc/pki/ca-trust/extracted/pem/ etc. are managed by Go itself (in the case of KRP) and according to golang/go#41888 they're not reloaded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kube-rbac-proxy doesn't rely on the cluster CA bundle. Here is the CA bundle is mounted into the Alertmanager container because it may be configured to send notifications to 3rd party services that use certificates generated by the cluster CA.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, ok. I don't know if alertmanager supports hot-reloading then.

@machine424
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2024
@machine424
Copy link
Contributor

/lgtm
please unhold when it's ok for you.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2024
Copy link
Contributor

openshift-ci bot commented Apr 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: machine424, simonpasquier

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 [machine424,simonpasquier]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@simonpasquier
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 8dc9c77 into openshift:master Apr 16, 2024
13 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants