Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jobs:
- component: pipeline-operator
image: ghcr.io/yanet-platform/yanet2/pipeline-operator
dockerfile: deploy/yanet-pipeline-operator.Dockerfile
- component: route-operator
image: ghcr.io/yanet-platform/yanet2/route-operator
dockerfile: deploy/yanet-route-operator.Dockerfile
steps:
- uses: actions/checkout@v4

Expand Down
28 changes: 22 additions & 6 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ members = [
"modules/nat64/cli",
"modules/pdump/cli",
"modules/balancer/cli",
"modules/route/cli/neighbour",
"modules/route/cli/route",
"modules/route-mpls/cli",
"devices/plain/cli",
"devices/vlan/cli",
"agents/yanet-pipeline-operator/cli",
"agents/yanet-route-operator/cli/route",
"agents/yanet-route-operator/cli/neighbour",
]

[profile.release]
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ CLI_MODULES := \
device-vlan \
dscp \
fwstate \
neighbour \
route \
route-mpls \
forward \
nat64 \
pdump \
operator-pipeline
operator-neighbour \
operator-pipeline \
operator-route

CLI_MODULE_BINARIES := $(addprefix yanet-cli-,$(CLI_MODULES))

Expand Down Expand Up @@ -199,6 +200,7 @@ install: dataplane cli-install
install -m 644 dataplane.yaml $(DESTDIR)/etc/yanet2/dataplane.yaml
install -m 644 agents/bird-adapter/etc/yanet/bird-adapter.yaml $(DESTDIR)/etc/yanet2/bird-adapter.yaml
install -m 644 agents/yanet-pipeline-operator/etc/yanet/yanet-pipeline-operator.yaml $(DESTDIR)/etc/yanet2/yanet-pipeline-operator.yaml
install -m 644 agents/yanet-route-operator/etc/yanet/yanet-route-operator.yaml $(DESTDIR)/etc/yanet2/yanet-route-operator.yaml
install -d $(DESTDIR)/etc/yanet2/forward.d
install -m 644 agents/yanet-forward-operator/etc/yanet/forward.d/vlan-phy.yaml $(DESTDIR)/etc/yanet2/forward.d/vlan-phy.yaml
install -m 644 agents/yanet-forward-operator/etc/yanet/forward.d/phy-vlan.yaml $(DESTDIR)/etc/yanet2/forward.d/phy-vlan.yaml
Expand Down
2 changes: 1 addition & 1 deletion agents/bird-adapter/internal/rib/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"net/netip"

routepb "github.com/yanet-platform/yanet2/agents/yanet-route-operator/operatorpb"
"github.com/yanet-platform/yanet2/common/filterpb"
"github.com/yanet-platform/yanet2/modules/route-mpls/controlplane/routemplspb"
"github.com/yanet-platform/yanet2/modules/route/controlplane/routepb"
)

type RouteSourceID uint8
Expand Down
2 changes: 1 addition & 1 deletion agents/bird-adapter/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/yanet-platform/yanet2/agents/bird-adapter/internal/bird"
"github.com/yanet-platform/yanet2/agents/bird-adapter/internal/mpls"
"github.com/yanet-platform/yanet2/agents/bird-adapter/internal/rib"
routepb "github.com/yanet-platform/yanet2/agents/yanet-route-operator/operatorpb"
"github.com/yanet-platform/yanet2/modules/route-mpls/controlplane/routemplspb"
"github.com/yanet-platform/yanet2/modules/route/controlplane/routepb"
)

// levelFilterCore wraps a zapcore.Core and filters log entries by level.
Expand Down
1 change: 1 addition & 0 deletions agents/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
subdir('bird-adapter')
subdir('yanet-pipeline-operator')
subdir('yanet-route-operator')
subdir('yanet-forward-operator')

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"golang.org/x/sync/errgroup"

"github.com/yanet-platform/yanet2/agents/yanet-pipeline-operator/operatorpb"
"github.com/yanet-platform/yanet2/common/go/operator"
"github.com/yanet-platform/yanet2/controlplane/gateway"
)

Expand Down Expand Up @@ -65,9 +66,9 @@ func NewOperator(cfg *Config, options ...Option) (*Operator, error) {
actuators = append(actuators, actuator)
}

actuator := NewFanOutActuator(
actuator := operator.NewFanOutActuator[*StageConfig](
actuators,
WithFanOutActuatorLog(log),
operator.WithFanOutLog(log),
)

reconciler := NewReconciler(
Expand Down
18 changes: 0 additions & 18 deletions agents/yanet-pipeline-operator/internal/operator/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,3 @@ func WithGatewayActuatorMetrics(metrics GatewayActuatorMetricsObserver) GatewayA
o.Metrics = metrics
}
}

type fanOutActuatorOptions struct {
Log *zap.Logger
}

func newFanOutActuatorOptions() *fanOutActuatorOptions {
return &fanOutActuatorOptions{
Log: zap.NewNop(),
}
}

type FanOutActuatorOption func(*fanOutActuatorOptions)

func WithFanOutActuatorLog(log *zap.Logger) FanOutActuatorOption {
return func(o *fanOutActuatorOptions) {
o.Log = log
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ import (

"go.uber.org/zap"

"github.com/yanet-platform/yanet2/common/go/operator"
"github.com/yanet-platform/yanet2/common/go/xbackoff"
)

// Actuator applies a desired stage configuration.
type Actuator interface {
Apply(ctx context.Context, stage *StageConfig) error
Close() error
}
type Actuator = operator.Actuator[*StageConfig]

// Reconciler drives the system through an ordered queue of target
// StageConfigs.
Expand Down
26 changes: 26 additions & 0 deletions agents/yanet-route-operator/cli/neighbour/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "yanet-cli-operator-neighbour"
version = "0.1.0"
edition = "2024"
publish = false

rust-version = "1.85"

[[bin]]
name = "yanet-cli-operator-neighbour"
path = "src/main.rs"

[dependencies]
commonpb = { path = "../../../../common/rust/commonpb", version = "0.1", package = "yanet-commonpb" }
ync = { path = "../../../../cli/core", version = "0.1", package = "yanet-cli" }
clap = { version = "4.5", features = ["derive"] }
clap_complete = { version = "4.5", features = ["unstable-dynamic"] }
prost = "0.13"
log = "0.4"
netip = "0.2"
tabled = { version = "0.18", features = ["ansi"] }
tokio = { version = "1", features = ["rt", "net", "time", "macros", "sync"] }
tonic = { version = "0.13", features = ["gzip"] }

[build-dependencies]
tonic-build = "0.13"
15 changes: 15 additions & 0 deletions agents/yanet-route-operator/cli/neighbour/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use core::error::Error;

pub fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rerun-if-changed=../../operatorpb/neighbour.proto");

tonic_build::configure()
.emit_rerun_if_changed(false)
.build_server(false)
.extern_path(".commonpb", "::commonpb::pb")
.compile_protos(
&["../../../../agents/yanet-route-operator/operatorpb/neighbour.proto"],
&["../../../../"],
)
.map_err(Into::into)
}
Loading
Loading