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

OCPBUGS-24212: Add ownership annotation for certificates #2158

Merged
merged 2 commits into from Dec 7, 2023

Conversation

vrutkovs
Copy link
Member

@vrutkovs vrutkovs commented Nov 21, 2023

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

@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 Nov 21, 2023
Copy link
Contributor

openshift-ci bot commented Nov 21, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

1 similar comment
@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs
Copy link
Member Author

/test e2e-aws-ovn

@vrutkovs vrutkovs marked this pull request as ready for review November 29, 2023 09:36
@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 Nov 29, 2023
@raptorsun
Copy link
Contributor

How these new annotation will be used?

@vrutkovs
Copy link
Member Author

This would help customers file correct bug reports. This case is fairly obvious, but its not the case for other components. Also it can help us find situations when a team adds a new unregistered TLS artifact. More metadata would be added to these secrets later.

See openshift/enhancements#1502 for more information

@rexagod
Copy link
Member

rexagod commented Nov 29, 2023

I see the changes introduced here are in-line with: "As an Openshift developer, I want to be able to find which team manages a particular certificate.". While this looks fine, we should hold off on merging this until the EP gets in.

@deads2k
Copy link
Contributor

deads2k commented Nov 29, 2023

Ownership annotations are already in the openshif/api. The enhancement is about building an automatic report against those annotations, not the annotations themselves. IOW: the annotations are ready for merge now.

@jan--f
Copy link
Contributor

jan--f commented Nov 29, 2023

We pre-generate static assets and I think the annotation can be added there already. See https://github.com/openshift/cluster-monitoring-operator/blob/master/jsonnet/utils/generate-certificate-injection.libsonnet. Adding the annotation there will probably do the trick. That'll keep things consistent for future ca-bundle ConfigMaps.
Is there a JIRA we can attach to this?

@vrutkovs vrutkovs changed the title Add ownership annotation for certificates OCPBUGS-24212: Add ownership annotation for certificates Nov 29, 2023
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 29, 2023
@openshift-ci-robot
Copy link
Contributor

@vrutkovs: This pull request references Jira Issue OCPBUGS-24212, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

The bug has been updated to refer to the pull request using the external bug tracker.

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 kubernetes/test-infra repository.

@vrutkovs
Copy link
Member Author

Adding the annotation there will probably do the trick

IIUC these will not be applied to the upgraded clusters? If these would work too I can create a follow up PR

@openshift-ci openshift-ci bot requested a review from juzhao November 29, 2023 16:18
@simonpasquier
Copy link
Contributor

IIUC these will not be applied to the upgraded clusters?

They will/should be applied on upgrades.

@vrutkovs
Copy link
Member Author

Ah, certs with inject-trusted-cabundle are not really owned by monitoring team - cluster-network-operator injects CA bundle there and it annotates them already.

Also, more cert-specific metadata would be added there (i.e. cert description) so we still need a place where its being set per-cert/configmap

@simonpasquier
Copy link
Contributor

Adding the "openshift.io/owning-component" annotation in the jsonnet code is the right thing to do IMHO because the information is static and it's way easier for future ourselves.

IIUC we don't have to do anything for certificates which are issued by the service-ca operator and the cluster-network-operator?
AFAICT CMO manages directly only the gRPC TLS certificates for thanos-querier, prometheus-k8s, thanos-ruler and prometheus-user-workload (assets/*/grpc-tls-secret.yaml).

@vrutkovs
Copy link
Member Author

vrutkovs commented Dec 5, 2023

@simonpasquier I don't mind adding the annotations to jsonnet code, but I can't seem to find where these are defined. Any pointers?

@raptorsun
Copy link
Contributor

raptorsun commented Dec 5, 2023

@simonpasquier I don't mind adding the annotations to jsonnet code, but I can't seem to find where these are defined. Any pointers?

The labels/annotations can be added here and it will be applied to all ca bundle config maps generated from this jsonnet function. Here is where the CA bundle is generate for alertmanager.

We put static informations in jsonnet files and dynamic informations in the controller code.

@jan--f
Copy link
Contributor

jan--f commented Dec 5, 2023

You now just need to run make generate and commit the results.

@vrutkovs
Copy link
Member Author

vrutkovs commented Dec 6, 2023

Done, now component annotation is set in jsonnet where possible

@raptorsun
Copy link
Contributor

/test e2e-aws-ovn-techpreview

Copy link
Contributor

openshift-ci bot commented Dec 6, 2023

@vrutkovs: all tests passed!

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.

Copy link
Contributor

@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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2023
Copy link
Contributor

openshift-ci bot commented Dec 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 7, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 27111ea into openshift:master Dec 7, 2023
17 checks passed
@openshift-ci-robot
Copy link
Contributor

@vrutkovs: Jira Issue OCPBUGS-24212: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-24212 has been moved to the MODIFIED state.

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 kubernetes/test-infra repository.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.15.0-0.nightly-2023-12-08-080446

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

None yet

8 participants