-
Notifications
You must be signed in to change notification settings - Fork 24
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
NETOBSERV-1648: Make high cardinality check more visible #650
Conversation
- Add Status/Conditions to FlowMetrics CRD - Add a Ready status - Add a Cardinality status - Add both of them as printColumns
@jotak: This pull request references NETOBSERV-1648 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
The "make manifests" target changed to only look in ./apis, hence missing the kubebuilder:rbac annotations. Thus moving these annotations inside ./apis
With this PR, here's the output of
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #650 +/- ##
==========================================
+ Coverage 67.00% 67.18% +0.18%
==========================================
Files 68 70 +2
Lines 7804 7893 +89
==========================================
+ Hits 5229 5303 +74
- Misses 2197 2209 +12
- Partials 378 381 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/ok-to-test |
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:a443382 make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-a443382 Or as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-a443382
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
thanks @jotak , this works as expected:
/label qe-approved |
@jotak: This pull request references NETOBSERV-1648 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.17.0" version, but no target version was set. 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 openshift-eng/jira-lifecycle-plugin repository. |
nsname := types.NamespacedName{Name: fm.Name, Namespace: fm.Namespace} | ||
mapStatuses[nsname] = &metav1.Condition{ | ||
Type: "Ready", | ||
Reason: "Ready", |
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.
"Pending" ?
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.
SetPending
is actually not used I'll remove it
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.
done
if err != nil { | ||
log.Error(err, "failed to update FlowMetrics status") | ||
} | ||
} |
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.
it might be a good idea adding UT for this while u are 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.
done
pkg/manager/manager.go
Outdated
//+kubebuilder:rbac:groups=config.openshift.io,resources=clusterversions;networks,verbs=get;list;watch | ||
//+kubebuilder:rbac:groups=loki.grafana.com,resources=network,resourceNames=logs,verbs=get;create | ||
//+kubebuilder:rbac:urls="/metrics",verbs=get | ||
|
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 think we should change what the sdk operator generated template, now if we added new API or webhook we will have to move the newly generated ones to the permissions.go while this is none functional change but I prefer sticking with SDK generated fmt
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.
this is because here you changed the controller-gen call to check only the ./apis
path and not the whole repo, so that broke the rbac generation; we need either to move that to apis
or to revert that change on controller-gen path, did you have a specific reason to change the path?
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.
no we can revert the controller-gen path changes I was debugging something and left that change around
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.
ok, done
@@ -132,18 +132,11 @@ rules: | |||
- flows.netobserv.io | |||
resources: | |||
- flowcollectors/status | |||
- flowmetrics/status | |||
verbs: | |||
- get | |||
- patch | |||
- update |
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.
u dropped watch
verb that was used with fm is that no longer needed ?
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.
no flowmetrics
still has watch
look at line 124, it's now having same perms as flowcollectors
Thanks @jotak |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jotak 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 |
Description
Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.