Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fc77623
test: add integration test framework for CRD to gNMI pipeline
nikatza Jun 10, 2026
56d02f4
docs: add AGENTS.md
nikatza Jun 10, 2026
6de3dae
test: add banner integration test
nikatza Jun 10, 2026
db42686
test: add DNS integration test
nikatza Jun 10, 2026
0caa761
test: add interfaceconfig integration test (NX-OS specific)
nikatza Jun 10, 2026
f958e41
test: add interfaces integration test
nikatza Jun 10, 2026
473fc04
test: add LLDP integration test
nikatza Jun 10, 2026
41876b3
test: add NTP integration test
nikatza Jun 10, 2026
8e29c6b
test: add routedvlan integration test
nikatza Jun 10, 2026
aa04417
test: add routingpolicy and prefixset integration test
nikatza Jun 10, 2026
3f30cdb
test: add subinterface integration test
nikatza Jun 10, 2026
ee3d5c6
test: add VRF integration test
nikatza Jun 10, 2026
cfc574f
test: add OSPF and PIM integration tests with interface dependencies
nikatza Jun 10, 2026
1420bad
test: add NVE integration test with loopback dependency
nikatza Jun 10, 2026
8b58c2f
test: add EVPNInstance integration test (Routed/L3VNI type)
nikatza Jun 10, 2026
6530452
test: add VPCDomain integration test (NX-OS specific)
nikatza Jun 10, 2026
6fd3a50
test: add BGP and BGPPeer integration test
nikatza Jun 10, 2026
d269c80
test: add Syslog integration test
nikatza Jun 10, 2026
72c6d34
test: add SNMP integration test
nikatza Jun 10, 2026
3317b38
test: add ManagementAccess integration test
nikatza Jun 10, 2026
7b5430d
test: add AccessControlList integration test
nikatza Jun 10, 2026
2a859bf
test: add DHCPRelay integration test
nikatza Jun 10, 2026
5d93019
test: add ISIS integration test
nikatza Jun 10, 2026
7390aa7
WIP: e2e test refactoring checkpoint
nikatza Jun 13, 2026
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
80 changes: 80 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"default:pinDigestsDisabled",
"docker:pinDigests",
"mergeConfidence:all-badges"
],
"assignees": [
"felix-kaestner"
],
"commitMessageAction": "Renovate: Update",
"constraints": {
"go": "1.26"
},
"dependencyDashboardOSVVulnerabilitySummary": "all",
"osvVulnerabilityAlerts": true,
"postUpdateOptions": [
"gomodTidy",
"gomodUpdateImportPaths"
],
"packageRules": [
{
"matchPackageNames": [
"/.*/"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"groupName": "External dependencies"
},
{
"matchPackageNames": [
"/^github\\.com\\/sapcc\\/.*/"
],
"automerge": true,
"groupName": "github.com/sapcc"
},
{
"matchPackageNames": [
"go",
"golang",
"actions/go-versions"
],
"groupName": "golang",
"separateMinorPatch": true
},
{
"matchPackageNames": [
"go",
"golang",
"actions/go-versions"
],
"matchUpdateTypes": [
"minor",
"major"
],
"dependencyDashboardApproval": true
},
{
"matchFileNames": [
".github/workflows/checks.yaml",
".github/workflows/codeql.yaml"
],
"enabled": false
},
{
"matchPackageNames": [
"/^k8s.io\\//"
],
"allowedVersions": "0.33.x"
}
],
"prHourlyLimit": 0,
"schedule": [
"before 8am on Friday"
],
"semanticCommits": "disabled"
}
48 changes: 48 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
################################################################################
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
# Edit Makefile.maker.yaml instead. #
################################################################################

# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
# SPDX-License-Identifier: Apache-2.0

name: Checks
"on":
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch: {}
permissions:
checks: write
contents: read
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
check-latest: true
go-version: 1.26.4
- name: Run golangci-lint
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9
with:
version: v2.12.2
- name: Delete pre-installed shellcheck
run: sudo rm -f "$(which shellcheck)"
- name: Run shellcheck
run: make run-shellcheck
- name: Dependency Licenses Review
run: make check-dependency-licenses
- name: Check for spelling errors
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1
env:
CLICOLOR: "1"
46 changes: 46 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
################################################################################
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
# Edit Makefile.maker.yaml instead. #
################################################################################

# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
# SPDX-License-Identifier: Apache-2.0

name: CodeQL
"on":
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '00 07 * * 1'
workflow_dispatch: {}
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: CodeQL
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
check-latest: true
go-version: 1.26.4
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
with:
languages: go
queries: security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ builds:
- amd64
- arm64
ignore:
- goos: darwin
goarch: amd64
- goos: windows
goarch: arm64
ldflags:
Expand Down
18 changes: 2 additions & 16 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
# SPDX-FileCopyrightText: 2026 SAP SE
# SPDX-FileCopyrightText: 2025 SAP SE
#
# SPDX-License-Identifier: Apache-2.0
[default]
extend-ignore-re = [
"Cisco-IOS-XR.*"
]

[default.extend-words]
ser = "ser"
otu = "otu"
# Typo in name used by Cisco NX-OS for a configurable property.
# See: https://pubhub.devnetcloud.com/media/dme-docs-10-4-3/docs/System/snmp%3ACommSecP/#configurable-properties
acess = "acess"
# See: https://github.com/openconfig/public/pull/1423
entitites = "entitites"
mininum = "mininum"
specifc = "specifc"
# Go built-in keyword
cpy = "cpy"

[files]
extend-exclude = [
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ WORKDIR /workspace
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=bind,source=go.mod,target=go.mod \
--mount=type=bind,source=go.sum,target=go.sum \
--mount=type=bind,source=test/gnmi,target=test/gnmi \
go mod download -x

RUN --mount=type=bind,target=. \
Expand Down
49 changes: 40 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,20 @@ CONTAINER_TOOL ?= docker
# KIND_CLUSTER defines the name of the Kind cluster to be used for the tilt setup.
KIND_CLUSTER ?= network

# PROVIDER defines which provider to test (openconfig, nxos, iosxr).
# Used by test-e2e to filter which testdata directory to use.
PROVIDER ?= openconfig

LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)

install-gofumpt: FORCE
@if ! hash gofumpt 2>/dev/null; then printf "\e[1;36m>> Installing gofumpt...\e[0m\n"; go install mvdan.cc/gofumpt@latest; fi

install-ginkgo: FORCE
@if ! hash ginkgo 2>/dev/null; then printf "\e[1;36m>> Installing ginkgo...\e[0m\n"; go install github.com/onsi/ginkgo/v2/ginkgo@latest; fi

install-kubebuilder: FORCE
@set -eou pipefail; if ! hash kubebuilder 2>/dev/null; then printf "\e[1;36m>> Installing kubebuilder...\e[0m\n"; if command -v curl >/dev/null 2>&1; then GET="curl -sLo"; elif command -v wget >/dev/null 2>&1; then GET="wget -O"; else echo "Didn't find curl or wget to download kubebuilder"; exit 2; fi; BIN=$$(go env GOBIN); if [[ -z $$BIN ]]; then BIN=$$(go env GOPATH)/bin; fi; $$GET "$$BIN/kubebuilder" "https://go.kubebuilder.io/dl/latest/$$(go env GOOS)/$$(go env GOARCH)"; chmod +x "$$BIN/kubebuilder"; fi

Expand All @@ -73,7 +80,9 @@ fmt: FORCE install-gofumpt
@gofumpt -l -w $(shell git ls-files '*.go' | grep -v '^internal/provider/openconfig')

# Run the e2e tests against a k8s cluster.
test-e2e: FORCE
# Use PROVIDER=nxos or PROVIDER=openconfig to filter tests.
# Uses ginkgo CLI with -procs=4 for parallel test execution.
test-e2e-kind: FORCE install-ginkgo
@command -v kind >/dev/null 2>&1 || { \
echo "Kind is not installed. Please install Kind manually."; \
exit 1; \
Expand All @@ -82,8 +91,14 @@ test-e2e: FORCE
echo "No Kind cluster is running. Please start a Kind cluster before running the e2e tests."; \
exit 1; \
}
@printf "\e[1;36m>> go test ./test/e2e/ -v -ginkgo.v\e[0m\n"
@KIND_CLUSTER=$(KIND_CLUSTER) go test ./test/e2e/ -v -ginkgo.v
@printf "\e[1;36m>> ginkgo -procs=4 -timeout=15m -v ./test/e2e/ (PROVIDER=$(PROVIDER))\e[0m\n"
@KIND_CLUSTER=$(KIND_CLUSTER) E2E_PROVIDER=$(PROVIDER) ginkgo -procs=4 -timeout=15m -v ./test/e2e/

# Run the e2e tests in envtest mode (no cluster required).
# Use PROVIDER=nxos or PROVIDER=openconfig to filter tests.
test-e2e-envtest: FORCE install-setup-envtest
@printf "\e[1;36m>> go test ./test/e2e/ -tags=envtest -v -ginkgo.v (PROVIDER=$(PROVIDER))\e[0m\n"
@KUBEBUILDER_ASSETS=$$(setup-envtest use 1.32 -p path) E2E_PROVIDER=$(PROVIDER) go test ./test/e2e/ -tags=envtest -v -ginkgo.v

docker-build: FORCE
@printf "\e[1;36m>> $(CONTAINER_TOOL) build --tag=$(IMG) .\e[0m\n"
Expand All @@ -98,15 +113,26 @@ build-installer: FORCE generate install-kustomize
@printf "\e[1;36m>> kustomize build config/default > dist/install.yaml\e[0m\n"
@mkdir -p dist; kustomize build config/default > dist/install.yaml

# Deploy controller to the k8s cluster
# Deploy controller to the k8s cluster.
# Use PROVIDER to set the provider (default: openconfig).
deploy: FORCE generate install-kustomize
@printf "\e[1;36m>> kustomize build config/default | kubectl apply -f -\e[0m\n"
@kustomize build config/default | kubectl apply -f -
@printf "\e[1;36m>> deploying controller-manager (PROVIDER=$(PROVIDER))\e[0m\n"
@kustomize build config/develop | sed 's/--provider=openconfig/--provider=$(PROVIDER)/' | kubectl apply -f -

# Undeploy controller from the k8s cluster
undeploy: FORCE install-kustomize
@printf "\e[1;36m>> kustomize build config/default | kubectl delete -f -\e[0m\n"
@kustomize build config/default | kubectl delete --ignore-not-found=true -f -
@printf "\e[1;36m>> undeploying controller-manager\e[0m\n"
@kustomize build config/develop | kubectl delete --ignore-not-found=true -f -

# Deploy gnmi-test-server for local development (not needed for tests - they create their own)
deploy-gnmi-server: FORCE
@printf "\e[1;36m>> deploying gnmi-test-server\e[0m\n"
@kubectl apply -f config/develop/gnmi-test-server.yaml

# Undeploy gnmi-test-server
undeploy-gnmi-server: FORCE
@printf "\e[1;36m>> undeploying gnmi-test-server\e[0m\n"
@kubectl delete --ignore-not-found=true -f config/develop/gnmi-test-server.yaml

# Install CRDs into the k8s cluster
deploy-crds: FORCE generate install-kustomize
Expand Down Expand Up @@ -188,6 +214,11 @@ docker-push-test-lab: FORCE docker-push-test-lab
@printf "\e[1;36m>> $(CONTAINER_TOOL) push $(TEST_LAB_IMG)\e[0m\n"
@$(CONTAINER_TOOL) push $(TEST_LAB_IMG)


test-integration: FORCE install-setup-envtest
@printf "\e[1;36m>> go test ./test/integration/ -v\e[0m\n"
@KUBEBUILDER_ASSETS=$$(setup-envtest use 1.35 -p path) go test ./test/integration/ -v

ROOT_DIR := $(shell pwd)
DOCS_IMG ?= ironcore-dev/network-operator-docs:latest

Expand All @@ -214,7 +245,7 @@ install-shellcheck: FORCE
@set -eou pipefail; if ! hash shellcheck 2>/dev/null; then printf "\e[1;36m>> Installing shellcheck...\e[0m\n"; SHELLCHECK_ARCH=$$(uname -m); if [[ "$$SHELLCHECK_ARCH" == "arm64" ]]; then SHELLCHECK_ARCH=aarch64; fi; SHELLCHECK_OS=$$(uname -s | tr '[:upper:]' '[:lower:]'); SHELLCHECK_VERSION="stable"; if command -v curl >/dev/null 2>&1; then GET="curl -sLo-"; elif command -v wget >/dev/null 2>&1; then GET="wget -O-"; else echo "Didn't find curl or wget to download shellcheck"; exit 2; fi; $$GET "https://github.com/koalaman/shellcheck/releases/download/$$SHELLCHECK_VERSION/shellcheck-$$SHELLCHECK_VERSION.$$SHELLCHECK_OS.$$SHELLCHECK_ARCH.tar.xz" | tar -Jxf -; BIN=$$(go env GOBIN); if [[ -z $$BIN ]]; then BIN=$$(go env GOPATH)/bin; fi; install -Dm755 shellcheck-$$SHELLCHECK_VERSION/shellcheck -t "$$BIN"; rm -rf shellcheck-$$SHELLCHECK_VERSION; fi

