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

NETOBSERV-1284: implement metrics white-listing #447

Merged
merged 1 commit into from Nov 8, 2023

Conversation

jotak
Copy link
Member

@jotak jotak commented Oct 4, 2023

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 4, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but no target version was set.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

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).

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.

// `node_ingress_bytes_total`, `node_ingress_packets_total`, `node_flows_total`, `workload_egress_bytes_total`,
// `workload_egress_packets_total`, `workload_ingress_bytes_total`, `workload_ingress_packets_total`, `workload_flows_total`.
// +optional
IncludeList *[]string `json:"includeList,omitempty"`
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @OlivierCazade can you tell me again why we didn't use pointers on slices? That would be an easy way to tell: this setting was/wasn't explicitly configured.
Here, I'm not providing any default in CRD, but defaults are provided in code

Copy link
Contributor

Choose a reason for hiding this comment

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

Using pointer in CRD to enable/disable a feature does not work, if at some point the pointer is not nil, it is not possible to set the pointer to nil again, applying an yaml without the slice section does not modify it.

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm I just tired that and it worked.
ie. I've set a includeList => saved => checked results, then removed includeList => saved => check results , this worked as intended

"reflect"
"strings"

"github.com/netobserv/flowlogs-pipeline/pkg/api"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicking: may be rename the import flpapi to avoid confusion between operator api and flp api

OlivierCazade
OlivierCazade previously approved these changes Oct 5, 2023
Copy link
Contributor

@OlivierCazade OlivierCazade left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 5, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but no target version was set.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

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).

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.

Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

Code looks good. I feel allowList as suggested in slack would be a better naming but I don't have strong opinion on it.

Should we merge loki config PR first ? The API changes should be introduced in v1beta2 I guess

@nathan-weinberg
Copy link
Contributor

/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 Oct 5, 2023
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 5, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but no target version was set.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

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).

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.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

New images:

  • quay.io/netobserv/network-observability-operator:82bafc6
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-82bafc6
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-82bafc6

They will expire after two weeks.

To deploy this build:

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

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

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

@jotak
Copy link
Member Author

jotak commented Oct 5, 2023

Code looks good. I feel allowList as suggested in slack would be a better naming but I don't have strong opinion on it.

Should we merge loki config PR first ? The API changes should be introduced in v1beta2 I guess

I don't have a problem to wait for v1beta2 first, but still, I think this change should also be done on beta1 too, so that users can ACK deprecation and modify their config without having the hassle to migrate entirely to beta2. It's smoother for them to have it in both places

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 9, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but it targets "netobserv-1.5" instead.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

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.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 9, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but it targets "netobserv-1.5" instead.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

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.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 9, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but it targets "netobserv-1.5" instead.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

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.

@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 Oct 9, 2023
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 9, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but it targets "netobserv-1.5" instead.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

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.

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (f7345c8) 54.90% compared to head (3c065b9) 61.80%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #447      +/-   ##
==========================================
+ Coverage   54.90%   61.80%   +6.90%     
==========================================
  Files          49       52       +3     
  Lines        6453     6530      +77     
==========================================
+ Hits         3543     4036     +493     
+ Misses       2666     2194     -472     
- Partials      244      300      +56     
Flag Coverage Δ
unittests 61.80% <85.79%> (+6.90%) ⬆️

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

Files Coverage Δ
api/v1beta1/flowcollector_types.go 100.00% <ø> (ø)
api/v1beta2/flowcollector_types.go 100.00% <ø> (ø)
api/v1beta2/zz_generated.deepcopy.go 49.41% <100.00%> (+0.29%) ⬆️
controllers/flowcollector_controller.go 55.30% <100.00%> (+0.16%) ⬆️
controllers/flowcollector_objects.go 46.91% <100.00%> (ø)
controllers/flowlogspipeline/flp_common_objects.go 82.05% <100.00%> (+1.91%) ⬆️
pkg/dashboards/dashboard.go 98.63% <100.00%> (ø)
pkg/helper/flowcollector.go 69.23% <100.00%> (+1.78%) ⬆️
pkg/metrics/predefined_metrics.go 100.00% <100.00%> (ø)
pkg/test/dashboards.go 100.00% <100.00%> (ø)
... and 4 more

