{"id":39477424,"url":"https://github.com/sufuf3/onosjob-operator","last_synced_at":"2026-01-18T05:00:19.650Z","repository":{"id":87446563,"uuid":"192196794","full_name":"sufuf3/onosjob-operator","owner":"sufuf3","description":null,"archived":false,"fork":false,"pushed_at":"2019-06-20T07:08:55.000Z","size":5052,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-02-27T00:21:47.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sufuf3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-06-16T13:53:34.000Z","updated_at":"2024-06-19T10:23:42.292Z","dependencies_parsed_at":null,"dependency_job_id":"69107cb6-da3f-40e8-9f7d-deb03b486ea6","html_url":"https://github.com/sufuf3/onosjob-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/sufuf3/onosjob-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sufuf3%2Fonosjob-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sufuf3%2Fonosjob-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sufuf3%2Fonosjob-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sufuf3%2Fonosjob-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sufuf3","download_url":"https://codeload.github.com/sufuf3/onosjob-operator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sufuf3%2Fonosjob-operator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28530611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":[],"created_at":"2026-01-18T05:00:14.772Z","updated_at":"2026-01-18T05:00:19.583Z","avatar_url":"https://github.com/sufuf3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# onosjob-operator\n\n\u003e The operator for creating a K8s job and using ONOS REST API to create rules or host.\n\n## Table of Contents\n\n- [Features](#features)\n- [Getting Started](#getting-started)\n    - [Prerequisites](#prerequisites)\n    - [Installation](#installation)\n    - [Usage](#usage)\n- [Development setup](#development-setup)\n- [Contributing](#contributing)\n\n## Features\n\nPlease refer http://ONOS-IP:ONOS-UI-PORT/onos/v1/docs  \n\n- hosts : Manage inventory of end-station hosts\n    - [x] POST /hosts\n- flows : Query and program flow rules\n    - [x] POST /flows/{deviceId}\n    - [ ] POST /flows\n\n## Getting Started\n\n### Prerequisites\n\n- Access to a Kubernetes v1.11.3+ cluster.\n- [go](https://golang.org/dl/) version v1.12+.\n- [docker](https://docs.docker.com/install/) version 17.03+.\n- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) version v1.11.3+.\n- [ONOS](https://onosproject.org/) v1.13.5 (Helm chart onos-1.1.0).\n- [Helm](https://helm.sh/) v2.9.1+.\n\n**Note**: This guide uses kubeadm v1.13.5 as the local Kubernetes cluster, please refer to [vagrant](vagrant).\n\n### Installation\n\nRegister the CRD with the Kubernetes apiserver:  \n\n```sh\n$ kubectl create -f deploy/crds/onosjob_v1alpha1_onosjob_crd.yaml\n```\n\nSetup RBAC and deploy the onosjob-operator:  \n\n```sh\n$ kubectl create -f deploy/service_account.yaml\n$ kubectl create -f deploy/role.yaml\n$ kubectl create -f deploy/role_binding.yaml\n$ kubectl create -f deploy/operator.yaml\n```\n\n### Usage\n\nCreate a onosjob CR\n\nEdit `deploy/crds/onosjob_v1alpha1_onosjob_cr.yaml`\n\n```sh\nkubectl create -f deploy/crds/onosjob_v1alpha1_onosjob_cr.yaml\n```\n\n## Development setup\n\n### Install the Operator SDK CLI\n\nOn Ubuntu\n```\nELEASE_VERSION=v0.8.1\ncurl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu\nchmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu \u0026\u0026 sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk \u0026\u0026 rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu\n```\n\nRef: https://github.com/operator-framework/operator-sdk/blob/master/doc/user/install-operator-sdk.md\n\nor `cd vagrant \u0026\u0026 vagrant up`\n\n### Run command when you change Custom Resource structure\n\nAfter modify the followings files, \n\n```\ndeploy/crds/onosjob_v1alpha1_onosjob_cr.yaml\npkg/apis/onosjob/v1alpha1/onosjob_types.go\n```\n\nrun the below command.\n\n```sh\n$ operator-sdk generate k8s\n```\n\n### Run locally outside the cluster\n\nAfter modify the followings file, \n\n```\npkg/controller/onosjob/onosjob_controller.go\n```\n\nand you want to check the program is fine, please run the below command.\n\n```\n$ export OPERATOR_NAME=onosjob-operator\n$ operator-sdk up local --namespace=default\n```\n\nRef: https://github.com/operator-framework/operator-sdk/blob/master/doc/user-guide.md#2-run-locally-outside-the-cluster\n\n### Test Custom Resource\n\nEdit `deploy/crds/onosjob_v1alpha1_onosjob_cr.yaml`\n\nRun mininet  \n\n```sh\nsudo mn --controller remote,ip=ONOS-IP,port=ONOS-openflow-port\n# e.g. sudo mn --controller remote,ip=10.0.2.15,port=31653\n```\n\nCreate CR  \n\n```sh\nkubectl create -f deploy/crds/onosjob_v1alpha1_onosjob_cr.yaml\n```\n\n---\n\n**Note**: This project is for Master's degree. The method is not very good, cause the better way is not to create a K8s job to call ONOS REST API but call the ONOS REST API by the operator.\n\n\u003c!--\n```\noperator-sdk new onosjob-operator --cluster-scoped\noperator-sdk add api  --api-version=onosjob.com/v1alpha1 --kind=ONOSJob\n```\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsufuf3%2Fonosjob-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsufuf3%2Fonosjob-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsufuf3%2Fonosjob-operator/lists"}