install-typos: FORCE
@set -eou pipefail; if ! hash typos 2>/dev/null; then printf "\e[1;36m>> Installing typos...\e[0m\n"; TYPOS_ARCH=$$(uname -m); if [[ "$$TYPOS_ARCH" == "arm64" ]]; then TYPOS_ARCH=aarch64; fi; if command -v curl >/dev/null 2>&1; then GET="curl $${GITHUB_TOKEN:+" -u \":$$GITHUB_TOKEN\""} -sLo-"; elif command -v wget >/dev/null 2>&1; then GET="wget $${GITHUB_TOKEN:+" --password \"$$GITHUB_TOKEN\""} -O-"; else echo "Didn't find curl or wget to download typos"; exit 2; fi; if command -v gh >/dev/null; then TYPOS_GET_RELEASE_JSON="gh api /repos/crate-ci/typos/releases"; else TYPOS_GET_RELEASE_JSON="$$GET https://api.github.com/repos/crate-ci/typos/releases"; fi; TYPOS_VERSION=$$($$TYPOS_GET_RELEASE_JSON | jq -r '.[0].name' ); if [[ $(UNAME_S) == Darwin ]]; then TYPOS_FILE="typos-$$TYPOS_VERSION-$$TYPOS_ARCH-apple-darwin.tar.gz"; elif [[ $(UNAME_S) == Linux ]]; then TYPOS_FILE="typos-$$TYPOS_VERSION-$$TYPOS_ARCH-unknown-linux-musl.tar.gz"; fi; mkdir -p typos; $$GET ""https://github.com/crate-ci/typos/releases/download/$$TYPOS_VERSION/$$TYPOS_FILE"" | tar -C typos -zxf -; BIN=$$(go env GOBIN); if [[ -z $$BIN ]]; then BIN=$$(go env GOPATH)/bin; fi; install -Dm755 typos/typos -t "$$BIN"; rm -rf typos/; fi
@set -xeou pipefail; if ! hash typos 2>/dev/null; then printf "\e[1;36m>> Installing typos...\e[0m\n"; TYPOS_ARCH=$$(uname -m); if [[ "$$TYPOS_ARCH" == "arm64" ]]; then TYPOS_ARCH=aarch64; fi; if command -v curl >/dev/null 2>&1; then GET="curl $${GITHUB_TOKEN:+" -u \":$$GITHUB_TOKEN\""} -sLo-"; elif command -v wget >/dev/null 2>&1; then GET="wget $${GITHUB_TOKEN:+" --password \"$$GITHUB_TOKEN\""} -O-"; else echo "Didn't find curl or wget to download typos"; exit 2; fi; if command -v gh >/dev/null; then TYPOS_GET_RELEASE_JSON="gh api /repos/crate-ci/typos/releases"; else TYPOS_GET_RELEASE_JSON="$$GET https://api.github.com/repos/crate-ci/typos/releases"; fi; TYPOS_VERSION=$$($$TYPOS_GET_RELEASE_JSON | jq -r '.[0].name' ); if [[ $(UNAME_S) == Darwin ]]; then TYPOS_FILE="typos-$$TYPOS_VERSION-$$TYPOS_ARCH-apple-darwin.tar.gz"; elif [[ $(UNAME_S) == Linux ]]; then TYPOS_FILE="typos-$$TYPOS_VERSION-$$TYPOS_ARCH-unknown-linux-musl.tar.gz"; fi; mkdir -p typos; $$GET ""https://github.com/crate-ci/typos/releases/download/$$TYPOS_VERSION/$$TYPOS_FILE"" | tar -C typos -zxf -; BIN=$$(go env GOBIN); if [[ -z $$BIN ]]; then BIN=$$(go env GOPATH)/bin; fi; install -Dm755 typos/typos -t "$$BIN"; rm -rf typos/; fi

install-go-licence-detector: FORCE
@if ! hash go-licence-detector 2>/dev/null; then printf "\e[1;36m>> Installing go-licence-detector (this may take a while)...\e[0m\n"; go install go.elastic.co/go-licence-detector@latest; fi
Expand Down
Loading
Loading