-
Notifications
You must be signed in to change notification settings - Fork 98
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
Bug 1988351: OCM controller - periodically pull the data and update corresponding #375
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tremes 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 |
/test insights-operator-e2e-tests |
/test insights-operator-e2e-tests |
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.
I don't see any serious issue here, so if this is the behaviour we want, then I think it's alright.
|
@@ -24,6 +24,11 @@ type Serialized struct { | |||
Impersonate string `json:"impersonate"` | |||
Gather []string `json:"gather"` | |||
EnableGlobalObfuscation bool `json:"enableGlobalObfuscation"` | |||
Ocm struct { |
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.
why is this defined as inline struct if you have this as full script on line 75? :-)
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.
Ohh good catch! Thank you.
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.
Well hmmm...this is slightly different type than the OCMConfig
(which is embedded in Controller
type). I can delete the OCMConfig
type and define the attributes directly in the Controller
type....I guess I don't have any better idea right now.
|
||
const ( | ||
targetNamespaceName = "openshift-config-managed" | ||
secretName = "etc-pki-entitlement" //nolint: gosec |
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.
is this operator owning this secret? what operator manage this?
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.
Yes ...I am not sure how the "ownership" is defined, but this secret is created/updated by the Insights Operator.
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.
Obligatory "I have not tested it locally", but I see nothing objectively wrong with the code and the tests look good to me. I mostly looked at the changes since my last review and it all makes sense to me, as far as I'm aware of the relevant task.
@tremes: This pull request references Bugzilla bug 1988351, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (dmisharo@redhat.com), skipping review request. In response to this:
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. |
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.
looks great to me
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.
I have reviewed this before and it should now be ready to be merged, so I'm giving it the real approval now. I have not tested this locally, or at least not recently, but I have checked the code again today and I see nothing worth arguing about.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: natiiix, Sergey1011010, tremes 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@tremes: All pull requests linked via external trackers have merged: Bugzilla bug 1988351 has been moved to the MODIFIED state. In response to this:
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. |
secret
This adds a new OCM controller which periodically (each 8 hours) tries to pull the SCA (Simple content access) data from the OCM API. The SCA data (basically a x509 certificate) is exposed in the
etc-pki-entitlement
secret in theopenshift-config-managed
namespace.Categories
Sample archive
No new data
Documentation
No update here
Unit Tests
Basic test covered in
pkg/ocm/ocm_test.go
Privacy
Yes. There are no sensitive data in the newly collected information.
Changelog
References
https://issues.redhat.com/browse/CCXDEV-4211