-
Notifications
You must be signed in to change notification settings - Fork 177
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
Ceph prometheus rules created by OCS operator instead of Rook #1615
Ceph prometheus rules created by OCS operator instead of Rook #1615
Conversation
@travisn: This pull request references Bugzilla bug 2066514, which is valid. No validations were run on this bugNo GitHub users were found matching the public email listed for the QA contact in Bugzilla (mbukatov@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. |
@umangachapagain More testing is still needed, but please do let me know if there is any initial feedback, thanks. |
@travisn: No Bugzilla bug is referenced in the title of this pull 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. |
No need to specify the bug in the title for main branch PRs. Bug 2066514 can be mentioned in the comments if required. |
bcfef64
to
9ba2d2e
Compare
/retest |
@umangachapagain Do you see an error in the CI? I'm not seeing the failure and it doesn't seem to be intermittent since rerunning gave the same results. |
// state. | ||
func createPrometheusRules(r *StorageClusterReconciler, sc *ocsv1.StorageCluster, cluster *rookCephv1.CephCluster) error { | ||
if !cluster.Spec.Monitoring.Enabled { | ||
r.Log.Info("prometheus rules skipped", "CephCluster") |
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.
r.Log.Info("prometheus rules skipped", "CephCluster") | |
r.Log.Info("prometheus rules skipped", "CephCluster", klog.KRef(cluster.Namespace, cluster.Name)) |
} | ||
prometheusRule, err := parsePrometheusRule(rules) | ||
if err != nil { | ||
r.Log.Error(err, "Unable to retrieve prometheus rules.", "CephCluster") |
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.
r.Log.Error(err, "Unable to retrieve prometheus rules.", "CephCluster") | |
r.Log.Error(err, "Unable to retrieve prometheus rules.", "CephCluster", klog.KRef(cluster.Namespace, cluster.Name)) |
applyLabels(getCephClusterMonitoringLabels(*sc), &prometheusRule.ObjectMeta) | ||
|
||
if err := createOrUpdatePrometheusRule(r, sc, prometheusRule); err != nil { | ||
r.Log.Error(err, "Prometheus rules could not be created.", "CephCluster") |
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.
r.Log.Error(err, "Prometheus rules could not be created.", "CephCluster") | |
r.Log.Error(err, "Prometheus rules could not be created.", "CephCluster", klog.KRef(cluster.Namespace, cluster.Name)) |
return err | ||
} | ||
|
||
r.Log.Info("prometheus rules deployed", "CephCluster") |
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.
r.Log.Info("prometheus rules deployed", "CephCluster") | |
r.Log.Info("prometheus rules deployed", "CephCluster", klog.KRef(cluster.Namespace, cluster.Name)) |
return nil | ||
} | ||
|
||
// OverwriteApplyToObjectMeta adds labels to object meta, overwriting keys that are already defined. |
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.
// OverwriteApplyToObjectMeta adds labels to object meta, overwriting keys that are already defined. | |
// applyLabels adds labels to object meta, overwriting keys that are already defined. |
} | ||
} | ||
|
||
// GetPrometheusRule returns provided prometheus rules or an error |
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.
// GetPrometheusRule returns provided prometheus rules or an error | |
// parsePrometheusRule returns provided prometheus rules or an error |
All required tests have passed. Remaining CI error is due to an issue with test scripts, not related to this PR. |
Rook has stopped creating the prometheus rules with the cephcluster monitoring.enabled setting. Now the rules must be created separately from the cluster CR as described in the rook PR rook/rook#9837. The rules are fully owned downstream by the ocs operator now since upstream they are only installed by the helm chart. This also gives full flexibility downstream to update the rules only when QE determines we are ready for testing all the new rules. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The prometheus api was not resolving unless requiring go 1.17 compatibility. Go 1.16 is confused by the moving around of the prometheus api between different packages from v0.43 to v0.46. Now the packages are updated for go 1.17 compatibility. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The latest rook release is based on v1.9 instead of v1.8. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
9ba2d2e
to
5668229
Compare
@travisn: 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/test-infra repository. I understand the commands that are listed here. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jarrpa, travisn 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 |
Rook has stopped creating the prometheus rules with the cephcluster monitoring.enabled setting. Now the rules must be created separately from the cluster CR as described in the rook PR rook/rook#9837. The rules are fully owned downstream by the ocs operator now since upstream they are only installed by the helm chart. This also gives full flexibility downstream to update the rules only when QE determines we are ready for testing all the new rules.
At the same time, vendor for golang 1.17 to pick up prometheus. The prometheus api was not resolving unless requiring go 1.17 compatibility. Go 1.16 is confused by the moving around of the prometheus api between different packages from v0.43 to v0.46. Now the packages are updated for go 1.17 compatibility.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2066514