Skip to content

Conversation

@jpinsonneau
Copy link
Member

@jpinsonneau jpinsonneau commented Jan 22, 2026

Description

  • moved to ubi minimal image
  • copy bash & uname dependencies from ose-cli -> actually, it works even without that

Tested locally with kind cluster:

docker run --rm \
  --user root \
  --network host \
  -v /home/julien/dev/me/network-observability-cli/kubeconfig:/kubeconfig:ro \
  -e KUBECONFIG=/kubeconfig \
  --entrypoint /oc-netobserv \
  localhost/netobserv-cli:test \
  flows --background 2>&1
Checking dependencies... 
Error: 'yq' is not installed or not in PATH.
Attempting to download yq version v4.45.1 for linux/amd64...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  9.8M  100  9.8M    0     0  3914k      0  0:00:02  0:00:02 --:--:-- 4590k
Successfully downloaded and installed yq version v4.45.1 for amd64.
Setting up... 
error: the server doesn't have a resource type "clusterversion"
Can't check version since cluster is not OpenShift
creating netobserv-cli namespace
namespace/netobserv-cli created
creating service account
serviceaccount/netobserv-cli created
clusterrole.rbac.authorization.k8s.io/netobserv-cli created
clusterrolebinding.rbac.authorization.k8s.io/netobserv-cli created
clusterrolebinding.rbac.authorization.k8s.io/netobserv-cli-monitoring created
error: resource mapping not found for name: "netobserv-cli" namespace: "netobserv-cli" from "STDIN": no matches for kind "SecurityContextConstraints" in version "security.openshift.io/v1"
ensure CRDs are installed first
creating collector service
service/collector created
creating flow-capture agents
daemonset.apps/netobserv-cli created
Waiting for daemonset pods to be ready...

👆 note the step where yq is missing and downloaded. We may want to include it too at some point.

docker run --rm   --user root   --network host   -v /home/julien/dev/me/network-observability-cli/kubeconfig:/kubeconfig:ro   -e KUBECONFIG=/kubeconfig   --entrypoint /oc-netobserv   localhost/netobserv-cli:test   stop 2>&1
Checking dependencies... 
Error: 'yq' is not installed or not in PATH.
Attempting to download yq version v4.45.1 for linux/amd64...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  9.8M  100  9.8M    0     0  3481k      0  0:00:02  0:00:02 --:--:-- 3738k
Successfully downloaded and installed yq version v4.45.1 for amd64.

Deleting daemonset... daemonset.apps "netobserv-cli" deleted

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

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

# Create final image from ubi + built binary and command
FROM registry.access.redhat.com/ubi9/ubi:9.7-1764794285
# Create final image from ubi-minimal + built binary and command
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1768783948
Copy link
Member

Choose a reason for hiding this comment

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

so, that's all ?? 😄

@jotak
Copy link
Member

jotak commented Jan 22, 2026

@jpinsonneau about the yq download, is it something that the CLI does by itself?

@jpinsonneau
Copy link
Member Author

@jpinsonneau about the yq download, is it something that the CLI does by itself?

Yes it's a check at oc netobserv startup.

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 12.95%. Comparing base (dc7c131) to head (d2a5fde).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #443   +/-   ##
=======================================
  Coverage   12.95%   12.95%           
=======================================
  Files          19       19           
  Lines        2439     2439           
=======================================
  Hits          316      316           
  Misses       2099     2099           
  Partials       24       24           
Flag Coverage Δ
unittests 12.95% <ø> (ø)

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@memodi
Copy link
Member

memodi commented Jan 22, 2026

CLI integration tests passed.

/label qe-approved

@openshift-ci
Copy link

openshift-ci bot commented Jan 22, 2026

[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

Details 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

@stleerh
Copy link
Contributor

stleerh commented Jan 22, 2026

Does the same change need to be done in Dockerfile?

@jpinsonneau
Copy link
Member Author

Does the same change need to be done in Dockerfile?

That one is for upstream so it's not very important to use minimal there 😸

@openshift-merge-bot openshift-merge-bot bot merged commit 9b3ba92 into netobserv:main Jan 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants