Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a2d9be8
migrate to argocd
zubenkoivan Dec 9, 2025
74ae391
Merge branch 'master' into iz/migrate-to-argocd
zubenkoivan Dec 9, 2025
f0747a7
test
zubenkoivan Dec 9, 2025
e2e0f9f
test
zubenkoivan Dec 9, 2025
9e327f8
test
zubenkoivan Dec 9, 2025
f02535b
fix
zubenkoivan Dec 9, 2025
9abf7b6
improve
zubenkoivan Dec 11, 2025
1dd2f77
update
zubenkoivan Dec 12, 2025
4d46bed
remove oci:// prefix
zubenkoivan Dec 13, 2025
b6617d6
remove oci:// prefix
zubenkoivan Dec 13, 2025
f7d6999
refactor
zubenkoivan Dec 17, 2025
57ddb5a
Merge branch 'master' into iz/migrate-to-argocd
zubenkoivan Dec 17, 2025
bf7e5e5
test
zubenkoivan Dec 17, 2025
611b84d
fix
zubenkoivan Dec 17, 2025
1759a09
fix test
zubenkoivan Dec 17, 2025
ce9fb45
update chart repos
zubenkoivan Dec 17, 2025
3d16cc7
update chart repos
zubenkoivan Dec 17, 2025
3fdaad9
test
zubenkoivan Dec 17, 2025
44e3c87
rename chart
zubenkoivan Dec 17, 2025
f028c8a
rename chart
zubenkoivan Dec 17, 2025
a55be32
remove fallbackhost
zubenkoivan Dec 17, 2025
9329d23
update app names
zubenkoivan Dec 17, 2025
8bb8741
update app names
zubenkoivan Dec 17, 2025
1df01ed
update destination
zubenkoivan Dec 17, 2025
bc5f111
update destination
zubenkoivan Dec 17, 2025
6ed1a18
update destination
zubenkoivan Dec 17, 2025
322c738
update destination
zubenkoivan Dec 17, 2025
ccf9b5d
update destination namespace
zubenkoivan Dec 17, 2025
628d902
fix lint
zubenkoivan Dec 17, 2025
1a56851
fix alloy
zubenkoivan Dec 17, 2025
1607b58
keda server side apply
zubenkoivan Dec 18, 2025
c4b06bf
fix name
zubenkoivan Dec 18, 2025
d6d021a
fix name
zubenkoivan Dec 18, 2025
6bc84ca
fix name
zubenkoivan Dec 18, 2025
bbcd46d
fix numer
zubenkoivan Dec 18, 2025
dcb7a68
fix image
zubenkoivan Dec 18, 2025
d985f76
upgrade loki
zubenkoivan Dec 18, 2025
9287dd7
update disks namespace
zubenkoivan Dec 18, 2025
7e61945
upgrade minio
zubenkoivan Dec 19, 2025
a48573c
upgrade minio
zubenkoivan Dec 19, 2025
f555b40
update prometheus proxy url in dashboards
zubenkoivan Dec 20, 2025
7c4dfd9
Merge branch 'master' into iz/migrate-to-argocd
zubenkoivan Dec 20, 2025
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
3 changes: 0 additions & 3 deletions .dockerignore

This file was deleted.

43 changes: 40 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,48 @@ jobs:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

