Kubernetes operator providing CRDs to interact with NETCONF servers.

NETCONF operator

Report Card Build Status

This operator is meant to provide support for:

  • RFC6241 Network Configuration Protocol (NETCONF)
  • RFC6242 Using the NETCONF Protocol over Secure Shell (SSH)

It is build using the following go-netconf implementation.

Usage

The MountPoint CRD is meant to establish an SSH connection to a remote NETCONF server. It supports only username/password for authentication. Support for public key pair will be added shortly.

The NETCONF operations currently supported are represented with their respective CRD, see the examples folder:

  • Get
  • GetConfig
  • EditConfig
  • Commit
  • Lock
  • Unlock

All these operations rely on the MountPoint to be existing at the time of the CRD creation.

The Lock CRD removes the lock on the datastore when deleted; so removal of a Lock CR acts like an unlock.

Finally, in order to sequence operations, the EditConfig, Commit, and Unlock CRD provide to ability to define an operation it is depending on. As such, one can achieve such flow: Lock --> EditConfig --> Commit --> Unlock.

TODO

  • fix cleanup sequence
  • add support for NETCONF notification
  • map NETCONF notification to K8S event

Dev

To build:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
make docker-build docker-push IMG=quay.io/adetalho/netconf-operator:dev

To deploy:

make deploy IMG=quay.io/adetalho/netconf-operator:dev

To remove:

make undeploy

How the operator was generated using the Operator SDK

1 - create the scaffolding

operator-sdk init \
--domain=adetalhouet.io \
--repo=github.com/adetalhouet/netconf-operator
  1. generate the netconf operations API.
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind Mountpoint
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind Commit
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind EditConfig
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind GetConfig
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind Get
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind Lock
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind Unlock
    
operator-sdk create api \
    --resource=true \
    --controller=true \
    --group netconf \
    --version v1 \
    --kind RPC

Links

Getting started with Operator SDK

Similar Resources

Kubei is a flexible Kubernetes runtime scanner, scanning images of worker and Kubernetes nodes providing accurate vulnerabilities assessment, for more information checkout:

Kubei is a flexible Kubernetes runtime scanner, scanning images of worker and Kubernetes nodes providing accurate vulnerabilities assessment, for more information checkout:

Kubei is a vulnerabilities scanning and CIS Docker benchmark tool that allows users to get an accurate and immediate risk assessment of their kubernet

Dec 30, 2022

Test Operator using operator-sdk 1.15

test-operator Test Operator using operator-sdk 1.15 operator-sdk init --domain rbt.com --repo github.com/ravitri/test-operator Writing kustomize manif

Dec 28, 2021

a k8s operator 、operator-sdk

helloworld-operator a k8s operator 、operator-sdk Operator 参考 https://jicki.cn/kubernetes-operator/ https://learnku.com/articles/60683 https://opensour

Jan 27, 2022

Operator Permissions Advisor is a CLI tool that will take a catalog image and statically parse it to determine what permissions an Operator will request of OLM during an install

Operator Permissions Advisor is a CLI tool that will take a catalog image and statically parse it to determine what permissions an Operator will request of OLM during an install. The permissions are aggregated from the following sources:

Apr 22, 2022

The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022

PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes.

GalaxyKube -- PolarDB-X Operator PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes. It follo

Dec 19, 2022

Kubernetes Operator to sync secrets between different secret backends and Kubernetes

Vals-Operator Here at Digitalis we love vals, it's a tool we use daily to keep secrets stored securely. We also use secrets-manager on the Kubernetes

Nov 13, 2022

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

Dec 26, 2022

Carrier is a Kubernetes controller for running and scaling game servers on Kubernetes.

Carrier is a Kubernetes controller for running and scaling game servers on Kubernetes.

Carrier is a Kubernetes controller for running and scaling game servers on Kubernetes. This project is inspired by agones. Introduction Genera

Nov 25, 2022
Kubernetes Operator supporting NETCONF RPCs and Notifications.
 Kubernetes Operator supporting NETCONF RPCs and Notifications.

❗ Red Hat does not provide commercial support for the content of these repos #########################################################################

Oct 27, 2022
Basic Kubernetes operator that have multiple versions in CRD. This operator can be used to experiment and understand Operator/CRD behaviors.

add-operator Basic Kubernetes operator that have multiple versions in CRD. This operator can be used to experiment and understand Operator/CRD behavio

Dec 15, 2021
Minecraft-operator - A Kubernetes operator for Minecraft Java Edition servers

Minecraft Operator A Kubernetes operator for dedicated servers of the video game

Dec 15, 2022
An operator which complements grafana-operator for custom features which are not feasible to be merged into core operator

Grafana Complementary Operator A grafana which complements grafana-operator for custom features which are not feasible to be merged into core operator

Aug 16, 2022
The Elastalert Operator is an implementation of a Kubernetes Operator, to easily integrate elastalert with gitops.

Elastalert Operator for Kubernetes The Elastalert Operator is an implementation of a Kubernetes Operator. Getting started Firstly, learn How to use el

Jun 28, 2022
K8s-network-config-operator - Kubernetes network config operator to push network config to switches

Kubernetes Network operator Will add more to the readme later :D Operations The

May 16, 2022
Pulumi-k8s-operator-example - OpenGitOps Compliant Pulumi Kubernetes Operator Example

Pulumi GitOps Example OpenGitOps Compliant Pulumi Kubernetes Operator Example Pr

May 6, 2022
Kubernetes Operator Samples using Go, the Operator SDK and OLM
Kubernetes Operator Samples using Go, the Operator SDK and OLM

Kubernetes Operator Patterns and Best Practises This project contains Kubernetes operator samples that demonstrate best practices how to develop opera

Nov 24, 2022
A simple operator to interact with a Postgres database.

Built following this blog. Kubebuilder commands use to set up the project mkdir second-operator cd second-operator kubebuilder init --domain arshsharm

Nov 27, 2021