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-1214 & NETOBSERV-1399 Cluster name & zone features #546

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

jpinsonneau
Copy link
Contributor

@jpinsonneau jpinsonneau commented Jan 29, 2024

Description

  • Filter unecessary columns from operator
  • Specify MultiClusterDeployment and AddZone states to frontend features array

Dependencies

netobserv/network-observability-console-plugin#462

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

@jpinsonneau jpinsonneau marked this pull request as draft January 29, 2024 13:08
@jpinsonneau jpinsonneau marked this pull request as ready for review January 29, 2024 14:51
@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jan 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@@ -20,6 +20,10 @@ func GetLokiLabels(desired *flowslatest.FlowCollectorSpec) []string {
indexFields = append(indexFields, constants.ClusterNameLabelName)
}

if desired.Processor.AddZone != nil && *desired.Processor.AddZone {
Copy link
Member

Choose a reason for hiding this comment

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

after rebasing you could use that:

Suggested change
if desired.Processor.AddZone != nil && *desired.Processor.AddZone {
if helper.IsZoneEnabled(&desired.Processor) {

Comment on lines 407 to 416
if b.desired.Processor.MultiClusterDeployment != nil && *b.desired.Processor.MultiClusterDeployment {
fconf.Features = append(fconf.Features, "multiCluster")
} else {
skipColumns = append(skipColumns, "cluster")
}
if b.desired.Processor.AddZone != nil && *b.desired.Processor.AddZone {
fconf.Features = append(fconf.Features, "zones")
} else {
skipColumns = append(skipColumns, "zone")
}
Copy link
Member

@jotak jotak Jan 30, 2024

Choose a reason for hiding this comment

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

we could also add to columns config something like a feature field, that could be managed either here or on the frontend, to avoid having specific code for each feature here to skip columns.
E.g:

  - id: ClusterName
    name: Cluster
    tooltip: The cluster ID or Name.
    field: K8S_ClusterName
    filter: cluster_name
    default: false
    width: 15
    feature: multiCluster

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I'm fine with that

@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 Jan 30, 2024
@jpinsonneau
Copy link
Contributor Author

@jotak I rebased and addressed your comments. I'm updating the console plugin accordingly

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

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

Comparison is base (5d91297) 57.87% compared to head (b1b8da0) 57.75%.
Report is 5 commits behind head on main.

Files Patch % Lines
controllers/consoleplugin/consoleplugin_objects.go 0.00% 4 Missing and 2 partials ⚠️
pkg/loki/labels.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
- Coverage   57.87%   57.75%   -0.12%     
==========================================
  Files          73       73              
  Lines        9543     9552       +9     
==========================================
- Hits         5523     5517       -6     
- Misses       3684     3696      +12     
- Partials      336      339       +3     
Flag Coverage Δ
unittests 57.75% <0.00%> (-0.12%) ⬇️

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.

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

@jotak
Copy link
Member

jotak commented Jan 30, 2024

/lgtm

@jotak jotak added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Jan 30, 2024
Copy link

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

@jotak
Copy link
Member

jotak commented Jan 31, 2024

@jpinsonneau I guess we can merge it?

@jpinsonneau
Copy link
Contributor Author

@jpinsonneau I guess we can merge it?

I'm waiting for QE review before merging, just in case I need to update backports and so on.
Is it blocking us on something else ?

@openshift-ci openshift-ci bot removed the lgtm label Feb 5, 2024
Copy link

openshift-ci bot commented Feb 5, 2024

New changes are detected. LGTM label has been removed.

@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 Feb 5, 2024
@jpinsonneau
Copy link
Contributor Author

Resolved conflict b1b8da0

@jpinsonneau jpinsonneau added lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. labels Feb 5, 2024
Copy link

github-actions bot commented Feb 5, 2024

New images:

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

They will expire after two weeks.

To deploy this build:

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

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

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

Copy link

openshift-ci bot commented Feb 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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-merge-bot openshift-merge-bot bot merged commit 389354e into netobserv:main Feb 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test To set manually when a PR is safe to test. Triggers image build on PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants