Skip to content
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

enable ebpf metrics by default while keep the knob in case we need to disable #649

Merged
merged 1 commit into from
May 21, 2024

Conversation

msherif1234
Copy link
Contributor

Description

enable ebpf metrics by default while still keeping the config in case we need to disable it

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.

  • Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
  • Does this PR require product documentation?
    • If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.
  • Does this PR require a product release notes entry?
    • If so, fill in "Release Note Text" in the JIRA.
  • Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.
    • If so, make sure it is described in the JIRA ticket.
  • QE requirements (check 1 from the list):
    • Standard QE validation, with pre-merge tests unless stated otherwise.
    • Regression tests only (e.g. refactoring with no user-facing change).
    • No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label May 20, 2024
Copy link

New images:

  • quay.io/netobserv/network-observability-operator:9bd6528
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-9bd6528
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-9bd6528

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:9bd6528 make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-9bd6528

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-9bd6528
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label May 20, 2024
@msherif1234
Copy link
Contributor Author

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label May 20, 2024
Copy link
Contributor

@memodi memodi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/label qe-approved (based on code inspection)

Copy link

New images:

  • quay.io/netobserv/network-observability-operator:931895d
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-931895d
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-931895d

They will expire after two weeks.

To deploy this build:

# Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:931895d make deploy

# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-931895d

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-931895d
  displayName: NetObserv development catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 1m

@memodi
Copy link
Contributor

memodi commented May 20, 2024

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved QE has approved this pull request label May 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.00%. Comparing base (76023fe) to head (20adcbc).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #649   +/-   ##
=======================================
  Coverage   67.00%   67.00%           
=======================================
  Files          68       68           
  Lines        7804     7804           
=======================================
  Hits         5229     5229           
  Misses       2197     2197           
  Partials      378      378           
Flag Coverage Δ
unittests 67.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msherif1234
Copy link
Contributor Author

image

@msherif1234
Copy link
Contributor Author

/approve

Copy link

openshift-ci bot commented May 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: msherif1234

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@jotak jotak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I approved too fast
You need to update IsEBPFMetricsEnabled in helper package

@openshift-ci openshift-ci bot removed the lgtm label May 21, 2024
@msherif1234
Copy link
Contributor Author

/hold

@jotak
Copy link
Member

jotak commented May 21, 2024

@msherif1234 the default was not controlled via openapi/kubebuilder, but in code instead. Like in other places, this is in order to keep control on what we set as defaults, even for users who are upgrading and who might already have a FlowCollector installed.

@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label May 21, 2024
@msherif1234
Copy link
Contributor Author

/hold cancel

@@ -173,7 +173,9 @@ type EBPFMetrics struct {
// +optional
Server MetricsServerConfig `json:"server,omitempty"`

// Set `enable` to `true` to enable eBPF agent metrics collection.
// Set `enable` to `false` to disable eBPF agent metrics collection, by default it's `true`.
//+kubebuilder:default:=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't add this annotation, as it writes in stone the default for any user installing a flowcollector, disallowing us from changing the default value in future releases for these users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it

@openshift-ci openshift-ci bot added the lgtm label May 21, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 18f3da6 into netobserv:main May 21, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm qe-approved QE has approved this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants