Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
continue-on-error: true
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
run: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | helm registry login ${{ env.DOCKERHUB_REGISTRY }} --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
echo "${{ secrets.DOCKER_PASSWORD }}" | helm registry login ${{ env.DOCKERHUB_REGISTRY }} --username ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Extract chart version
id: chart_version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:

- name: Log in to Docker Hub
run: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | helm registry login registry-1.docker.io --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
echo "${{ secrets.DOCKER_PASSWORD }}" | helm registry login registry-1.docker.io --username ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Extract chart version
id: chart_version
Expand Down
13 changes: 5 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,14 @@ test-docker-integration: ## Run integration tests in Docker container.
KUBEBUILDER_ASSETS=\$$(/go/bin/setup-envtest use $(ENVTEST_K8S_VERSION) -p path) go test -v ./internal/controller/... -coverprofile cover-integration.out)

.PHONY: lint
lint: golangci-lint ## Run golangci-lint linter.
$(GOLANGCI_LINT) run
lint: ## Run golangci-lint linter in Docker container.
$(call docker-go,go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \
GOFLAGS=-buildvcs=false /go/bin/golangci-lint run --timeout=5m)

.PHONY: lint-fix
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes.
$(GOLANGCI_LINT) run --fix

.PHONY: lint-docker
lint-docker: ## Run golangci-lint linter in Docker container.
lint-fix: ## Run golangci-lint linter and perform fixes in Docker container.
$(call docker-go,go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \
GOFLAGS=-buildvcs=false /go/bin/golangci-lint run --timeout=5m)
GOFLAGS=-buildvcs=false /go/bin/golangci-lint run --fix --timeout=5m)

##@ Build

Expand Down
18 changes: 18 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,22 @@ resources:
kind: YanetConfig
path: github.com/yanet-platform/yanet-operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: false
domain: yanet-platform.io
group: yanet
kind: Yanet
path: github.com/yanet-platform/yanet-operator/api/v2alpha1
version: v2alpha1
- api:
crdVersion: v1
namespaced: true
controller: false
domain: yanet-platform.io
group: yanet
kind: YanetConfig
path: github.com/yanet-platform/yanet-operator/api/v2alpha1
version: v2alpha1
version: "3"
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Kubernetes operator for managing YANET (Yet Another Network) deployments on worker nodes.

> **🚀 v2alpha1 API Available!** New API version with multi-node support via NodeSelector. See [YANET2_MIGRATION_PLAN](YANET2_MIGRATION_PLAN/) for details.

## Features

- 🔄 **Automated Deployment Management** — Creates and updates Deployments based on Yanet CRD specs
Expand Down Expand Up @@ -46,6 +48,20 @@ helm install yanet-operator \
kubectl apply -f https://github.com/yanet-platform/yanet-operator/releases/latest/download/install.yaml
```

## API Versions

### v1alpha1 (Current, Storage Version)
Single-node management with `nodename` field.

### v2alpha1 (New) ✨
Multi-node management with `nodeSelector`. Key features:
- **NodeSelector** - manage multiple nodes with one CR
- **Rich configuration** - resources, sidecars, volumes, lifecycle
- **Flexible images** - registry + prefix + name structure
- **Backward compatible** - v1alpha1 continues to work

See [YANET2_MIGRATION_PLAN](YANET2_MIGRATION_PLAN/) for migration guide.

## Usage

### Create a Yanet instance
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/yanet_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ type Sync struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:storageversion

// Yanet is the Schema for the yanets API
type Yanet struct {
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/yanetconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ type LifecycleHandler struct {

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:storageversion

// YanetConfig is the Schema for the yanetconfigs API
type YanetConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions api/v2alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
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.
*/

// Package v2alpha1 contains API Schema definitions for the yanet v2alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=yanet.yanet-platform.io
package v2alpha1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "yanet.yanet-platform.io", Version: "v2alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
Loading
Loading