Skip to content

NETOBSERV-2575: allow setting toleration for static plugin#2793

Open
jotak wants to merge 2 commits into
netobserv:mainfrom
jotak:static-toleration
Open

NETOBSERV-2575: allow setting toleration for static plugin#2793
jotak wants to merge 2 commits into
netobserv:mainfrom
jotak:static-toleration

Conversation

@jotak

@jotak jotak commented Jun 4, 2026

Copy link
Copy Markdown
Member

Description

New env "STATIC_PLUGIN_INHERITED_TOLERATION_SUBSCRIPTION", to provide the name of the subscription resource to inherit toleration config from.

Also propagate node selector and affinity

Dependencies

n/a

Checklist

  • Does the changes in PR need specific configuration or environment set up for testing?
    • if so please describe it in PR description.
  • I have added thorough unit tests for the change.
  • 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

openshift-ci-robot commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

@jotak: This pull request references NETOBSERV-2575 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 bug to target either version "5.0." or "openshift-5.0.", but it targets "netobserv-1.12.1" instead.

Details

In response to this:

Description

New env "STATIC_PLUGIN_INHERITED_TOLERATION_SUBSCRIPTION", to provide the name of the subscription resource to inherit toleration config from.

Also propagate node selector and affinity

Dependencies

n/a

Checklist

  • Does the changes in PR need specific configuration or environment set up for testing?
    • if so please describe it in PR description.
  • I have added thorough unit tests for the change.
  • 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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 200 files, which is 50 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f00a38e4-5c63-4358-960f-cd8fd8d8663a

📥 Commits

