Kubernetes operator for managing YANET (Yet Another Network) deployments on worker nodes.
- π Automated Deployment Management β Creates and updates Deployments based on Yanet CRD specs
- π― Per-Node Deployment β One deployment per worker node with node affinity
- π Auto-Discovery β Automatically discovers and manages Yanet instances
- π Status Conditions β Ready, Synced, and Progressing conditions
- π§Ή Graceful Cleanup β Finalizers ensure proper resource cleanup
- π Kubernetes Events β Audit trail for all operator actions
- β Validation Webhooks β Admission control for Yanet and YanetConfig resources
- π Prometheus Metrics β Reconciliation metrics and resource monitoring
- π§ͺ 93.2% Test Coverage β Comprehensive unit and integration tests
- π CI/CD Ready β GitHub Actions for testing and publishing
# Install from Docker Hub OCI registry
helm install yanet-operator \
oci://registry-1.docker.io/yanetplatform/yanet-operator \
--version 0.1.5 \
--namespace yanet-system \
--create-namespace
# Or install from GitHub Container Registry
helm install yanet-operator \
oci://ghcr.io/yanet-platform/yanet-operator \
--version 0.1.5 \
--namespace yanet-system \
--create-namespace# Apply CRDs and operator deployment
kubectl apply -f https://github.com/yanet-platform/yanet-operator/releases/latest/download/install.yamlapiVersion: yanet.yanet-platform.io/v1alpha1
kind: Yanet
metadata:
name: yanet-worker-01
spec:
nodeName: worker-01
type: release
dataplane:
enable: true
image: yanetplatform/yanet-dataplane
tag: latest
controlplane:
enable: true
image: yanetplatform/yanet-controlplane
tag: latestkubectl apply -f yanet-instance.yamlapiVersion: yanet.yanet-platform.io/v1alpha1
kind: YanetConfig
metadata:
name: yanet-config
spec:
updateWindow: 300
autoDiscovery:
enable: true
namespace: default- π Testing Guide β How to run tests and contribute
- β Validation Webhooks β Admission control and validation rules
- π Prometheus Metrics β Monitoring and observability
- π Release Guide β How to create and publish releases
- ποΈ Architecture Analysis β Design decisions and roadmap
- π€ AI Development Guide β Guidelines for AI assistants
- Go 1.26.2+
- Docker
- kubectl
- Helm 3+
- Kind (for local testing)
You'll need a Kubernetes cluster to run against. You can use KIND to get a local cluster for testing, or run against a remote cluster.
Note: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster kubectl cluster-info shows).
# Run tests
make test
# Run tests with race detector
make test-race
# Run tests in Docker (no local Go required)
make test-docker
# Build binary
make build
# Run locally (against current kubeconfig context)
make run# Build image
make docker-build IMG=yanetplatform/yanet-operator:v0.1.5
# Push to Docker Hub
make docker-push IMG=yanetplatform/yanet-operator:v0.1.5# Install CRDs
make install
# Deploy operator
make deploy IMG=yanetplatform/yanet-operator:v0.1.5
# Create sample resources
kubectl apply -f config/samples/# 1. Update CRDs (if API changed)
make manifests
./bin/kustomize build config/crd > deploy/charts/yanet-operator/crds/yanet.yaml
# 2. Update RBAC (if permissions changed)
make manifests
./bin/kustomize build config/rbac/ | sed 's/system/{{ .Values.namespace }}/g' > deploy/charts/yanet-operator/templates/rbac.yaml
# 3. Update version in Chart.yaml
# Edit deploy/charts/yanet-operator/Chart.yaml
# 4. Test chart locally
helm lint deploy/charts/yanet-operator
helm template test deploy/charts/yanet-operator
# 5. Create git tag to trigger publishing
git tag v0.1.5
git push origin v0.1.5Note: GitHub Actions will automatically build and publish Docker images and Helm charts when you push a version tag.
To delete the CRDs from the cluster:
make uninstallUnDeploy the controller from the cluster:
make undeployThis project aims to follow the Kubernetes Operator pattern.
It uses Controllers, which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster.
- Install the CRDs into the cluster:
make install- Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
make runNOTE: You can also run this in one step by running: make install run
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifestsNOTE: Run make help for more information on all potential make targets
The project uses GitHub Actions for automated testing and publishing:
- Tests β Run on every push and PR
- Docker Images β Published to Docker Hub and GHCR on version tags
- Helm Charts β Published to OCI registries on version tags
See GITHUB_ACTIONS_DOCKER.md for setup instructions.
See CONTRIBUTING.md for contribution guidelines.
Copyright 2023-2026 YANDEX LLC.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.