-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: add operator controller to add ServiceMonitor #616
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jan--f 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 |
f3a0f56
to
28a4096
Compare
limitations under the License. | ||
*/ | ||
|
||
package operator_controller |
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.
(nit)
package operator_controller | |
package operator |
"app.kubernetes.io/component": "operator", | ||
"app.kubernetes.io/name": name, | ||
"app.kubernetes.io/part-of": name, | ||
"openshift.io/user-monitoring": "true", |
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.
"openshift.io/user-monitoring": "true", | |
"openshift.io/user-monitoring": "false", |
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.
thanks, shame on me blindly copy/pasting :)
KeyFile: "/etc/prometheus/secrets/metrics-client-certs/tls.key", | ||
SafeTLSConfig: monv1.SafeTLSConfig{ | ||
ServerName: ptr.To(fmt.Sprintf("%s.%s.svc", name, namespace)), | ||
InsecureSkipVerify: ptr.To(false), |
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.
InsecureSkipVerify: ptr.To(false), |
ctrl, err := ctrl.NewControllerManagedBy(mgr). | ||
Owns(&monv1.ServiceMonitor{}, generationChanged). | ||
Watches( | ||
&appsv1.Deployment{}, |
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.
shouldn't we rather make the servicemonitor owned by the service?
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 wasn't sure, will change that.
c80d6c3
to
afc20c3
Compare
Signed-off-by: Jan Fajerski <[email protected]>
afc20c3
to
4f0e02c
Compare
/retest |
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.
Can we modify the script running the OCP e2e tests to enable cluster monitoring? It would help to validate the feature.
Signed-off-by: Jan Fajerski <[email protected]>
4f0e02c
to
0869cae
Compare
I thought that's what happens anyway. @lihongyan1 would know best I think. |
Found it:
is that not working as expected? |
I'm not sure where the operator namespace is created but worst case, the main() e2e test could add the |
/lgtm |
@jan--f: The following test failed, say
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-sigs/prow repository. I understand the commands that are listed here. |
Bypassing |
the script work as expected |
observability-operator/test/run-e2e-ocp.sh install upstream latest image under namespace |
Fixes: COO-482