discover-charts:
name: Discover Helm charts
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
outputs:
helm_charts: ${{ steps.discover.outputs.helm_charts }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Collect chart paths
id: discover
shell: bash
run: |
set -eo pipefail
charts=$(find charts -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | sort)
echo "$charts"
{
echo "helm_charts<<EOF"
echo "$charts"
echo "EOF"
} >> "$GITHUB_OUTPUT"

release:
name: Create release
needs: test
needs:
- test
- discover-charts
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: neuro-inc/reuse/.github/workflows/release-service.yaml@v25.12.1
with:
image: platform-operator-controller
helm_charts: platform platform-operator
helm_chart_repo_prefix: /platform-compute
helm_charts: ${{ needs.discover-charts.outputs.helm_charts }}

deploy:
name: Deploy
needs: release
uses: neuro-inc/reuse/.github/workflows/deploy-service.yaml@v25.12.1
secrets:
tf_api_token: ${{ secrets.TF_API_TOKEN }}
with:
environment: prod
dev_workspace: ${{ vars.DEV_TFC_WORKSPACE_JSON }}
prod_workspaces: ${{ vars.PROD_TFC_WORKSPACES_JSON }}
variables: |
platform_version=${{ needs.release.outputs.version }}
151 changes: 6 additions & 145 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:

jobs:

lint:
name: Lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout commit
Expand All @@ -13,162 +13,23 @@ jobs:
uses: actions/setup-python@v6
with:
python-version-file: .python-version
- name: Install pipx
run: python3 -m pip install --user pipx && python3 -m pipx ensurepath
- name: Install Poetry with pipx
run: |
pipx install poetry
- name: Setup Python dependencies cache
uses: actions/cache@v5
- name: Install Helm
uses: azure/setup-helm@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-
version: v3.19.4
- name: Install dependencies
run: make setup
- name: Lint
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
make lint

unit:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v6
- name: Install python
uses: actions/setup-python@v6
with:
python-version-file: .python-version
- name: Install pipx
run: python3 -m pip install --user pipx && python3 -m pipx ensurepath
- name: Install Poetry with pipx
run: |
pipx install poetry
- name: Setup Python dependencies cache
uses: actions/cache@v5
with:
path: ~/.cache/pypoetry
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-
- name: Install dependencies
run: make setup
- name: Run unit tests
run: make test_unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .coverage.unit.xml
flags: unit
name: codecov-unit

integration:
name: Integration tests
runs-on: ubuntu-latest
env:
MINIKUBE_DRIVER: none
steps:
- name: Checkout commit
uses: actions/checkout@v6
- name: Install python
uses: actions/setup-python@v6
with:
python-version-file: .python-version
- name: Install pipx
run: python3 -m pip install --user pipx && python3 -m pipx ensurepath
- name: Install Poetry with pipx
run: |
pipx install poetry
- name: Setup Python dependencies cache
uses: actions/cache@v5
with:
path: ~/.cache/pypoetry
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-
- name: Install dependencies
run: make setup
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Start minikube
run: |
curl -LO https://storage.googleapis.com/minikube/releases/v1.25.2/minikube-linux-amd64
sudo apt-get update
sudo apt-get install -y conntrack
sudo install minikube-linux-amd64 /usr/local/bin/minikube

sudo modprobe bridge
sudo modprobe br_netfilter
sudo sysctl -w net.bridge.bridge-nf-call-iptables=1

minikube start --driver="none" --wait=true

sudo chown -R $USER $HOME/.kube /root/.minikube
sudo chmod -R a+r $HOME/.kube /root/.minikube
sudo find /root/.minikube -name id_rsa -exec chmod 600 {} \;
- name: Run integration tests
run: make test_integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .coverage.integration.xml
flags: integration
name: codecov-integration

image-upload:
name: Upload image artifact
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v6
- name: Install python
uses: actions/setup-python@v6
with:
python-version-file: .python-version
- name: Install pipx
run: python3 -m pip install --user pipx && python3 -m pipx ensurepath
- name: Install Poetry with pipx
run: |
pipx install poetry
- name: Setup Python dependencies cache
uses: actions/cache@v5
with:
path: ~/.cache/pypoetry
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-
- name: Install dependencies
run: make setup
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build Docker image
run: make docker_build
- name: Upload image artifact
uses: neuro-inc/upload-image-action@v24.4.0
with:
image: platform-operator-controller
token: ${{ github.token }}

check:
name: Check
needs:
- lint
- unit
- integration
- image-upload
- test
runs-on: ubuntu-latest
if: always()
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ dmypy.json
.cr-release-packages

requirements.txt

# Debug data of helm unittest plugin
.debug/
21 changes: 0 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,8 @@ repos:
files: |
docs/spelling_wordlist.txt|
.gitignore
- repo: https://github.com/sondrelg/pep585-upgrade
rev: v1.0
hooks:
- id: upgrade-type-hints
args:
- --futures=true
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.33.0
hooks:
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/python-poetry/poetry
rev: '2.1.2'
hooks:
- id: poetry-install
ci:
skip:
# - actionlint-docker
- check-github-actions
- check-github-workflows
40 changes: 0 additions & 40 deletions Dockerfile

This file was deleted.

51 changes: 16 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,35 @@
.PHONY: all test clean
all test clean:

.PHONY: venv
venv:
poetry lock
poetry install --with dev;
python -m venv venv
. venv/bin/activate; \
pip install pre-commit

.PHONY: setup
setup: venv
poetry run pre-commit install;
. venv/bin/activate; \
python -m pre_commit install
helm plugin install https://github.com/helm-unittest/helm-unittest.git


.PHONY: lint
lint: format
poetry run mypy platform_operator tests
@for chart in charts/*; do \
helm lint $$chart || exit $$?; \
done

.PHONY: format
format:
ifdef CI_LINT_RUN
poetry run pre-commit run --all-files --show-diff-on-failure
. venv/bin/activate; \
python -m pre_commit run --all-files --show-diff-on-failure
else
poetry run pre-commit run --all-files
. venv/bin/activate; \
python -m pre_commit run --all-files
endif


.PHONY: test_unit
test_unit:
poetry run pytest -vv --cov-config=pyproject.toml --cov-report xml:.coverage.unit.xml tests/unit


.PHONY: test_integration
test_integration:
kubectl --context minikube apply -f charts/platform-operator/crds
poetry run pytest -vv --log-level=INFO --cov-config=pyproject.toml --cov-report xml:.coverage.integration.xml tests/integration

.PHONY: clean-dist
clean-dist:
rm -rf dist

IMAGE_NAME = platform-operator-controller

.PHONY: docker_build
docker_build: dist
docker build \
--build-arg PY_VERSION=$$(cat .python-version) \
-t $(IMAGE_NAME):latest .

.python-version:
@echo "Error: .python-version file is missing!" && exit 1

.PHONY: dist
dist: venv
rm -rf build dist; \
poetry export -f requirements.txt --without-hashes -o requirements.txt; \
poetry build -f wheel;
helm unittest charts/*
Loading