... and 4 files with indirect coverage changes

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

@nathan-weinberg
Copy link
Contributor

/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 Oct 9, 2023
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Oct 9, 2023

@jotak: This pull request references NETOBSERV-1284 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.15.0" version, but it targets "netobserv-1.5" instead.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

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.

@nathan-weinberg
Copy link
Contributor

/hold for premerge testing

@openshift-ci openshift-ci bot removed the lgtm label Nov 1, 2023
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

New images:

  • quay.io/netobserv/network-observability-operator:4859b57
  • quay.io/netobserv/network-observability-operator-bundle:v0.0.0-4859b57
  • quay.io/netobserv/network-observability-operator-catalog:v0.0.0-4859b57

They will expire after two weeks.

To deploy this build:

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

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

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

@nathan-weinberg
Copy link
Contributor

@jotak can we rebase so we can premerge test?

@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 Nov 6, 2023
@jotak
Copy link
Member Author

jotak commented Nov 6, 2023

@nathan-weinberg rebased

- Introduce CRD field processor.metrics.includeList
- Deprecate CRD field processor.metrics.ignoreTags
- Convert ignoreTags to includeList approach when includeList isn't set
- If includeList isn't set and ignoreTags == default tags in 1.4,
  default includeList will be used. This should allow a smooth
transitioning if more metrics are added in 1.5
- Some code refactoring to move away from embedded metrics defs - this
  will help to prepare exposing the metrics creation API, and avoid
having to define every metric permutation one by one (egress/ingress,
bytes/packets, node/ns/workload)
- Fixing an issue with the Health dashboard not showing some metrics
  (previously tagged as "flows") despite they are always present

disambiguate package name

Fix include inner direction in metrics

Rebased / adapt to v1beta2

- In Conversion webhooks, use the per-field dedicated functions to
  integrate conversion logic
- Add tests on conversion webhooks
- Automate generation of hack CRD
- Modify Health dashboard tagging: just a single tag "dynamic" is
  sufficient to tell whether we need to check for metric included
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Nov 6, 2023
Copy link

github-actions bot commented Nov 6, 2023

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@nathan-weinberg
Copy link
Contributor

/unhold

@nathan-weinberg
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved QE has approved this pull request label Nov 7, 2023
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Nov 7, 2023

@jotak: This pull request references NETOBSERV-1284 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 either version "4.15." or "openshift-4.15.", but it targets "netobserv-1.5" instead.

In response to this:

Description

  • Introduce CRD field processor.metrics.includeList
  • Deprecate CRD field processor.metrics.ignoreTags
  • Convert ignoreTags to includeList approach when includeList isn't set
  • If includeList isn't set and ignoreTags == default tags in 1.4, default includeList will be used. This should allow a smooth transitioning if more metrics are added in 1.5
  • Some code refactoring to move away from embedded metrics defs - this will help to prepare exposing the metrics creation API, and avoid having to define every metric permutation one by one (egress/ingress, bytes/packets, node/ns/workload)
  • Fixing an issue with the Health dashboard not showing some metrics (previously tagged as "flows") despite they are always present

Dependencies

FLP: netobserv/flowlogs-pipeline#478

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).

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.

@jotak
Copy link
Member Author

jotak commented Nov 8, 2023

thanks @nathan-weinberg !
/approve

Copy link

openshift-ci bot commented Nov 8, 2023

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

@openshift-ci openshift-ci bot added the approved label Nov 8, 2023
@openshift-ci openshift-ci bot added the lgtm label Nov 8, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 74a4814 into netobserv:main Nov 8, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved jira/valid-reference lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. qe-approved QE has approved this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants