Giter Club home page Giter Club logo

onos-operator's Introduction

Kubernetes Operator for µONOS

This project provides a set of Kubernetes operators for managing components of the µONOS architecture. µONOS operators extend the Kubernetes API with custom resources and integrate µONOS subsystems with the Kubernetes control plane.

To install the µONOS operator you can use Helm as follows:

> helm install -n kube-system onos-operator onosproject/onos-operator --wait
NAME: onos-operator
LAST DEPLOYED: Tue Oct 12 20:02:04 2021
NAMESPACE: kube-system
STATUS: deployed
REVISION: 1
TEST SUITE: None

The operator consists of a topo-operator pod and app-operator pod, all of which will be installed in the kube-system namespace by default.

> kubectl get pods -n kube-system
NAME                                              READY   STATUS    RESTARTS   AGE
onos-operator-app-585d588d5c-ndvkr                1/1     Running   0          42m39s
onos-operator-topo-7ff4df6f57-6p8dv               1/1     Running   0          42m39s

App Operator

The application operator registers a mutating admission webhook to intercept pod deployment requests. These requests are inspected for presence of proxy.onosproject.org/inject metadata annotation. If this annotation is present and its value is true, the deployment request will be augmented to include a sidecar onosproject/onos-proxy container as part of the pod.

For more information about see onos-proxy.

Topology Operator

The topology operator extends the Kubernetes API with custom resources for defining µONOS topology objects. Topology resources are propagated from the Kubernetes API to the onos-topo service via the onos-api. When a topology resource is created, the topology operator adds the object to µONOS topology. When a topology resource is deleted, the operator will remove the associated object from the µONOS topology.

Kind

To define a topology object kind, create a Kind resource:

apiVersion: topo.onosproject.org/v1beta1
kind: Kind
metadata:
  name: e2-node
spec:
  attributes:
    foo: bar

Entity

To define a topology entity, create an Entity resource:

apiVersion: topo.onosproject.org/v1beta1
kind: Entity
metadata:
  name: e2-node-1
spec:
  kind:
    name: e2-node
  attributes:
    baz: foo

Relation

To define a topology relation, create a Relation resource connecting a source and target entity:

apiVersion: topo.onosproject.org/v1beta1
kind: Relation
metadata:
  name: e2-node-1-e2t-1
spec:
  kind:
    name: e2-connection
  source:
    name: e2-node-1
  target:
    name: e2t-1

Dynamic topology management

The topology operator supports dynamic entity sets with Kubernetes label selectors using the Service resource:

apiVersion: topo.onosproject.org/v1beta1
kind: Service
metadata:
  name: my-app
spec:
  selector:
    matchLabels:
      name: my-app
  kind:
    name: my-app-node

The operator will automatically populate the µONOS topology with an entity for each pod matching the service's label selector. This allows dynamic/autoscaling Kubernetes components like ReplicaSets to be represented as dynamic objects in the µONOS topology.

onos-operator's People

Contributors

adibrastegarnia avatar frouzbeh avatar kuujo avatar onos-builder avatar ray-milkey avatar teone avatar tomikazi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.