Reviewing files that changed from the base of the PR and between e5f21f6 and 0ca64bf.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/zz_generated.deepcopy.go is excluded by !**/zz_generated.deepcopy.go
📒 Files selected for processing (200)
  • bundle/manifests/netobserv-manager-role_rbac.authorization.k8s.io_v1_role.yaml
  • config/rbac/role.yaml
  • go.mod
  • internal/controller/consoleplugin/consoleplugin_static_reconciler.go
  • internal/controller/static/static_controller.go
  • internal/pkg/manager/config.go
  • internal/pkg/manager/manager.go
  • internal/pkg/manager/roles.go
  • main.go
  • vendor/github.com/google/cel-go/cel/BUILD.bazel
  • vendor/github.com/google/cel-go/cel/env.go
  • vendor/github.com/google/cel-go/cel/folding.go
  • vendor/github.com/google/cel-go/cel/library.go
  • vendor/github.com/google/cel-go/cel/optimizer.go
  • vendor/github.com/google/cel-go/cel/program.go
  • vendor/github.com/google/cel-go/cel/templates/authoring.tmpl
  • vendor/github.com/google/cel-go/cel/validator.go
  • vendor/github.com/google/cel-go/checker/checker.go
  • vendor/github.com/google/cel-go/checker/env.go
  • vendor/github.com/google/cel-go/checker/scopes.go
  • vendor/github.com/google/cel-go/common/ast/ast.go
  • vendor/github.com/google/cel-go/common/debug/debug.go
  • vendor/github.com/google/cel-go/common/env/BUILD.bazel
  • vendor/github.com/google/cel-go/common/env/env.go
  • vendor/github.com/google/cel-go/common/types/BUILD.bazel
  • vendor/github.com/google/cel-go/common/types/bool.go
  • vendor/github.com/google/cel-go/common/types/bytes.go
  • vendor/github.com/google/cel-go/common/types/double.go
  • vendor/github.com/google/cel-go/common/types/duration.go
  • vendor/github.com/google/cel-go/common/types/int.go
  • vendor/github.com/google/cel-go/common/types/json_value.go
  • vendor/github.com/google/cel-go/common/types/list.go
  • vendor/github.com/google/cel-go/common/types/map.go
  • vendor/github.com/google/cel-go/common/types/null.go
  • vendor/github.com/google/cel-go/common/types/object.go
  • vendor/github.com/google/cel-go/common/types/pb/type.go
  • vendor/github.com/google/cel-go/common/types/string.go
  • vendor/github.com/google/cel-go/common/types/timestamp.go
  • vendor/github.com/google/cel-go/common/types/uint.go
  • vendor/github.com/google/cel-go/ext/README.md
  • vendor/github.com/google/cel-go/ext/bindings.go
  • vendor/github.com/google/cel-go/ext/comprehensions.go
  • vendor/github.com/google/cel-go/ext/extension_option_factory.go
  • vendor/github.com/google/cel-go/ext/formatting_v2.go
  • vendor/github.com/google/cel-go/ext/native.go
  • vendor/github.com/google/cel-go/ext/regex.go
  • vendor/github.com/google/cel-go/interpreter/attribute_patterns.go
  • vendor/github.com/google/cel-go/interpreter/attributes.go
  • vendor/github.com/google/cel-go/interpreter/interpretable.go
  • vendor/github.com/google/cel-go/interpreter/interpreter.go
  • vendor/github.com/google/cel-go/interpreter/planner.go
  • vendor/github.com/google/cel-go/parser/helper.go
  • vendor/github.com/google/gnostic-models/extensions/extension.proto
  • vendor/github.com/google/gnostic-models/openapiv2/OpenAPIv2.proto
  • vendor/github.com/google/gnostic-models/openapiv3/OpenAPIv3.proto
  • vendor/github.com/google/gnostic-models/openapiv3/annotations.proto
  • vendor/github.com/operator-framework/api/LICENSE
  • vendor/github.com/operator-framework/api/pkg/lib/release/release.go
  • vendor/github.com/operator-framework/api/pkg/lib/version/doc.go
  • vendor/github.com/operator-framework/api/pkg/lib/version/version.go
  • vendor/github.com/operator-framework/api/pkg/lib/version/zz_generated.model_name.go
  • vendor/github.com/operator-framework/api/pkg/operators/doc.go
  • vendor/github.com/operator-framework/api/pkg/operators/register.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/catalogsource_types.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/clusterserviceversion.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/clusterserviceversion_types.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/doc.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/installplan_types.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/register.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/subscription_types.go
  • vendor/github.com/operator-framework/api/pkg/operators/v1alpha1/zz_generated.model_name.go
  • vendor/github.com/prometheus/procfs/.golangci.yml
  • vendor/github.com/prometheus/procfs/Makefile
  • vendor/github.com/prometheus/procfs/Makefile.common
  • vendor/github.com/prometheus/procfs/arp.go
  • vendor/github.com/prometheus/procfs/buddyinfo.go
  • vendor/github.com/prometheus/procfs/cmdline.go
  • vendor/github.com/prometheus/procfs/cpuinfo.go
  • vendor/github.com/prometheus/procfs/cpuinfo_armx.go
  • vendor/github.com/prometheus/procfs/cpuinfo_loong64.go
  • vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go
  • vendor/github.com/prometheus/procfs/cpuinfo_others.go
  • vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go
  • vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go
  • vendor/github.com/prometheus/procfs/cpuinfo_s390x.go
  • vendor/github.com/prometheus/procfs/cpuinfo_x86.go
  • vendor/github.com/prometheus/procfs/crypto.go
  • vendor/github.com/prometheus/procfs/doc.go
  • vendor/github.com/prometheus/procfs/fs.go
  • vendor/github.com/prometheus/procfs/fs_statfs_notype.go
  • vendor/github.com/prometheus/procfs/fs_statfs_type.go
  • vendor/github.com/prometheus/procfs/fscache.go
  • vendor/github.com/prometheus/procfs/internal/fs/fs.go
  • vendor/github.com/prometheus/procfs/internal/util/parse.go
  • vendor/github.com/prometheus/procfs/internal/util/readfile.go
  • vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go
  • vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go
  • vendor/github.com/prometheus/procfs/internal/util/valueparser.go
  • vendor/github.com/prometheus/procfs/ipvs.go
  • vendor/github.com/prometheus/procfs/kernel_hung.go
  • vendor/github.com/prometheus/procfs/kernel_random.go
  • vendor/github.com/prometheus/procfs/loadavg.go
  • vendor/github.com/prometheus/procfs/mdstat.go
  • vendor/github.com/prometheus/procfs/meminfo.go
  • vendor/github.com/prometheus/procfs/mountinfo.go
  • vendor/github.com/prometheus/procfs/mountstats.go
  • vendor/github.com/prometheus/procfs/net_conntrackstat.go
  • vendor/github.com/prometheus/procfs/net_dev.go
  • vendor/github.com/prometheus/procfs/net_dev_snmp6.go
  • vendor/github.com/prometheus/procfs/net_ip_socket.go
  • vendor/github.com/prometheus/procfs/net_protocols.go
  • vendor/github.com/prometheus/procfs/net_route.go
  • vendor/github.com/prometheus/procfs/net_sockstat.go
  • vendor/github.com/prometheus/procfs/net_softnet.go
  • vendor/github.com/prometheus/procfs/net_tcp.go
  • vendor/github.com/prometheus/procfs/net_tls_stat.go
  • vendor/github.com/prometheus/procfs/net_udp.go
  • vendor/github.com/prometheus/procfs/net_unix.go
  • vendor/github.com/prometheus/procfs/net_wireless.go
  • vendor/github.com/prometheus/procfs/net_xfrm.go
  • vendor/github.com/prometheus/procfs/netstat.go
  • vendor/github.com/prometheus/procfs/nfnetlink_queue.go
  • vendor/github.com/prometheus/procfs/proc.go
  • vendor/github.com/prometheus/procfs/proc_cgroup.go
  • vendor/github.com/prometheus/procfs/proc_cgroups.go
  • vendor/github.com/prometheus/procfs/proc_environ.go
  • vendor/github.com/prometheus/procfs/proc_fdinfo.go
  • vendor/github.com/prometheus/procfs/proc_interrupts.go
  • vendor/github.com/prometheus/procfs/proc_io.go
  • vendor/github.com/prometheus/procfs/proc_limits.go
  • vendor/github.com/prometheus/procfs/proc_maps.go
  • vendor/github.com/prometheus/procfs/proc_netstat.go
  • vendor/github.com/prometheus/procfs/proc_ns.go
  • vendor/github.com/prometheus/procfs/proc_psi.go
  • vendor/github.com/prometheus/procfs/proc_smaps.go
  • vendor/github.com/prometheus/procfs/proc_snmp.go
  • vendor/github.com/prometheus/procfs/proc_snmp6.go
  • vendor/github.com/prometheus/procfs/proc_stat.go
  • vendor/github.com/prometheus/procfs/proc_statm.go
  • vendor/github.com/prometheus/procfs/proc_status.go
  • vendor/github.com/prometheus/procfs/proc_sys.go
  • vendor/github.com/prometheus/procfs/schedstat.go
  • vendor/github.com/prometheus/procfs/slab.go
  • vendor/github.com/prometheus/procfs/softirqs.go
  • vendor/github.com/prometheus/procfs/stat.go
  • vendor/github.com/prometheus/procfs/swaps.go
  • vendor/github.com/prometheus/procfs/thread.go
  • vendor/github.com/prometheus/procfs/vm.go
  • vendor/github.com/prometheus/procfs/zoneinfo.go
  • vendor/github.com/stoewer/go-strcase/.gitignore
  • vendor/github.com/stoewer/go-strcase/.golangci.yml
  • vendor/github.com/stoewer/go-strcase/LICENSE
  • vendor/github.com/stoewer/go-strcase/README.md
  • vendor/github.com/stoewer/go-strcase/camel.go
  • vendor/github.com/stoewer/go-strcase/doc.go
  • vendor/github.com/stoewer/go-strcase/helper.go
  • vendor/github.com/stoewer/go-strcase/kebab.go
  • vendor/github.com/stoewer/go-strcase/snake.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/client.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/server.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go
  • vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md
  • vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md
  • vendor/go.opentelemetry.io/otel/semconv/v1.34.0/error_type.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/MIGRATION.md
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/README.md
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/doc.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/error_type.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/exception.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/httpconv/metric.go
  • vendor/go.opentelemetry.io/otel/semconv/v1.39.0/schema.go
  • vendor/k8s.io/kube-openapi/pkg/validation/spec/ref.go
  • vendor/k8s.io/utils/buffer/ring_fixed.go
  • vendor/k8s.io/utils/strings/slices/slices.go
  • vendor/modules.txt

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci

