-
Notifications
You must be signed in to change notification settings - Fork 557
Apply Subscription.Spec.Config.Annotations to Deployments, Pods, ApiServices #3169
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
Apply Subscription.Spec.Config.Annotations to Deployments, Pods, ApiServices #3169
Conversation
Hi @cognifloyd. Thanks for your PR. I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cognifloyd The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
1f0596e
to
140f8d9
Compare
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
140f8d9
to
76bf38b
Compare
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.
Do you own the definition of your validating admission webhook? It strikes me as easier to ensure that Subscriptions have the ownership annotations you need and exclude Deployments that have OLM management labels.
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.
These changes look good, perhaps @joelanford can do a review here for direction.
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
8c6c0b4
to
f6e6199
Compare
I just force pushed to signoff my commit and satisfy the DCO check. |
Yes and no. Yes, my team manages the admissions webhook, but the policy on inspecting Deployments was defined by an audit team. So, just modifying that admissions webhook won't satisfy the auditor's policy which ties my hands. |
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.
/lgtm
/approve
if err != nil { | ||
return err | ||
} else if ownerSubscription == nil { | ||
// This is not an error. For example, the PackageServer CSV in OLM is created without a Subscription. |
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.
👍
Description of the change:
Use
Subscription.Spec.Config.Annotations
to apply admin-supplied annotations to an Operator's:Motivation for the change:
I need a way to annotate operator deployments to satisfy an admissions hook in my on-prem vanilla (not OCP) k8s clusters (The admissions hook requires annotations that say which team is responsible for that deployment).
After discussing in #olm-dev, it looks like Subscription is the best user (cluster admin) facing API to extend for this purpose, as other resources, like CSV, should generally be opaque to the cluster admin.
So, I added Annotations to SubscriptionConfig in: operator-framework/api#312
That was released in v0.22.0.
Architectural changes:
N/A
Testing remarks:
No testing yet. I need feedback on this before I do anything else.
Reviewer Checklist
/doc
[FLAKE]
are truly flaky and have an issue