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
LOG-3846: Refactor Collector Dashboards to support M-CLF #2123
Conversation
@Clee2691: This pull request references LOG-3846 which is a valid jira issue. 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. |
/test all |
/retest |
4 similar comments
/retest |
/retest |
/retest |
/retest |
/test all |
1 similar comment
/test all |
/retest |
|
||
func (r *ReconcileDashboard) SetupWithManager(mgr ctrl.Manager) error { | ||
return ctrl.NewControllerManagedBy(mgr). | ||
For(&corev1.ConfigMap{}). |
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.
We should also be able to add a predicate or similar so we only need to specifically reconcile the configmap of interest: namespace/name
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've reframed the way the controller works. It will react to any CLF/CL events and reconcile a dashboard based on len(CLFs) > 1
&& CL.Name == 'instance' && CL.Namespace == 'openshift-logging'
internal/metrics/dashboards.go
Outdated
spec = string(utils.GetFileContents(path.Join(utils.GetShareDir(), VectorDashboardFile))) | ||
} | ||
func newDashboardConfigMap() *corev1.ConfigMap { | ||
spec := string(utils.GetFileContents(path.Join(utils.GetShareDir(), DashboardFile))) |
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 be able to get rid of the ShareDir here and replace it with the "embedd" pattern similar to what we have done elsewhere?
internal/metrics/dashboards.go
Outdated
return err | ||
|
||
// Reconcile dashboard if not found OR hashes are different | ||
if (err != nil && errors.IsNotFound(err)) || current.GetLabels()[DashboardHashName] != cm.Labels[DashboardHashName] { |
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.
Doesn't this already happen in reconcile.Configmap?
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.
You are right. I thought comparing ownerrefs
was going to throw it off but nothing owns it.
cf00024
to
1390fb4
Compare
/test all |
@jcantrill Per our discussion,
|
/hold |
f1388ea
to
a309007
Compare
@Clee2691: This pull request references LOG-3846 which is a valid jira issue. 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. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Clee2691, jcantrill 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 |
/hold cancel |
/lgtm |
@Clee2691: 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. |
Description
This PR:
fluentd
andvector
grafana dashboards into one by combining related metrics.elasticsearch
related metrics/cc @cahartma @syedriko @vparfonov
/assign @jcantrill
Links