openshift-ci Bot commented Jun 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jotak for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@jotak jotak force-pushed the static-toleration branch from 491af8e to 0ca64bf Compare June 8, 2026 08:16
Comment thread main.go
}

func readConfigFromEnv(c *manager.Config) {
c.StaticPluginConfig = manager.StaticPluginConfig{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

team / @jpinsonneau : I'm thinking about generalizing this approach, of reading directly config from env, rather than through command line arguments in the operator. In the YAML, instead of having this pattern "ENV => command line injection => code reads from command line", we'd just have "ENV => code reads from env", so a little bit simpler.

wdyt? do you think we're losing something in not driving that through args?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's probably cleaner. We just need to ensure it doesn't break any tests / CI runs that would pass args directly without setting the ENVs.

Also, if you plan to replace existing args, we need to handle defaults properly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, ok. I'll leave this PR just as that a prepare a refactoring in another one

@jotak jotak added the needs-review Tells that the PR needs a review label Jun 8, 2026
jotak added 2 commits June 10, 2026 17:35
New env "STATIC_PLUGIN_INHERITED_TOLERATION_SUBSCRIPTION", to provide
the name of the subscription resource to inherit toleration config
from.

Also propagate node selector and affinity
@jotak jotak force-pushed the static-toleration branch from 0ca64bf to 73adb9b Compare June 10, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference needs-review Tells that the PR needs a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants