Skip to content

Commit

Permalink
Merge branch 'main' into subnets
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak authored Mar 27, 2024
2 parents 74783d0 + 2bcd974 commit 5e09506
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
run: make fmt && git add -A && git diff --exit-code
- name: build, lint, test
run: make build lint test
- name: check clean vendors
run: go mod vendor
- name: Report coverage
if: ${{ matrix.go == '1.21' }}
uses: codecov/codecov-action@v2.1.0
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PORT_FWD ?= true
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=candidate,fast,stable)
# - use environment variables to overwrite this value (e.g export CHANNELS="candidate,fast,stable")
CHANNELS := latest,v1.0.x
CHANNELS := latest,community
ifneq ($(origin CHANNELS), undefined)
BUNDLE_CHANNELS := --channels=$(CHANNELS)
endif
Expand All @@ -57,7 +57,7 @@ endif
# To re-generate a bundle for any other default channel without changing the default setup, you can:
# - use the DEFAULT_CHANNEL as arg of the bundle target (e.g make bundle DEFAULT_CHANNEL=stable)
# - use environment variables to overwrite this value (e.g export DEFAULT_CHANNEL="stable")
DEFAULT_CHANNEL := latest
DEFAULT_CHANNEL := community
ifneq ($(origin DEFAULT_CHANNEL), undefined)
BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL)
endif
Expand Down
4 changes: 2 additions & 2 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=netobserv-operator
LABEL operators.operatorframework.io.bundle.channels.v1=latest,v1.0.x
LABEL operators.operatorframework.io.bundle.channel.default.v1=latest
LABEL operators.operatorframework.io.bundle.channels.v1=latest,community
LABEL operators.operatorframework.io.bundle.channel.default.v1=community
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.3
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ metadata:
operators.operatorframework.io/builder: operator-sdk-v1.25.3
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/netobserv/network-observability-operator
support: NetObserv team
labels:
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.arm64: supported
Expand Down
4 changes: 2 additions & 2 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ annotations:
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: netobserv-operator
operators.operatorframework.io.bundle.channels.v1: latest,v1.0.x
operators.operatorframework.io.bundle.channel.default.v1: latest
operators.operatorframework.io.bundle.channels.v1: latest,community
operators.operatorframework.io.bundle.channel.default.v1: community
operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.3
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
containerImage: ':container-image:'
createdAt: ':created-at:'
description: Network flows collector and monitoring solution
support: NetObserv team
operatorframework.io/suggested-namespace: openshift-netobserv-operator
operatorframework.io/initialization-resource: '{"apiVersion":"flows.netobserv.io/v1beta2",
"kind":"FlowCollector","metadata":{"name":"cluster"},"spec": {}}'
Expand Down
4 changes: 2 additions & 2 deletions controllers/ebpf/agent_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const (
envExcludeInterfaces = "EXCLUDE_INTERFACES"
envInterfaces = "INTERFACES"
envAgentIP = "AGENT_IP"
envFlowsTargetHost = "FLOWS_TARGET_HOST"
envFlowsTargetPort = "FLOWS_TARGET_PORT"
envFlowsTargetHost = "TARGET_HOST"
envFlowsTargetPort = "TARGET_PORT"
envSampling = "SAMPLING"
envExport = "EXPORT"
envKafkaBrokers = "KAFKA_BROKERS"
Expand Down
8 changes: 4 additions & 4 deletions controllers/flowcollector_controller_ebpf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ func flowCollectorEBPFSpecs() {
v1.EnvVar{Name: "BUFFERS_LENGTH", Value: "100"},
v1.EnvVar{Name: "GOGC", Value: "400"},
v1.EnvVar{Name: "SAMPLING", Value: "123"},
v1.EnvVar{Name: "FLOWS_TARGET_PORT", Value: "9999"},
v1.EnvVar{Name: "TARGET_PORT", Value: "9999"},
))
hostFound := false
for _, env := range spec.Containers[0].Env {
if env.Name == "FLOWS_TARGET_HOST" {
if env.Name == "TARGET_HOST" {
if env.ValueFrom == nil ||
env.ValueFrom.FieldRef == nil ||
env.ValueFrom.FieldRef.FieldPath != "status.hostIP" {
Fail(fmt.Sprintf("FLOWS_TARGET_HOST expected to refer to \"status.hostIP\"."+
Fail(fmt.Sprintf("TARGET_HOST expected to refer to \"status.hostIP\"."+
" Got: %+v", env.ValueFrom))
} else {
hostFound = true
Expand All @@ -134,7 +134,7 @@ func flowCollectorEBPFSpecs() {
}
}
Expect(hostFound).To(BeTrue(),
fmt.Sprintf("expected FLOWS_TARGET_HOST env var in %+v", spec.Containers[0].Env))
fmt.Sprintf("expected TARGET_HOST env var in %+v", spec.Containers[0].Env))

ns := v1.Namespace{}
By("expecting to create the netobserv-privileged namespace")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.21.7
require (
github.com/go-logr/logr v1.4.1
github.com/netobserv/flowlogs-pipeline v0.1.12-0.20240325101510-5feb3c603334
github.com/onsi/ginkgo/v2 v2.16.0
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.31.1
github.com/openshift/api v0.0.0-20220112145620-704957ce4980
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.71.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM=
github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8=
github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
Expand Down
16 changes: 16 additions & 0 deletions vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/onsi/ginkgo/v2/core_dsl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 32 additions & 15 deletions vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion vendor/github.com/onsi/ginkgo/v2/types/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions vendor/github.com/onsi/ginkgo/v2/types/flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/onsi/ginkgo/v2/types/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ github.com/mwitkow/go-conntrack
github.com/netobserv/flowlogs-pipeline/pkg/api
github.com/netobserv/flowlogs-pipeline/pkg/config
github.com/netobserv/flowlogs-pipeline/pkg/utils
# github.com/onsi/ginkgo/v2 v2.16.0
# github.com/onsi/ginkgo/v2 v2.17.1
## explicit; go 1.20
github.com/onsi/ginkgo/v2
github.com/onsi/ginkgo/v2/config
Expand Down

0 comments on commit 5e09506

Please sign in to comment.