{"id":18678181,"url":"https://github.com/srl-labs/srl-controller","last_synced_at":"2026-01-22T10:01:37.258Z","repository":{"id":42052582,"uuid":"393459536","full_name":"srl-labs/srl-controller","owner":"srl-labs","description":"k8s controller for SR Linux nodes scheduled by KNE","archived":false,"fork":false,"pushed_at":"2024-07-01T15:45:32.000Z","size":418,"stargazers_count":17,"open_issues_count":3,"forks_count":4,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-10-22T19:54:07.277Z","etag":null,"topics":["kne","kubernetes","srlinux"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srl-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-06T17:58:35.000Z","updated_at":"2025-07-19T19:42:54.000Z","dependencies_parsed_at":"2024-02-02T21:27:23.474Z","dependency_job_id":"ca1a3db5-32b6-49d7-8df4-2f30c80904ff","html_url":"https://github.com/srl-labs/srl-controller","commit_stats":null,"previous_names":["srl-labs/kne-controller"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/srl-labs/srl-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srl-labs","download_url":"https://codeload.github.com/srl-labs/srl-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srl-labs%2Fsrl-controller/sbom","scorecard":{"id":844078,"data":{"date":"2025-08-11","repo":{"name":"github.com/srl-labs/srl-controller","commit":"0daf33ffdd162850eafa68823108595191f85c3c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/cicd.yml:1","Warn: no topLevel permission defined: .github/workflows/e2e.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cicd.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cicd.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cicd.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cicd.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cicd.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cicd.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cicd.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cicd.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cicd.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cicd.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/cicd.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/e2e.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/e2e.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/srl-labs/srl-controller/e2e.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:6","Warn: containerImage not pinned by hash: Dockerfile:33: pin your Docker image by updating gcr.io/distroless/static:nonroot to gcr.io/distroless/static:nonroot@sha256:cdf4daaf154e3e27cfffc799c16f343a384228f38646928a1513d925f473cb46","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-3250 / GHSA-29wx-vh33-7x7r","Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T21:03:39.368Z","repository_id":42052582,"created_at":"2025-08-23T21:03:39.368Z","updated_at":"2025-08-23T21:03:39.368Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28661007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kne","kubernetes","srlinux"],"created_at":"2024-11-07T09:36:17.587Z","updated_at":"2026-01-22T10:01:37.252Z","avatar_url":"https://github.com/srl-labs.png","language":"Go","readme":"# SR Linux Controller for KNE\n\nThis is a k8s controller for running and managing SR Linux nodes launched from [openconfig/kne](https://github.com/openconfig/kne) topology.\n\nBuilt with [kubebuilder v3.8.0](https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v3.8.0).\n\n## Install\n\nTo install the latest version of this controller on a cluster referenced in `~/.kube/config`, issue the following command:\n\n```bash\n# latest version\nkubectl apply -k https://github.com/srl-labs/srl-controller/config/default\n\n# specific version (using git reference, e.g. tag or commit)\nkubectl apply -k https://github.com/srl-labs/srl-controller/config/default?ref=v0.3.1\n```\n\nThe resources of this controller will be scoped under `srlinux-controller` namespace.\n\n```text\n❯ kubectl get all -n srlinux-controller\n\nNAME                                                        READY   STATUS    RESTARTS   AGE\npod/srlinux-controller-controller-manager-c7495dcc7-rbh7m   2/2     Running   0          6m5s\n\nNAME                                                            TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)    AGE\nservice/srlinux-controller-controller-manager-metrics-service   ClusterIP   10.96.34.86   \u003cnone\u003e        8443/TCP   16m\n\nNAME                                                    READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/srlinux-controller-controller-manager   1/1     1            1           16m\n\nNAME                                                              DESIRED   CURRENT   READY   AGE\nreplicaset.apps/srlinux-controller-controller-manager-c7495dcc7   1         1         1       16m\n```\n\n### Installing from a repo\n\nThe controller can be installed with make directly from the repo:\n\n```text\nmake deploy IMG=ghcr.io/srl-labs/srl-controller:0.3.1\n```\n\nMake sure to check which controller versions are [available](https://github.com/srl-labs/srl-controller/pkgs/container/srl-controller/versions).\n\n## Uninstall\n\nTo uninstall the controller from the cluster:\n\n```text\nkubectl delete -k https://github.com/srl-labs/srl-controller/config/default\n```\n\n## Testing with `kne` \u0026 `kind`\n\nTo run the released version of the controller in a test cluster deployed with [`kne`](https://github.com/openconfig/kne) and [`kind`](https://kind.sigs.k8s.io/) follow the steps outlined in the [KNE repository](https://github.com/openconfig/kne/tree/main/docs).\n\nOnce the kne+kind cluster is created and the `srl-controller` is installed onto it, a [demo topology with two SR Linux nodes](https://github.com/openconfig/kne/blob/db5fe5be01a1b6b65bd79e740e2c819c5aeb50b0/examples/srlinux/2node-srl-with-config.pbtxt) can be deployed as follows:\n\n```bash\nkne create examples/srlinux/2node-srl-with-config.pbtxt\n```\n\nNote, that controller logs can be viewed live with:\n\n```bash\nkubectl logs --follow -n srlinux-controller $(kubectl get pods -A | grep srlinux-controller | awk '{print $2}')\n```\n\nThis will deploy the SR Linux nodes and will create k8s services as per the topology configuration.\n\nSR Linux custom resources can be queried as:\n\n```bash\nkubectl get srlinux -A\n\nNAMESPACE    NAME   AGE   IMAGE                          STATUS    READY   CONFIG\n2-srl-ixr6   srl1   42s   ghcr.io/nokia/srlinux:latest   Running   true    failed\n2-srl-ixr6   srl2   42s   ghcr.io/nokia/srlinux:latest   Running   true    loaded\n```\n\nAvailable statuses:\n\n- `STATUS`: `Running` when the underlying pod is running. The status is copied from the pod status.\n- `READY`: `true` when the SR Linux node is ready to accept configuration. The status is `true` when SR Linux management servers is ready to accept connections and configurations.\n- `CONFIG`: `loaded` when the startup-configuration is succesfully applied. The status is `failed` when errors occured during startup-configuration load.\n\nThe services will be exposed via MetalLB and can be queried as:\n\n```text\n❯ kubectl -n 3node-srlinux get svc\nNAME         TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                                      AGE\nservice-r1   LoadBalancer   10.96.151.84    172.19.0.50   57400:30006/TCP,443:30004/TCP,22:30005/TCP   6m10s\nservice-r2   LoadBalancer   10.96.34.36     172.19.0.51   443:30010/TCP,22:30011/TCP,57400:30009/TCP   6m9s\n```\n\nTo connect with SSH to the `r1` node, use `ssh admin@172.19.0.50` command.\n\n### Loading images to kind cluster\n\n[Public SR Linux container image](https://github.com/nokia/srlinux-container-image) will be pulled by kind automatically if Internet access is present. Images that are not available publicly can be uploaded to kind manually:\n\n```bash\n# default kne kind cluster name is `kne`\n# which is the last argument in the command\n\n# load locally available container image\nkind load docker-image srlinux:0.0.0-38566 --name kne\n\n# load publicly available container image\nkind load docker-image ghcr.io/nokia/srlinux:22.6.4 --name kne\n```\n\n## Using license files\n\nTo remove the packets-per-second limit of a public container image or to launch chassis-based variants of SR Linux (ixr-6e/10e) KNE users should provide a valid license file to the `srl-controller`.\n\nNavigate to [Using license files](docs/using-licenses.md) document to have a detailed explanation on that topic.\n\n## Controller operations\n\nThe controller is designed to manage the `Srlinux` custom resource defined with [the following CRD](https://doc.crds.dev/github.com/srl-labs/srl-controller).\n\nThe request to create/delete a resource of kind `Srlinux` is typically coming from `openconfig/kne` topology.\n\n### Creation\n\nWhen a request to create a `Srlinux` resource named `r1` in namespace `ns` comes in, the controller's reconcile loop does the following:\n\n1. Checks if the pods exist within a namespace `ns` with a name `r1`\n2. If the pod hasn't been found, then the controller first ensures that the necessary config maps exist in namespace `ns` and creates them otherwise.\n3. When config maps are sorted out, the controller schedules a pod with the name `r1` and requeues the request.\n4. If a startup-config was provided, the controller loads this config using SSH into the pod, creates a named checkpoint \"initial\" and requeues the request.\n5. In a requeue run, the pod is now found and the controller updates the status of `Srlinux` resource.\n\n### Deletion\n\nWhen a deletion happens on `Srlinux` resource, the reconcile loop does nothing.\n\n## Building `srl-controller` container image\n\nTo build `srl-controller` container image, execute:\n\n```bash\n# don't forget to set the correct tag\n# for example make docker-build IMG=ghcr.io/srl-labs/srl-controller:v0.6.2\nmake docker-build IMG=ghcr.io/srl-labs/srl-controller:${tag}\n```\n\n\u003e build process will try to remove license headers for some manifests, discard those changes.\n\nNext, update the controller version in [manager/kustomization.yaml](config/manager/kustomization.yaml) kustomization file to match the newly built version.\n\nFinally, upload the container image to the registry:\n\n```bash\ndocker push ghcr.io/srl-labs/srl-controller:${tag}\n\n# if this is the latest version, also push it with the `latest` tag\ndocker tag ghcr.io/srl-labs/srl-controller:${tag} ghcr.io/srl-labs/srl-controller:latest\ndocker push ghcr.io/srl-labs/srl-controller:latest\n```\n\nNote, update the SR Linux manifest in the [KNE repo](https://github.com/openconfig/kne/) to use the new version of the controller. To generate the manifest, run:\n\n```bash\nkustomize build config/default\n```\n\n## Developers guide\n\nDevelopers should deploy the controller onto a cluster from the source code. Ensure that the `srl-controller` is [uninstalled](#uninstall) from the cluster before proceeding.\n\nThe cluster should be deployed with the `kne` cli utility. First, make sure to remove the controller section from kne's `kind-bridge.yaml` file so that controllers are not installed automatically, as we will install srl-controller from the source code.\n\n```bash\nkne deploy deploy/kne/kind-bridge.yaml\n```\n\nInstall the Srlinux CRDs onto the cluster\n\n```\nmake install\n```\n\nTo build and run the controller from the source code:\n\n```\nmake run\n```\n\nController's log printed to stdout/stderr. It is possible to deploy topologies with `kne create` now.\n\nMake changes to the controller code-base, and re-run `make run` to see the changes in effect.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrl-labs%2Fsrl-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrl-labs%2Fsrl-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrl-labs%2Fsrl-controller/lists"}