From cc78dc14cc638beccc984f0f2985c6361a8e083d Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Mon, 29 Jun 2026 15:04:28 +0300 Subject: [PATCH 1/3] test(e2e): add nested-cluster e2e suite for sds-object Adds an end-to-end suite under e2e/, modeled on the sds-elastic and state-snapshotter suites: a storage-e2e nested cluster runs the documented ObjectStorageCluster / ObjectBucket lifecycle on a single shared cluster via Ginkgo Ordered specs. Coverage: - cluster create -> Ready (status phase/backend/endpoint) - bucket create -> Ready, standardised S3 credentials Secret (keys + ownership) - real S3 write/list/read round-trip through the generated credentials (mc Job) - admission guards: validating webhooks (single System cluster, unique bucket name) + CRD CEL rules (immutable type, Heavy<->elasticClusterRef, storage.class) - finalizer-driven deletion of bucket (+owned Secret) and cluster The profile is selectable via E2E_OSC_TYPE (default System: no StorageClass, no extra modules, cheapest reliable CI path); Lightweight/Full/Heavy gated on their required env knobs. storage-e2e is consumed as a pinned pseudo-version; sds-object/api via replace => ../api. Co-Authored-By: Claude Opus 4.8 (1M context) --- e2e/.gitignore | 7 + e2e/Makefile | 69 ++++ e2e/README.md | 148 +++++++++ e2e/go.mod | 83 +++++ e2e/go.sum | 418 +++++++++++++++++++++++ e2e/tests/cluster_config.yml | 64 ++++ e2e/tests/create_test.go | 132 ++++++++ e2e/tests/delete_test.go | 66 ++++ e2e/tests/diagnostics_test.go | 129 ++++++++ e2e/tests/e2e_shared_test.go | 516 +++++++++++++++++++++++++++++ e2e/tests/sds_object_suite_test.go | 162 +++++++++ e2e/tests/validation_test.go | 154 +++++++++ 12 files changed, 1948 insertions(+) create mode 100644 e2e/.gitignore create mode 100644 e2e/Makefile create mode 100644 e2e/README.md create mode 100644 e2e/go.mod create mode 100644 e2e/go.sum create mode 100644 e2e/tests/cluster_config.yml create mode 100644 e2e/tests/create_test.go create mode 100644 e2e/tests/delete_test.go create mode 100644 e2e/tests/diagnostics_test.go create mode 100644 e2e/tests/e2e_shared_test.go create mode 100644 e2e/tests/sds_object_suite_test.go create mode 100644 e2e/tests/validation_test.go diff --git a/e2e/.gitignore b/e2e/.gitignore new file mode 100644 index 0000000..177b10d --- /dev/null +++ b/e2e/.gitignore @@ -0,0 +1,7 @@ +# Local env files with secrets (DKP license, registry cfg, SSH passphrase). +# Keep them out of git. +config/ +test_exports* +.tmp-*.log +e2e-artifacts-*/ +.gomodcache/ diff --git a/e2e/Makefile b/e2e/Makefile new file mode 100644 index 0000000..7b859f7 --- /dev/null +++ b/e2e/Makefile @@ -0,0 +1,69 @@ +# Makefile for sds-object e2e tests. + +.PHONY: help +help: ## Show help + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-28s\033[0m %s\n", $$1, $$2}' + +.PHONY: deps +deps: ## Download dependencies + go mod download + go mod tidy + +.PHONY: test +test: ## Run the full nested-cluster E2E suite + go test -v -count=1 -timeout 120m ./tests/ -ginkgo.timeout 120m + +.PHONY: test-focus +test-focus: ## Run a focused Ginkgo spec (make test-focus FOCUS="reaches Ready") + @if [ -z "$(FOCUS)" ]; then \ + echo "Error: specify FOCUS="; \ + exit 1; \ + fi + go test -v -count=1 -timeout 120m ./tests/ -ginkgo.timeout 120m -ginkgo.focus "$(FOCUS)" + +.PHONY: vet +vet: ## go vet + go vet ./... + +.PHONY: build +build: ## Compile-check the suite (no cluster) + go build ./... + go test -c -o /dev/null ./tests/ + +.PHONY: lint +lint: ## golangci-lint (if installed) + golangci-lint run ./... + +.PHONY: check-env +check-env: ## Print relevant env vars for the nested flow + @echo "=== Nested cluster (storage-e2e) ===" + @echo "TEST_CLUSTER_CREATE_MODE: $${TEST_CLUSTER_CREATE_MODE} # alwaysCreateNew | alwaysUseExisting | commander" + @echo "TEST_CLUSTER_CLEANUP: $${TEST_CLUSTER_CLEANUP} # set true to delete VMs after the run" + @echo "TEST_CLUSTER_NAMESPACE: $${TEST_CLUSTER_NAMESPACE} # also the in-cluster namespace for OB/Secret/probe" + @echo "TEST_CLUSTER_STORAGE_CLASS: $${TEST_CLUSTER_STORAGE_CLASS} # base-cluster SC for the VM OS disks" + @echo "SSH_HOST: $${SSH_HOST}" + @echo "SSH_USER: $${SSH_USER}" + @echo "SSH_PRIVATE_KEY: $${SSH_PRIVATE_KEY}" + @echo "SSH_PUBLIC_KEY: $${SSH_PUBLIC_KEY} # required for alwaysCreateNew (VM authorized key)" + @echo "SSH_VM_USER: $${SSH_VM_USER} # required for alwaysCreateNew (SSH user inside the VMs)" + @echo "DKP_LICENSE_KEY: $${DKP_LICENSE_KEY:+}" + @echo "REGISTRY_DOCKER_CFG: $${REGISTRY_DOCKER_CFG:+}" + @echo "SDS_OBJECT_MODULE_PULL_OVERRIDE: $${SDS_OBJECT_MODULE_PULL_OVERRIDE} # overrides modulePullOverride (default main)" + @echo "YAML_CONFIG_FILENAME: $${YAML_CONFIG_FILENAME} # default cluster_config.yml" + @echo "" + @echo "=== sds-object suite knobs ===" + @echo "E2E_OSC_NAME: $${E2E_OSC_NAME}" + @echo "E2E_OSC_TYPE: $${E2E_OSC_TYPE} # System | Lightweight | Full | Heavy (default System)" + @echo "E2E_REDUNDANCY: $${E2E_REDUNDANCY} # Single | Replicated | HighRedundancy" + @echo "E2E_STORAGE_CLASS: $${E2E_STORAGE_CLASS} # required for Lightweight/Full" + @echo "E2E_OSC_SIZE: $${E2E_OSC_SIZE}" + @echo "E2E_ELASTIC_CLUSTER_REF: $${E2E_ELASTIC_CLUSTER_REF} # required for Heavy" + @echo "E2E_BUCKET_NAME: $${E2E_BUCKET_NAME}" + @echo "E2E_OSC_READY_TIMEOUT: $${E2E_OSC_READY_TIMEOUT}" + @echo "E2E_OB_READY_TIMEOUT: $${E2E_OB_READY_TIMEOUT}" + @echo "E2E_MODULE_READY_TIMEOUT: $${E2E_MODULE_READY_TIMEOUT}" + @echo "E2E_PROBE_IMAGE: $${E2E_PROBE_IMAGE} # image with mc for the S3 round-trip job" + @echo "E2E_PROBE_JOB_TIMEOUT: $${E2E_PROBE_JOB_TIMEOUT}" + @echo "E2E_KEEP_CLUSTER_ON_FAILURE: $${E2E_KEEP_CLUSTER_ON_FAILURE} # true|1|yes -> skip teardown if a spec failed" + +.DEFAULT_GOAL := help diff --git a/e2e/README.md b/e2e/README.md new file mode 100644 index 0000000..1bd4577 --- /dev/null +++ b/e2e/README.md @@ -0,0 +1,148 @@ +# E2E tests for sds-object + +End-to-end coverage for the documented `ObjectStorageCluster` / `ObjectBucket` +lifecycle: cluster creation, bucket provisioning with the standardised S3 +credentials `Secret`, a real S3 write/list/read round-trip through the generated +credentials, the admission guards (validating webhooks + CRD CEL rules), and +finalizer-driven deletion. + +1. `storage-e2e` brings up a nested cluster from `tests/cluster_config.yml` + (1 master + 2 workers) with the `sds-object` module enabled. +2. `BeforeSuite` waits for the module to become Ready and ensures the in-cluster + test namespace exists. +3. A single shared `ObjectStorageCluster` is created and the ordered specs run + on top of it: create → bucket + creds `Secret` + S3 round-trip → validation + guards → delete. +4. `AfterSuite` hands the cluster back to `storage-e2e` for teardown. + +The suite drives the CRDs through the dynamic client and reads the +`storage.deckhouse.io/v1alpha1` Go types from the in-repo `sds-object/api` +module (`replace github.com/deckhouse/sds-object/api => ../api`). All generic +nested-cluster plumbing (`pkg/cluster`, `pkg/kubernetes`) comes from +`storage-e2e`, consumed as a pinned pseudo-version. + +## Profiles + +The shared cluster's profile is selectable via `E2E_OSC_TYPE` (default +`System`). The default is intentionally the cheapest, most self-contained +profile so CI needs no extra storage modules: + +| `E2E_OSC_TYPE` | Backend | Extra requirements | +|----------------|---------|--------------------| +| `System` (default) | Garage (DaemonSet on control-plane, hostPath) | none | +| `Lightweight` | Garage (StatefulSet + PVC) | `E2E_STORAGE_CLASS` + a CSI/local-volume module enabled in `cluster_config.yml` | +| `Full` | SeaweedFS | `E2E_STORAGE_CLASS` + `managed-postgres` module | +| `Heavy` | Ceph RGW | `sds-elastic` module + a Ready `ElasticCluster` (`E2E_ELASTIC_CLUSTER_REF`) | + +When you point `E2E_OSC_TYPE` at a heavier profile, enable the corresponding +modules in `tests/cluster_config.yml` first (see the comments there). The suite +fails fast in `BeforeSuite` if a profile's required env knob is missing. + +## Why one shared cluster + Ordered specs + +The validation and delete specs build on the cluster and bucket created by the +first specs, so the suite uses a **single shared `ObjectStorageCluster`** inside +one `Describe(..., Ordered)`. Spec registration goes through builder functions +called in explicit order from the root container +(`createSpecs → validationSpecs → deleteSpecs`); the deletion specs run last. +`RandomizeAllSpecs` stays **off**. + +## Requirements + +- Go **1.26+** +- A base Deckhouse cluster with the `virtualization` module enabled. +- SSH access to the master node of the base cluster. +- A Deckhouse license and a docker config for the dev registry. +- A block-mode `StorageClass` on the base cluster for the VM OS disks. +- Outbound access to Docker Hub for the `minio/mc` probe image (override with + `E2E_PROBE_IMAGE` if you mirror it). + +## Environment variables + +### `storage-e2e` (nested cluster) + +- `TEST_CLUSTER_CREATE_MODE` (**required**): + one of `alwaysCreateNew`, `alwaysUseExisting`, `commander`. +- `TEST_CLUSTER_CLEANUP`: + set to `true` to delete the VMs after the run. +- `TEST_CLUSTER_NAMESPACE`: + the VM namespace on the base cluster **and** the in-cluster namespace the + suite uses for ObjectBuckets / credentials Secrets / probe Pods (single source + of truth — no separate `E2E_NAMESPACE`). +- `TEST_CLUSTER_STORAGE_CLASS`: + base-cluster `StorageClass` for the VM OS disks. +- `YAML_CONFIG_FILENAME`: + defaults to `cluster_config.yml`. +- `SSH_HOST`, `SSH_USER`, `SSH_PRIVATE_KEY` +- `SSH_PUBLIC_KEY`: + SSH public key injected as the VMs' authorized key. **Required in + `alwaysCreateNew` mode**. +- `SSH_VM_USER`: + SSH user inside the created VMs (must match the VM image, usually `cloud`). + **Required in `alwaysCreateNew` mode**. +- `SSH_JUMP_HOST`, `SSH_JUMP_USER`, `SSH_JUMP_KEY_PATH`: + jump-host (bastion) SSH settings used by `alwaysUseExisting`. +- `TEST_CLUSTER_FORCE_LOCK_RELEASE`: + set to `true` to steal a stale `e2e-cluster-lock` left by a crashed run. +- `DKP_LICENSE_KEY` +- `REGISTRY_DOCKER_CFG` +- `SDS_OBJECT_MODULE_PULL_OVERRIDE`: + overrides `modulePullOverride` for `sds-object` from + `tests/cluster_config.yml` (which keeps a literal `main` default). Set to + `prN` on GitHub, `mrN` on GitLab, or `main` for nightly. (This is + storage-e2e's generic per-module convention: `_MODULE_PULL_OVERRIDE`.) + +### `sds-object` suite knobs + +- `E2E_OSC_NAME`: name of the shared `ObjectStorageCluster`, defaults to `e2e-osc`. +- `E2E_OSC_TYPE`: profile, one of `System` (default) / `Lightweight` / `Full` / `Heavy`. +- `E2E_REDUNDANCY`: `Single` (default) / `Replicated` / `HighRedundancy`. +- `E2E_STORAGE_CLASS`: StorageClass for the PVCs; **required** for `Lightweight`/`Full`. +- `E2E_OSC_SIZE`: cluster storage size, defaults to `5Gi`. +- `E2E_ELASTIC_CLUSTER_REF`: `ElasticCluster` name; **required** for `Heavy`. +- `E2E_BUCKET_NAME`: name of the shared `ObjectBucket`, defaults to `e2e-bucket`. +- `E2E_OSC_READY_TIMEOUT`: Go duration bounding the cluster Ready wait, defaults to 15m. +- `E2E_OB_READY_TIMEOUT`: Go duration bounding the bucket Ready wait, defaults to 5m. +- `E2E_MODULE_READY_TIMEOUT`: Go duration bounding the module Ready wait, defaults to 15m. +- `E2E_PROBE_IMAGE`: container image carrying `mc` for the S3 round-trip Job, defaults to `minio/mc:latest`. +- `E2E_PROBE_JOB_TIMEOUT`: Go duration bounding the probe Job, defaults to 5m. +- `E2E_KEEP_CLUSTER_ON_FAILURE`: when truthy and at least one spec failed, the + nested cluster is **not** torn down in `AfterSuite`, so you can inspect it. + +## Quick start + +```bash +export TEST_CLUSTER_CREATE_MODE=alwaysCreateNew +export TEST_CLUSTER_CLEANUP=true +export TEST_CLUSTER_NAMESPACE=e2e-sds-object +export TEST_CLUSTER_STORAGE_CLASS=linstor-r2 + +export SSH_HOST= +export SSH_USER= +export SSH_PRIVATE_KEY=~/.ssh/id_rsa +export SSH_PUBLIC_KEY=~/.ssh/id_rsa.pub # required for alwaysCreateNew +export SSH_VM_USER=cloud # required for alwaysCreateNew + +export DKP_LICENSE_KEY= +export REGISTRY_DOCKER_CFG= + +# Override the sds-object image tag; optional, defaults to the literal "main". +export SDS_OBJECT_MODULE_PULL_OVERRIDE=main # or prN / mrN to test a specific PR/MR + +cd e2e +make deps +make test +``` + +For local debugging you can run a subset of specs: + +```bash +make test-focus FOCUS="round-trip" +``` + +## Compile check (no cluster) + +```bash +make build +make vet +``` diff --git a/e2e/go.mod b/e2e/go.mod new file mode 100644 index 0000000..c8293aa --- /dev/null +++ b/e2e/go.mod @@ -0,0 +1,83 @@ +module github.com/deckhouse/sds-object/e2e + +go 1.26.0 + +require ( + github.com/deckhouse/sds-object/api v0.0.0-00010101000000-000000000000 + github.com/deckhouse/storage-e2e v0.0.0-20260615225534-f681188c4aa9 + github.com/onsi/ginkgo/v2 v2.23.3 + github.com/onsi/gomega v1.37.0 + k8s.io/api v0.34.2 + k8s.io/apimachinery v0.34.2 + k8s.io/client-go v0.34.2 +) + +require ( + github.com/Masterminds/semver/v3 v3.3.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/deckhouse/deckhouse v1.74.0 // indirect + github.com/deckhouse/sds-node-configurator/api v0.0.0-20260114125558-7fd7152586ff // indirect + github.com/deckhouse/virtualization/api v1.8.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-openapi/jsonpointer v0.22.1 // indirect + github.com/go-openapi/jsonreference v0.21.2 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/swag/jsonname v0.25.1 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/gnostic-models v0.7.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kr/fs v0.1.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/moby/spdystream v0.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/openshift/custom-resource-status v1.1.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pkg/sftp v1.13.10 // indirect + github.com/spf13/pflag v1.0.7 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/net v0.47.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/term v0.38.0 // indirect + golang.org/x/text v0.32.0 // indirect + golang.org/x/time v0.12.0 // indirect + golang.org/x/tools v0.39.0 // indirect + google.golang.org/protobuf v1.36.6 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apiextensions-apiserver v0.34.2 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect + k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect + kubevirt.io/api v1.6.2 // indirect + kubevirt.io/containerized-data-importer-api v1.60.3-0.20241105012228-50fbed985de9 // indirect + kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect + sigs.k8s.io/controller-runtime v0.22.4 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect +) + +// storage-e2e carries the generic nested-cluster + pkg/kubernetes helpers this +// suite relies on; it is consumed as a pinned pseudo-version from origin (no +// local checkout needed). Re-pin to a tagged release once one is published. + +// sds-object/api is always consumed from this repo's source via replace. +replace github.com/deckhouse/sds-object/api => ../api diff --git a/e2e/go.sum b/e2e/go.sum new file mode 100644 index 0000000..8dc11f2 --- /dev/null +++ b/e2e/go.sum @@ -0,0 +1,418 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= +github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckhouse/deckhouse v1.74.0 h1:a/gEuLKutoV6ReWaBWMDJ+VLlOkkCwS4VMvR/sHQscw= +github.com/deckhouse/deckhouse v1.74.0/go.mod h1:qMuvDbP8AYghXkWmDjoFPc6r1w9uw/cWxl/hmvA0BzA= +github.com/deckhouse/sds-node-configurator/api v0.0.0-20260114125558-7fd7152586ff h1:G6H7rkm/AvL6xWwbNO14gyistC3p48weL0sLCvpJnyI= +github.com/deckhouse/sds-node-configurator/api v0.0.0-20260114125558-7fd7152586ff/go.mod h1:X5ftUa4MrSXMKiwQYa4lwFuGtrs+HoCNa8Zl6TPrGo8= +github.com/deckhouse/storage-e2e v0.0.0-20260615225534-f681188c4aa9 h1:wmVRE5bRWa9zaMZa8ONtbGZzC0O/khUtnAFMfvSqu74= +github.com/deckhouse/storage-e2e v0.0.0-20260615225534-f681188c4aa9/go.mod h1:doSBXYCD2liOefcARKnBQo+iGp9rUtSTZ81tX+f4vsw= +github.com/deckhouse/virtualization/api v1.8.0 h1:wR4Ivcg56OWJRGWrZjEL+0mQrHFEG0gKn0xrq1yzjy0= +github.com/deckhouse/virtualization/api v1.8.0/go.mod h1:jqKdfrs7bhU5kbn6JTJUix8N180UkugJIa3TnOTqdmA= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.15.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= +github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= +github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/jsonreference v0.21.2 h1:Wxjda4M/BBQllegefXrY/9aq1fxBA8sI5M/lFU6tSWU= +github.com/go-openapi/jsonreference v0.21.2/go.mod h1:pp3PEjIsJ9CZDGCNOyXIQxsNuroxm8FAJ/+quA0yKzQ= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/swag/jsonname v0.25.1 h1:Sgx+qbwa4ej6AomWC6pEfXrA6uP2RkaNjA9BR8a1RJU= +github.com/go-openapi/swag/jsonname v0.25.1/go.mod h1:71Tekow6UOLBD3wS7XhdT98g5J5GR13NOTQ9/6Q11Zo= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU= +github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.23.3 h1:edHxnszytJ4lD9D5Jjc4tiDkPBZ3siDeJJkUZJJVkp0= +github.com/onsi/ginkgo/v2 v2.23.3/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y= +github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0= +github.com/openshift/custom-resource-status v1.1.2 h1:C3DL44LEbvlbItfd8mT5jWrqPfHnSOQoQf/sypqA6A4= +github.com/openshift/custom-resource-status v1.1.2/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.10 h1:+5FbKNTe5Z9aspU88DPIKJ9z2KZoaGCu6Sr6kKR/5mU= +github.com/pkg/sftp v1.13.10/go.mod h1:bJ1a7uDhrX/4OII+agvy28lzRvQrmIQuaHrcI1HbeGA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= +github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo= +k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE= +k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +kubevirt.io/api v1.6.2 h1:aoqZ4KsbOyDjLnuDw7H9wEgE/YTd/q5BBmYeQjJNizc= +kubevirt.io/api v1.6.2/go.mod h1:p66fEy/g79x7VpgUwrkUgOoG2lYs5LQq37WM6JXMwj4= +kubevirt.io/containerized-data-importer-api v1.60.3-0.20241105012228-50fbed985de9 h1:KTb8wO1Lxj220DX7d2Rdo9xovvlyWWNo3AVm2ua+1nY= +kubevirt.io/containerized-data-importer-api v1.60.3-0.20241105012228-50fbed985de9/go.mod h1:SDJjLGhbPyayDqAqawcGmVNapBp0KodOQvhKPLVGCQU= +kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 h1:QMrd0nKP0BGbnxTqakhDZAUhGKxPiPiN5gSDqKUmGGc= +kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90/go.mod h1:018lASpFYBsYN6XwmA2TIrPCx6e0gviTd/ZNtSitKgc= +sigs.k8s.io/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A= +sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/e2e/tests/cluster_config.yml b/e2e/tests/cluster_config.yml new file mode 100644 index 0000000..661657a --- /dev/null +++ b/e2e/tests/cluster_config.yml @@ -0,0 +1,64 @@ +# sds-object e2e nested test cluster. +# +# 1 master + 2 workers. The default E2E_OSC_TYPE=System profile (Garage as a +# DaemonSet on control-plane nodes, hostPath) needs neither a StorageClass nor +# extra disks, so a small cluster is enough. The master alone can host the +# System data plane; the workers give the bucket / probe Pods somewhere to run +# and let the optional Lightweight/Full profiles schedule their StatefulSets. +# +# Profile-specific extras (NOT enabled here — turn them on yourself when you +# point E2E_OSC_TYPE at a heavier profile): +# - Lightweight / Full : need a real StorageClass; enable sds-node-configurator +# + a CSI/local-volume module and set E2E_STORAGE_CLASS. +# - Full : additionally needs the managed-postgres module (shared +# SeaweedFS filer metadata store). +# - Heavy : needs sds-elastic with a Ready ElasticCluster; set +# E2E_ELASTIC_CLUSTER_REF. +# +# Modules enabled here are the minimum the System-profile e2e flow needs on top +# of a freshly bootstrapped Deckhouse: +# - sds-object : the module under test. modulePullOverride defaults to the +# literal "main"; override it for CI by exporting +# SDS_OBJECT_MODULE_PULL_OVERRIDE=pr / mr (storage-e2e's +# generic _MODULE_PULL_OVERRIDE convention). +clusterDefinition: + masters: + - hostname: "master-1" + hostType: "vm" + osType: "Ubuntu 22.04 6.2.0-39-generic" + cpu: 4 + coreFraction: 50 + ram: 8 + diskSize: 50 + workers: + - hostname: "worker-1" + hostType: "vm" + osType: "Ubuntu 22.04 6.2.0-39-generic" + cpu: 4 + coreFraction: 50 + ram: 8 + diskSize: 50 + - hostname: "worker-2" + hostType: "vm" + osType: "Ubuntu 22.04 6.2.0-39-generic" + cpu: 4 + coreFraction: 50 + ram: 8 + diskSize: 50 + dkpParameters: + kubernetesVersion: "Automatic" + podSubnetCIDR: "10.112.0.0/16" + serviceSubnetCIDR: "10.225.0.0/16" + clusterDomain: "cluster.local" + registryRepo: "dev-registry.deckhouse.io/sys/deckhouse-oss" + devBranch: "main" + modules: + - name: "sds-object" + version: 1 + enabled: true + # Static default tag (must be literal — storage-e2e rejects ${VAR} here). + # CI overrides it WITHOUT editing this file by exporting + # SDS_OBJECT_MODULE_PULL_OVERRIDE, e.g. "pr" on GitHub, "mr" on + # GitLab (the override and the static tag are logged at config load). + modulePullOverride: "main" + dependencies: [] diff --git a/e2e/tests/create_test.go b/e2e/tests/create_test.go new file mode 100644 index 0000000..048a5b6 --- /dev/null +++ b/e2e/tests/create_test.go @@ -0,0 +1,132 @@ +/* +Copyright 2026 Flant JSC + +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 tests + +import ( + "context" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + objectv1alpha1 "github.com/deckhouse/sds-object/api/v1alpha1" +) + +// createSpecs brings up the shared ObjectStorageCluster, a bucket on it, asserts +// the standardised credentials Secret contract, and proves a real S3 round-trip +// through the generated credentials. These are the foundation specs; the +// validation and delete specs run on top of the cluster and bucket created here. +func createSpecs() { + Describe("create", func() { + It("creates the ObjectStorageCluster and reaches Ready", func() { + ctx, cancel := context.WithTimeout(context.Background(), suiteCfg.oscReadyTimeout+2*time.Minute) + defer cancel() + + By("creating ObjectStorageCluster " + suiteCfg.oscName) + Expect(createOSC(ctx, buildOSC(suiteCfg.oscName))).To(Succeed()) + + By("waiting for the cluster Ready condition") + Expect(waitOSCReady(ctx, suiteCfg.oscName)).To(Succeed()) + + By("asserting the resolved status (phase, backend, endpoint)") + phase, err := getStringField(ctx, objectStorageClusterGVR, "", suiteCfg.oscName, "status", "phase") + Expect(err).NotTo(HaveOccurred()) + Expect(phase).To(Equal(objectv1alpha1.PhaseReady)) + + backend, err := getStringField(ctx, objectStorageClusterGVR, "", suiteCfg.oscName, "status", "backend", "type") + Expect(err).NotTo(HaveOccurred()) + Expect(backend).To(Equal(expectedBackend()), "backend type for profile %s", suiteCfg.oscType) + + endpoint, err := getStringField(ctx, objectStorageClusterGVR, "", suiteCfg.oscName, "status", "endpoint", "internal") + Expect(err).NotTo(HaveOccurred()) + Expect(endpoint).NotTo(BeEmpty(), "status.endpoint.internal must be published") + }) + + It("creates an ObjectBucket and reaches Ready", func() { + ctx, cancel := context.WithTimeout(context.Background(), suiteCfg.obReadyTimeout+2*time.Minute) + defer cancel() + + By("creating ObjectBucket " + suiteCfg.bucketName) + ob := buildOB(suiteCfg.bucketName, suiteCfg.namespace, suiteCfg.oscName, objectv1alpha1.BucketReclaimDelete) + Expect(createOB(ctx, ob)).To(Succeed()) + + By("waiting for the bucket Ready condition") + Expect(waitOBReady(ctx, suiteCfg.namespace, suiteCfg.bucketName)).To(Succeed()) + + By("asserting status.bucketName and status.secretRef are populated") + bucketName, err := getStringField(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, "status", "bucketName") + Expect(err).NotTo(HaveOccurred()) + Expect(bucketName).To(Equal(suiteCfg.bucketName), "effective bucket name defaults to metadata.name") + + secretName, err := getStringField(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, "status", "secretRef", "name") + Expect(err).NotTo(HaveOccurred()) + Expect(secretName).NotTo(BeEmpty(), "status.secretRef.name must be published") + }) + + It("writes a complete, owned credentials Secret", func() { + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) + defer cancel() + + secretName, err := getStringField(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, "status", "secretRef", "name") + Expect(err).NotTo(HaveOccurred()) + Expect(secretName).NotTo(BeEmpty()) + + secret, err := suiteClientset.CoreV1().Secrets(suiteCfg.namespace).Get(ctx, secretName, metav1.GetOptions{}) + Expect(err).NotTo(HaveOccurred(), "get credentials Secret %s", secretName) + + By("asserting all standardised S3 keys are present and non-empty") + for _, key := range credsSecretKeys { + Expect(secret.Data).To(HaveKey(key), "credentials Secret must carry %s", key) + Expect(secret.Data[key]).NotTo(BeEmpty(), "credentials Secret %s must be non-empty", key) + } + + By("asserting the Secret is owned by the ObjectBucket (cleaned up on delete)") + Expect(secret.OwnerReferences).NotTo(BeEmpty(), "credentials Secret must be owned by the ObjectBucket") + Expect(secret.OwnerReferences[0].Kind).To(Equal(objectv1alpha1.ObjectBucketKind)) + Expect(secret.OwnerReferences[0].Name).To(Equal(suiteCfg.bucketName)) + }) + + It("performs an S3 write/list/read round-trip via the credentials", func() { + ctx, cancel := context.WithTimeout(context.Background(), suiteCfg.probeJobTimeout+2*time.Minute) + defer cancel() + + secretName, err := getStringField(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, "status", "secretRef", "name") + Expect(err).NotTo(HaveOccurred()) + Expect(secretName).NotTo(BeEmpty()) + + By("running the mc probe Job against the bucket endpoint") + Expect(runS3ProbeJob(ctx, "s3-probe", suiteCfg.namespace, secretName)).To(Succeed()) + }) + }) +} + +// expectedBackend maps the configured profile to the BackendType the cluster +// status should report. +func expectedBackend() string { + switch suiteCfg.oscType { + case string(objectv1alpha1.ClusterTypeSystem), string(objectv1alpha1.ClusterTypeLightweight): + return string(objectv1alpha1.BackendGarage) + case string(objectv1alpha1.ClusterTypeFull): + return string(objectv1alpha1.BackendSeaweedFS) + case string(objectv1alpha1.ClusterTypeHeavy): + return string(objectv1alpha1.BackendCephRGW) + default: + return "" + } +} diff --git a/e2e/tests/delete_test.go b/e2e/tests/delete_test.go new file mode 100644 index 0000000..7542cd6 --- /dev/null +++ b/e2e/tests/delete_test.go @@ -0,0 +1,66 @@ +/* +Copyright 2026 Flant JSC + +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 tests + +import ( + "context" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// deleteSpecs tears down the shared bucket and cluster and asserts the +// finalizer-driven cleanup: the bucket's credentials Secret is removed with it, +// and the cluster object disappears once its finalizer releases. These specs run +// LAST in the Ordered container. +func deleteSpecs() { + Describe("delete", func() { + It("deletes the ObjectBucket and its credentials Secret", func() { + ctx, cancel := context.WithTimeout(context.Background(), resourceGoneTimeout+2*time.Minute) + defer cancel() + + secretName, err := getStringField(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, "status", "secretRef", "name") + Expect(err).NotTo(HaveOccurred()) + Expect(secretName).NotTo(BeEmpty()) + + By("deleting ObjectBucket " + suiteCfg.bucketName) + Expect(suiteDyn.Resource(objectBucketGVR).Namespace(suiteCfg.namespace). + Delete(ctx, suiteCfg.bucketName, metav1.DeleteOptions{})).To(Succeed()) + + By("waiting for the bucket object to be gone (finalizer released)") + Expect(waitResourceGone(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, resourceGoneTimeout)).To(Succeed()) + + By("waiting for the owned credentials Secret to be garbage-collected") + Expect(waitSecretGone(ctx, suiteCfg.namespace, secretName, 2*time.Minute)).To(Succeed()) + }) + + It("deletes the ObjectStorageCluster", func() { + ctx, cancel := context.WithTimeout(context.Background(), resourceGoneTimeout+2*time.Minute) + defer cancel() + + By("deleting ObjectStorageCluster " + suiteCfg.oscName) + Expect(suiteDyn.Resource(objectStorageClusterGVR). + Delete(ctx, suiteCfg.oscName, metav1.DeleteOptions{})).To(Succeed()) + + By("waiting for the cluster object to be gone (finalizer released)") + Expect(waitResourceGone(ctx, objectStorageClusterGVR, "", suiteCfg.oscName, resourceGoneTimeout)).To(Succeed()) + }) + }) +} diff --git a/e2e/tests/diagnostics_test.go b/e2e/tests/diagnostics_test.go new file mode 100644 index 0000000..48de6d1 --- /dev/null +++ b/e2e/tests/diagnostics_test.go @@ -0,0 +1,129 @@ +/* +Copyright 2026 Flant JSC + +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 tests + +import ( + "context" + "fmt" + + . "github.com/onsi/ginkgo/v2" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// dumpFailedSpecDiagnostics prints, on any spec failure, the state most useful +// for triage: the shared OSC and OB (status + conditions), the module's pods, +// and recent events in the module + test namespaces. All lookups are +// best-effort — diagnostics must never panic or mask the original failure. +func dumpFailedSpecDiagnostics(ctx context.Context) { + GinkgoWriter.Printf("\n========== sds-object e2e diagnostics ==========\n") + + dumpDynamic(ctx, objectStorageClusterGVR, "", suiteCfg.oscName, "ObjectStorageCluster") + dumpDynamic(ctx, objectBucketGVR, suiteCfg.namespace, suiteCfg.bucketName, "ObjectBucket") + + dumpPods(ctx, moduleNS) + dumpEvents(ctx, moduleNS) + dumpEvents(ctx, suiteCfg.namespace) + + GinkgoWriter.Printf("================================================\n\n") +} + +func dumpDynamic(ctx context.Context, gvr schema.GroupVersionResource, ns, name, kind string) { + var ( + obj *unstructured.Unstructured + err error + ) + if ns == "" { + obj, err = suiteDyn.Resource(gvr).Get(ctx, name, metav1.GetOptions{}) + } else { + obj, err = suiteDyn.Resource(gvr).Namespace(ns).Get(ctx, name, metav1.GetOptions{}) + } + if err != nil { + GinkgoWriter.Printf(" %s %s: %v\n", kind, formatRef(ns, name), err) + return + } + + phase, _, _ := unstructured.NestedString(obj.Object, "status", "phase") + GinkgoWriter.Printf(" %s %s: phase=%q\n", kind, formatRef(ns, name), phase) + + conds, _, _ := unstructured.NestedSlice(obj.Object, "status", "conditions") + for _, c := range conds { + cm, ok := c.(map[string]interface{}) + if !ok { + continue + } + t, _, _ := unstructured.NestedString(cm, "type") + st, _, _ := unstructured.NestedString(cm, "status") + reason, _, _ := unstructured.NestedString(cm, "reason") + msg, _, _ := unstructured.NestedString(cm, "message") + GinkgoWriter.Printf(" - %s=%s reason=%q msg=%q\n", t, st, reason, msg) + } +} + +func dumpPods(ctx context.Context, ns string) { + pods, err := suiteClientset.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{}) + if err != nil { + GinkgoWriter.Printf(" pods in %s: %v\n", ns, err) + return + } + GinkgoWriter.Printf(" pods in %s (%d):\n", ns, len(pods.Items)) + for i := range pods.Items { + p := &pods.Items[i] + GinkgoWriter.Printf(" - %s phase=%s ready=%v restarts=%d\n", + p.Name, p.Status.Phase, podReady(p), podRestarts(p)) + } +} + +func dumpEvents(ctx context.Context, ns string) { + events, err := suiteClientset.CoreV1().Events(ns).List(ctx, metav1.ListOptions{Limit: 25}) + if err != nil { + GinkgoWriter.Printf(" events in %s: %v\n", ns, err) + return + } + GinkgoWriter.Printf(" recent events in %s:\n", ns) + for i := range events.Items { + e := &events.Items[i] + GinkgoWriter.Printf(" - [%s] %s: %s\n", e.Type, e.Reason, trim(e.Message, 160)) + } +} + +func podReady(p *corev1.Pod) bool { + for _, c := range p.Status.Conditions { + if c.Type == corev1.PodReady { + return c.Status == corev1.ConditionTrue + } + } + return false +} + +func podRestarts(p *corev1.Pod) int32 { + var n int32 + for _, cs := range p.Status.ContainerStatuses { + n += cs.RestartCount + } + return n +} + +func trim(s string, max int) string { + if len(s) <= max { + return s + } + return fmt.Sprintf("%s…", s[:max]) +} diff --git a/e2e/tests/e2e_shared_test.go b/e2e/tests/e2e_shared_test.go new file mode 100644 index 0000000..dc65e60 --- /dev/null +++ b/e2e/tests/e2e_shared_test.go @@ -0,0 +1,516 @@ +/* +Copyright 2026 Flant JSC + +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 tests + +import ( + "context" + "fmt" + "os" + "strings" + "time" + + . "github.com/onsi/ginkgo/v2" + + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" + clientgokube "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + + objectv1alpha1 "github.com/deckhouse/sds-object/api/v1alpha1" + "github.com/deckhouse/storage-e2e/pkg/cluster" + storagekube "github.com/deckhouse/storage-e2e/pkg/kubernetes" +) + +// --- Suite env knobs (storage-e2e cluster knobs are read by storage-e2e itself) --- +const ( + envOSCName = "E2E_OSC_NAME" + envOSCType = "E2E_OSC_TYPE" + envRedundancy = "E2E_REDUNDANCY" + envStorageClass = "E2E_STORAGE_CLASS" + envOSCSize = "E2E_OSC_SIZE" + envElasticRef = "E2E_ELASTIC_CLUSTER_REF" + envBucketName = "E2E_BUCKET_NAME" + envOSCReadyTimeout = "E2E_OSC_READY_TIMEOUT" + envOBReadyTimeout = "E2E_OB_READY_TIMEOUT" + envModuleReadyTO = "E2E_MODULE_READY_TIMEOUT" + envProbeImage = "E2E_PROBE_IMAGE" + envProbeJobTimeout = "E2E_PROBE_JOB_TIMEOUT" + + // envKeepClusterOnFailure, when truthy, skips nested-cluster teardown if any + // spec failed, leaving the cluster live for manual debugging. + envKeepClusterOnFailure = "E2E_KEEP_CLUSTER_ON_FAILURE" +) + +const ( + defaultOSCName = "e2e-osc" + defaultOSCType = string(objectv1alpha1.ClusterTypeSystem) + defaultRedundancy = string(objectv1alpha1.RedundancySingle) + defaultOSCSize = "5Gi" + defaultBucketName = "e2e-bucket" + defaultProbeImage = "minio/mc:latest" + defaultNamespace = "e2e-sds-object" + defaultModuleReady = 15 * time.Minute + defaultOSCReady = 15 * time.Minute + defaultOBReady = 5 * time.Minute + defaultProbeJobTO = 5 * time.Minute + + // moduleName is the Deckhouse module / chart name under test; also the + // suffix of its namespace (d8-sds-object). + moduleName = "sds-object" + moduleNS = "d8-sds-object" + apiGroup = objectv1alpha1.APIGroup // storage.deckhouse.io + apiVersion = objectv1alpha1.APIVersion // v1alpha1 + probeAlias = "t" +) + +const ( + pollInterval = 5 * time.Second + resourceGoneTimeout = 10 * time.Minute +) + +var ( + objectStorageClusterGVR = schema.GroupVersionResource{ + Group: apiGroup, Version: apiVersion, Resource: "objectstorageclusters", + } + objectBucketGVR = schema.GroupVersionResource{ + Group: apiGroup, Version: apiVersion, Resource: "objectbuckets", + } + + // credsSecretKeys are the standardised keys the bucket reconciler writes into + // the credentials Secret (status.secretRef). The suite asserts all are present + // and non-empty, and the probe Job envFroms the Secret directly. + credsSecretKeys = []string{ + objectv1alpha1.SecretKeyS3Endpoint, + objectv1alpha1.SecretKeyS3Region, + objectv1alpha1.SecretKeyS3Bucket, + objectv1alpha1.SecretKeyAccessKeyID, + objectv1alpha1.SecretKeySecretAccessID, + } +) + +type e2eConfig struct { + // namespace is the in-cluster namespace for ObjectBuckets/Secrets/probe Pods. + // Single source of truth: TEST_CLUSTER_NAMESPACE (also the base VM namespace). + namespace string + + oscName string + oscType string + redundancy string + storageCl string + oscSize string + elasticRef string + bucketName string + + oscReadyTimeout time.Duration + obReadyTimeout time.Duration + moduleReadyTO time.Duration + probeJobTimeout time.Duration + + probeImage string + + // keepClusterOnFailure, when true, makes cleanupSuite skip nested-cluster + // teardown if any spec failed (E2E_KEEP_CLUSTER_ON_FAILURE). + keepClusterOnFailure bool +} + +var ( + suiteCfg e2eConfig + suiteRestCfg *rest.Config + suiteClientset *clientgokube.Clientset + suiteDyn dynamic.Interface + suiteClusterResources *cluster.TestClusterResources +) + +func loadConfig() e2eConfig { + cfg := e2eConfig{ + namespace: strings.TrimSpace(os.Getenv("TEST_CLUSTER_NAMESPACE")), + oscName: strings.TrimSpace(os.Getenv(envOSCName)), + oscType: strings.TrimSpace(os.Getenv(envOSCType)), + redundancy: strings.TrimSpace(os.Getenv(envRedundancy)), + storageCl: strings.TrimSpace(os.Getenv(envStorageClass)), + oscSize: strings.TrimSpace(os.Getenv(envOSCSize)), + elasticRef: strings.TrimSpace(os.Getenv(envElasticRef)), + bucketName: strings.TrimSpace(os.Getenv(envBucketName)), + probeImage: strings.TrimSpace(os.Getenv(envProbeImage)), + } + + if cfg.namespace == "" { + cfg.namespace = defaultNamespace + } + if cfg.oscName == "" { + cfg.oscName = defaultOSCName + } + if cfg.oscType == "" { + cfg.oscType = defaultOSCType + } + if cfg.redundancy == "" { + cfg.redundancy = defaultRedundancy + } + if cfg.oscSize == "" { + cfg.oscSize = defaultOSCSize + } + if cfg.bucketName == "" { + cfg.bucketName = defaultBucketName + } + if cfg.probeImage == "" { + cfg.probeImage = defaultProbeImage + } + + cfg.oscReadyTimeout = parseDuration(os.Getenv(envOSCReadyTimeout), defaultOSCReady) + cfg.obReadyTimeout = parseDuration(os.Getenv(envOBReadyTimeout), defaultOBReady) + cfg.moduleReadyTO = parseDuration(os.Getenv(envModuleReadyTO), defaultModuleReady) + cfg.probeJobTimeout = parseDuration(os.Getenv(envProbeJobTimeout), defaultProbeJobTO) + + cfg.keepClusterOnFailure = envBool(os.Getenv(envKeepClusterOnFailure)) + + return cfg +} + +// needsStorageClass reports whether the configured profile requires a real +// StorageClass (Lightweight/Full provision PVCs on spec.storage.class). +func (c e2eConfig) needsStorageClass() bool { + return c.oscType == string(objectv1alpha1.ClusterTypeLightweight) || + c.oscType == string(objectv1alpha1.ClusterTypeFull) +} + +func (c e2eConfig) isHeavy() bool { + return c.oscType == string(objectv1alpha1.ClusterTypeHeavy) +} + +func (c e2eConfig) isSystem() bool { + return c.oscType == string(objectv1alpha1.ClusterTypeSystem) +} + +// envBool parses a permissive boolean env value ("true"/"1"/"yes", any case). +func envBool(raw string) bool { + switch strings.ToLower(strings.TrimSpace(raw)) { + case "true", "1", "yes", "y", "on": + return true + default: + return false + } +} + +func parseDuration(raw string, def time.Duration) time.Duration { + raw = strings.TrimSpace(raw) + if raw == "" { + return def + } + if d, err := time.ParseDuration(raw); err == nil && d > 0 { + return d + } + return def +} + +func ensureNestedTestCluster() { + if strings.TrimSpace(os.Getenv("TEST_CLUSTER_CREATE_MODE")) == "" { + Fail("TEST_CLUSTER_CREATE_MODE must be set: this suite only supports storage-e2e nested clusters") + } + if suiteClusterResources != nil { + return + } + suiteClusterResources = cluster.CreateOrConnectToTestCluster() + if suiteClusterResources == nil || suiteClusterResources.Kubeconfig == nil { + Fail("storage-e2e returned a nil cluster handle") + } +} + +func cleanupNestedTestCluster() { + if suiteClusterResources == nil { + return + } + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute) + defer cancel() + if err := cluster.CleanupTestCluster(ctx, suiteClusterResources); err != nil { + GinkgoWriter.Printf(" warning: nested cluster cleanup failed: %v\n", err) + } else { + GinkgoWriter.Printf(" nested cluster cleanup finished\n") + } + suiteClusterResources = nil +} + +func ensureNamespace(ctx context.Context, name string) error { + _, err := storagekube.CreateNamespaceIfNotExists(ctx, suiteRestCfg, name) + return err +} + +// waitModuleReady blocks until the sds-object Deckhouse module reports Ready. +func waitModuleReady(ctx context.Context) error { + return storagekube.WaitForModuleReady(ctx, suiteRestCfg, moduleName, suiteCfg.moduleReadyTO) +} + +// --- ObjectStorageCluster / ObjectBucket builders -------------------------- + +// buildOSC renders an ObjectStorageCluster from the suite config. storage and +// elasticClusterRef are only set for the profiles that accept them so the CRD's +// CEL "only allowed when ..." rules are satisfied. +func buildOSC(name string) *unstructured.Unstructured { + spec := map[string]interface{}{ + "type": suiteCfg.oscType, + "redundancy": suiteCfg.redundancy, + } + if suiteCfg.needsStorageClass() { + spec["storage"] = map[string]interface{}{ + "size": suiteCfg.oscSize, + "class": suiteCfg.storageCl, + } + } + if suiteCfg.isHeavy() { + spec["elasticClusterRef"] = suiteCfg.elasticRef + } + u := &unstructured.Unstructured{} + u.SetGroupVersionKind(schema.GroupVersionKind{Group: apiGroup, Version: apiVersion, Kind: objectv1alpha1.ObjectStorageClusterKind}) + u.SetName(name) + u.Object["spec"] = spec + return u +} + +func buildOB(name, ns, clusterRef string, reclaim objectv1alpha1.BucketReclaimPolicy) *unstructured.Unstructured { + u := &unstructured.Unstructured{} + u.SetGroupVersionKind(schema.GroupVersionKind{Group: apiGroup, Version: apiVersion, Kind: objectv1alpha1.ObjectBucketKind}) + u.SetName(name) + u.SetNamespace(ns) + u.Object["spec"] = map[string]interface{}{ + "clusterRef": clusterRef, + "reclaimPolicy": string(reclaim), + } + return u +} + +func createOSC(ctx context.Context, u *unstructured.Unstructured) error { + _, err := suiteDyn.Resource(objectStorageClusterGVR).Create(ctx, u, metav1.CreateOptions{}) + return err +} + +func createOB(ctx context.Context, u *unstructured.Unstructured) error { + _, err := suiteDyn.Resource(objectBucketGVR).Namespace(u.GetNamespace()).Create(ctx, u, metav1.CreateOptions{}) + return err +} + +// --- status / condition readers -------------------------------------------- + +// getCondition returns (status, reason, found) for a condition type on the +// status.conditions[] of a dynamic object. ns="" addresses cluster-scoped. +func getCondition(ctx context.Context, gvr schema.GroupVersionResource, ns, name, condType string) (status, reason string, found bool, err error) { + var obj *unstructured.Unstructured + if ns == "" { + obj, err = suiteDyn.Resource(gvr).Get(ctx, name, metav1.GetOptions{}) + } else { + obj, err = suiteDyn.Resource(gvr).Namespace(ns).Get(ctx, name, metav1.GetOptions{}) + } + if err != nil { + return "", "", false, err + } + conds, _, _ := unstructured.NestedSlice(obj.Object, "status", "conditions") + for _, c := range conds { + cm, ok := c.(map[string]interface{}) + if !ok { + continue + } + if t, _, _ := unstructured.NestedString(cm, "type"); t == condType { + st, _, _ := unstructured.NestedString(cm, "status") + rs, _, _ := unstructured.NestedString(cm, "reason") + return st, rs, true, nil + } + } + return "", "", false, nil +} + +func waitCondition(ctx context.Context, gvr schema.GroupVersionResource, ns, name, condType, wantStatus string, timeout time.Duration) error { + deadline := time.Now().Add(timeout) + var last string + for { + status, reason, found, err := getCondition(ctx, gvr, ns, name, condType) + if err == nil && found && status == wantStatus { + return nil + } + last = fmt.Sprintf("found=%v status=%q reason=%q err=%v", found, status, reason, err) + if time.Now().After(deadline) { + return fmt.Errorf("timeout waiting for %s %s condition %s=%s; last: %s", gvr.Resource, formatRef(ns, name), condType, wantStatus, last) + } + if !sleepCtx(ctx, pollInterval) { + return ctx.Err() + } + } +} + +func waitOSCReady(ctx context.Context, name string) error { + return waitCondition(ctx, objectStorageClusterGVR, "", name, objectv1alpha1.OSCConditionReady, "True", suiteCfg.oscReadyTimeout) +} + +func waitOBReady(ctx context.Context, ns, name string) error { + return waitCondition(ctx, objectBucketGVR, ns, name, objectv1alpha1.OBConditionReady, "True", suiteCfg.obReadyTimeout) +} + +// getStringField fetches a nested string field from a dynamic object. +func getStringField(ctx context.Context, gvr schema.GroupVersionResource, ns, name string, fields ...string) (string, error) { + var obj *unstructured.Unstructured + var err error + if ns == "" { + obj, err = suiteDyn.Resource(gvr).Get(ctx, name, metav1.GetOptions{}) + } else { + obj, err = suiteDyn.Resource(gvr).Namespace(ns).Get(ctx, name, metav1.GetOptions{}) + } + if err != nil { + return "", err + } + val, _, _ := unstructured.NestedString(obj.Object, fields...) + return val, nil +} + +// waitResourceGone blocks until a dynamic GET of the resource returns NotFound. +// ns="" addresses cluster-scoped resources. +func waitResourceGone(ctx context.Context, gvr schema.GroupVersionResource, ns, name string, timeout time.Duration) error { + deadline := time.Now().Add(timeout) + for { + var err error + if ns == "" { + _, err = suiteDyn.Resource(gvr).Get(ctx, name, metav1.GetOptions{}) + } else { + _, err = suiteDyn.Resource(gvr).Namespace(ns).Get(ctx, name, metav1.GetOptions{}) + } + if apierrors.IsNotFound(err) || meta.IsNoMatchError(err) { + return nil + } + if time.Now().After(deadline) { + if err != nil { + return fmt.Errorf("timeout waiting for %s %s to be gone; last get err: %w", gvr.Resource, formatRef(ns, name), err) + } + return fmt.Errorf("timeout waiting for %s %s to be gone (still present)", gvr.Resource, formatRef(ns, name)) + } + if !sleepCtx(ctx, pollInterval) { + return ctx.Err() + } + } +} + +func waitSecretGone(ctx context.Context, ns, name string, timeout time.Duration) error { + deadline := time.Now().Add(timeout) + for { + _, err := suiteClientset.CoreV1().Secrets(ns).Get(ctx, name, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return nil + } + if time.Now().After(deadline) { + return fmt.Errorf("timeout waiting for Secret %s to be gone; last get err: %v", formatRef(ns, name), err) + } + if !sleepCtx(ctx, pollInterval) { + return ctx.Err() + } + } +} + +// --- S3 round-trip probe Job ----------------------------------------------- + +// runS3ProbeJob creates a one-shot Job that writes, lists and reads back an +// object via `mc`, consuming the bucket credentials Secret with envFrom, and +// waits for it to succeed. The Job body mirrors testing/*.yaml. +func runS3ProbeJob(ctx context.Context, jobName, ns, secretName string) error { + script := strings.Join([]string{ + "set -e", + fmt.Sprintf("mc alias set %s \"$%s\" \"$%s\" \"$%s\"", probeAlias, objectv1alpha1.SecretKeyS3Endpoint, objectv1alpha1.SecretKeyAccessKeyID, objectv1alpha1.SecretKeySecretAccessID), + fmt.Sprintf("echo \"hello from sds-object e2e\" | mc pipe \"%s/$%s/hello.txt\"", probeAlias, objectv1alpha1.SecretKeyS3Bucket), + fmt.Sprintf("echo '--- listing ---'; mc ls \"%s/$%s\"", probeAlias, objectv1alpha1.SecretKeyS3Bucket), + fmt.Sprintf("got=$(mc cat \"%s/$%s/hello.txt\")", probeAlias, objectv1alpha1.SecretKeyS3Bucket), + "echo \"--- content: $got ---\"", + "test \"$got\" = \"hello from sds-object e2e\"", + "echo S3 OK", + }, "\n") + + backoff := int32(10) + var ttl int32 = 600 + job := &batchv1.Job{ + ObjectMeta: metav1.ObjectMeta{Name: jobName, Namespace: ns}, + Spec: batchv1.JobSpec{ + BackoffLimit: &backoff, + TTLSecondsAfterFinished: &ttl, + Template: corev1.PodTemplateSpec{ + Spec: corev1.PodSpec{ + RestartPolicy: corev1.RestartPolicyNever, + Containers: []corev1.Container{{ + Name: "mc", + Image: suiteCfg.probeImage, + Command: []string{"/bin/sh", "-c"}, + Args: []string{script}, + EnvFrom: []corev1.EnvFromSource{{ + SecretRef: &corev1.SecretEnvSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: secretName}, + }, + }}, + }}, + }, + }, + }, + } + + // Replace any leftover Job from a previous run. + _ = suiteClientset.BatchV1().Jobs(ns).Delete(ctx, jobName, metav1.DeleteOptions{PropagationPolicy: ptr(metav1.DeletePropagationForeground)}) + if _, err := suiteClientset.BatchV1().Jobs(ns).Create(ctx, job, metav1.CreateOptions{}); err != nil { + return fmt.Errorf("create probe job %s: %w", formatRef(ns, jobName), err) + } + + deadline := time.Now().Add(suiteCfg.probeJobTimeout) + for { + j, err := suiteClientset.BatchV1().Jobs(ns).Get(ctx, jobName, metav1.GetOptions{}) + if err == nil { + if j.Status.Succeeded > 0 { + return nil + } + if j.Status.Failed >= backoff { + return fmt.Errorf("probe job %s failed (%d attempts); inspect `kubectl -n %s logs job/%s`", formatRef(ns, jobName), j.Status.Failed, ns, jobName) + } + } + if time.Now().After(deadline) { + s, f := jobStatus(j) + return fmt.Errorf("timeout waiting for probe job %s to succeed (succeeded=%d failed=%d)", formatRef(ns, jobName), s, f) + } + if !sleepCtx(ctx, pollInterval) { + return ctx.Err() + } + } +} + +func jobStatus(j *batchv1.Job) (int32, int32) { + if j == nil { + return 0, 0 + } + return j.Status.Succeeded, j.Status.Failed +} + +func formatRef(ns, name string) string { + if ns == "" { + return name + } + return ns + "/" + name +} + +func ptr[T any](v T) *T { return &v } + +func sleepCtx(ctx context.Context, d time.Duration) bool { + select { + case <-ctx.Done(): + return false + case <-time.After(d): + return true + } +} diff --git a/e2e/tests/sds_object_suite_test.go b/e2e/tests/sds_object_suite_test.go new file mode 100644 index 0000000..741e877 --- /dev/null +++ b/e2e/tests/sds_object_suite_test.go @@ -0,0 +1,162 @@ +/* +Copyright 2026 Flant JSC + +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 tests + +import ( + "context" + "os" + "testing" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + "k8s.io/client-go/dynamic" + clientgokube "k8s.io/client-go/kubernetes" +) + +// anySpecFailed records whether any spec failed during the run. cleanupSuite +// consults it together with E2E_KEEP_CLUSTER_ON_FAILURE to decide whether to +// skip nested-cluster teardown. +var anySpecFailed bool + +var _ = BeforeSuite(func() { + prepareSuite() +}) + +var _ = AfterSuite(func() { + cleanupSuite() +}) + +func TestSdsObject(t *testing.T) { + RegisterFailHandler(Fail) + + suiteConfig, reporterConfig := GinkgoConfiguration() + if os.Getenv("CI") != "" { + suiteConfig.FailFast = true + suiteConfig.Timeout = 120 * time.Minute + } + // The suite shares one ObjectStorageCluster across dependency-ordered specs + // (create -> bucket + S3 round-trip -> validation guards -> delete), so spec + // randomization MUST stay OFF. + suiteConfig.RandomizeAllSpecs = false + reporterConfig.Verbose = true + reporterConfig.ShowNodeEvents = false + + RunSpecs(t, "sds-object E2E Suite", suiteConfig, reporterConfig) +} + +// The single root Ordered container. Spec registration goes through builder +// functions called in EXPLICIT dependency order: per-file top-level Describes +// would order alphabetically and break the create-before-delete invariant. +var _ = Describe("sds-object e2e", Ordered, ContinueOnFailure, func() { + BeforeAll(prepareSharedState) + + // Dump OSC/OB conditions, module pods and events on any failure. + AfterEach(func() { + if !CurrentSpecReport().Failed() { + return + } + anySpecFailed = true + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + defer cancel() + dumpFailedSpecDiagnostics(ctx) + }) + + createSpecs() // create_test.go: OSC -> Ready, OB -> Ready, creds Secret, S3 round-trip + validationSpecs() // validation_test.go: webhook + CEL admission guards + deleteSpecs() // delete_test.go: OB delete (+ creds Secret + reclaim), OSC delete +}) + +func prepareSuite() { + suiteCfg = loadConfig() + + GinkgoWriter.Printf("E2E config:\n") + GinkgoWriter.Printf(" TEST_CLUSTER_CREATE_MODE: %q\n", os.Getenv("TEST_CLUSTER_CREATE_MODE")) + GinkgoWriter.Printf(" namespace (TEST_CLUSTER_NAMESPACE): %q\n", suiteCfg.namespace) + GinkgoWriter.Printf(" OSC name / type / redundancy: %q / %q / %q\n", suiteCfg.oscName, suiteCfg.oscType, suiteCfg.redundancy) + if suiteCfg.needsStorageClass() { + GinkgoWriter.Printf(" storage class / size: %q / %q\n", suiteCfg.storageCl, suiteCfg.oscSize) + } + if suiteCfg.isHeavy() { + GinkgoWriter.Printf(" elasticClusterRef: %q\n", suiteCfg.elasticRef) + } + GinkgoWriter.Printf(" bucket name: %q\n", suiteCfg.bucketName) + GinkgoWriter.Printf(" module ready timeout: %s\n", suiteCfg.moduleReadyTO) + GinkgoWriter.Printf(" OSC ready timeout: %s\n", suiteCfg.oscReadyTimeout) + GinkgoWriter.Printf(" OB ready timeout: %s\n", suiteCfg.obReadyTimeout) + GinkgoWriter.Printf(" probe image: %q\n", suiteCfg.probeImage) + + // Fail fast on misconfigured heavier profiles rather than after a 15m wait. + if suiteCfg.needsStorageClass() && suiteCfg.storageCl == "" { + Fail("E2E_OSC_TYPE=" + suiteCfg.oscType + " requires a StorageClass; set E2E_STORAGE_CLASS") + } + if suiteCfg.isHeavy() && suiteCfg.elasticRef == "" { + Fail("E2E_OSC_TYPE=Heavy requires E2E_ELASTIC_CLUSTER_REF (a Ready ElasticCluster)") + } + + ensureNestedTestCluster() + + var err error + suiteRestCfg = suiteClusterResources.Kubeconfig + + suiteClientset, err = clientgokube.NewForConfig(suiteRestCfg) + Expect(err).NotTo(HaveOccurred(), "build clientset") + + suiteDyn, err = dynamic.NewForConfig(suiteRestCfg) + Expect(err).NotTo(HaveOccurred(), "build dynamic client") + + ctx, cancel := context.WithTimeout(context.Background(), suiteCfg.moduleReadyTO+5*time.Minute) + defer cancel() + + By("Waiting for the sds-object module to become Ready") + Expect(waitModuleReady(ctx)).To(Succeed(), "sds-object module readiness") + + By("Ensuring the in-cluster test namespace exists") + Expect(ensureNamespace(ctx, suiteCfg.namespace)).To(Succeed()) +} + +// prepareSharedState runs once before the Ordered specs. Clients and module +// readiness are already set up in BeforeSuite; this is the hook where specs wire +// any additional shared fixtures. +func prepareSharedState() { + GinkgoWriter.Printf("Shared ObjectStorageCluster for this run: %s (type %s, namespace %s)\n", suiteCfg.oscName, suiteCfg.oscType, suiteCfg.namespace) +} + +func cleanupSuite() { + // Keep the nested cluster alive for manual debugging when a spec failed and + // the operator asked for it. Otherwise tear it down (the only mandatory step; + // resource-level cleanup is driven by the specs themselves). + if suiteCfg.keepClusterOnFailure && anySpecFailed { + printKeepClusterBanner() + return + } + cleanupNestedTestCluster() +} + +func printKeepClusterBanner() { + GinkgoWriter.Printf("\n========== E2E_KEEP_CLUSTER_ON_FAILURE: cluster preserved ==========\n") + GinkgoWriter.Printf("A spec failed and nested-cluster teardown was SKIPPED for debugging.\n") + GinkgoWriter.Printf(" namespace (OB/Secret + base VM ns): %s\n", suiteCfg.namespace) + GinkgoWriter.Printf(" ObjectStorageCluster: %s (type %s)\n", suiteCfg.oscName, suiteCfg.oscType) + GinkgoWriter.Printf(" module namespace: %s\n", moduleNS) + if suiteClusterResources != nil && suiteClusterResources.KubeconfigPath != "" { + GinkgoWriter.Printf(" kubeconfig (export KUBECONFIG): %s\n", suiteClusterResources.KubeconfigPath) + } + GinkgoWriter.Printf("Remember to delete the VMs / nested cluster manually when finished.\n") + GinkgoWriter.Printf("====================================================================\n") +} diff --git a/e2e/tests/validation_test.go b/e2e/tests/validation_test.go new file mode 100644 index 0000000..8c0a975 --- /dev/null +++ b/e2e/tests/validation_test.go @@ -0,0 +1,154 @@ +/* +Copyright 2026 Flant JSC + +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 tests + +import ( + "context" + "strings" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + + objectv1alpha1 "github.com/deckhouse/sds-object/api/v1alpha1" +) + +// validationSpecs exercises the admission guards that protect the API: the +// validating webhooks (single System cluster, unique bucket name per cluster) +// and the CRD CEL rules (immutability + profile-conditional requirements). They +// run on top of the shared cluster/bucket from create_test.go. +func validationSpecs() { + Describe("validation", func() { + It("denies a second System ObjectStorageCluster", func() { + if !suiteCfg.isSystem() { + Skip("shared cluster is not type System; the single-System webhook guard is not armed") + } + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + second := buildOSC(suiteCfg.oscName + "-2") + err := createOSC(ctx, second) + // Best-effort cleanup in case the guard ever regresses and admits it. + defer func() { + _ = suiteDyn.Resource(objectStorageClusterGVR).Delete(context.Background(), suiteCfg.oscName+"-2", metav1.DeleteOptions{}) + }() + expectDenied(err, "only one System ObjectStorageCluster is allowed") + }) + + It("denies a duplicate effective bucket name on the same cluster", func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + // Distinct metadata.name, but spec.bucketName collides with the shared + // bucket on the same clusterRef -> the webhook must reject it. + dup := buildOB("e2e-bucket-dup", suiteCfg.namespace, suiteCfg.oscName, objectv1alpha1.BucketReclaimRetain) + spec := dup.Object["spec"].(map[string]interface{}) + spec["bucketName"] = suiteCfg.bucketName + + err := createOB(ctx, dup) + defer func() { + _ = suiteDyn.Resource(objectBucketGVR).Namespace(suiteCfg.namespace).Delete(context.Background(), "e2e-bucket-dup", metav1.DeleteOptions{}) + }() + expectDenied(err, "already claimed by") + }) + + It("rejects changing the immutable spec.type", func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + // Patch the shared cluster's type to a different valid enum value. + newType := string(objectv1alpha1.ClusterTypeLightweight) + if suiteCfg.oscType == newType { + newType = string(objectv1alpha1.ClusterTypeSystem) + } + patch := []byte(`{"spec":{"type":"` + newType + `"}}`) + _, err := suiteDyn.Resource(objectStorageClusterGVR).Patch(ctx, suiteCfg.oscName, types.MergePatchType, patch, metav1.PatchOptions{}) + expectDenied(err, "spec.type is immutable") + }) + + It("rejects a Heavy cluster without elasticClusterRef (CEL)", func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + bad := newOSC("e2e-heavy-noref", map[string]interface{}{ + "type": string(objectv1alpha1.ClusterTypeHeavy), + "redundancy": string(objectv1alpha1.RedundancySingle), + }) + err := createOSC(ctx, bad) + defer func() { + _ = suiteDyn.Resource(objectStorageClusterGVR).Delete(context.Background(), "e2e-heavy-noref", metav1.DeleteOptions{}) + }() + expectDenied(err, "elasticClusterRef is required") + }) + + It("rejects elasticClusterRef on a non-Heavy cluster (CEL)", func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + bad := newOSC("e2e-sys-ref", map[string]interface{}{ + "type": string(objectv1alpha1.ClusterTypeSystem), + "redundancy": string(objectv1alpha1.RedundancySingle), + "elasticClusterRef": "some-cluster", + }) + err := createOSC(ctx, bad) + defer func() { + _ = suiteDyn.Resource(objectStorageClusterGVR).Delete(context.Background(), "e2e-sys-ref", metav1.DeleteOptions{}) + }() + expectDenied(err, "elasticClusterRef is only allowed") + }) + + It("rejects a Lightweight cluster without storage.class (CEL)", func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + bad := newOSC("e2e-light-noclass", map[string]interface{}{ + "type": string(objectv1alpha1.ClusterTypeLightweight), + "redundancy": string(objectv1alpha1.RedundancySingle), + }) + err := createOSC(ctx, bad) + defer func() { + _ = suiteDyn.Resource(objectStorageClusterGVR).Delete(context.Background(), "e2e-light-noclass", metav1.DeleteOptions{}) + }() + expectDenied(err, "storage.class is required") + }) + }) +} + +// newOSC builds an ObjectStorageCluster with an explicit spec map (for negative +// cases where buildOSC's profile-aware defaults would mask the rule under test). +func newOSC(name string, spec map[string]interface{}) *unstructured.Unstructured { + u := &unstructured.Unstructured{} + u.SetGroupVersionKind(schema.GroupVersionKind{Group: apiGroup, Version: apiVersion, Kind: objectv1alpha1.ObjectStorageClusterKind}) + u.SetName(name) + u.Object["spec"] = spec + return u +} + +// expectDenied asserts the admission attempt was rejected and that the denial +// message names the expected rule (so we know the RIGHT guard fired, not an +// unrelated error). +func expectDenied(err error, wantSubstr string) { + GinkgoHelper() + Expect(err).To(HaveOccurred(), "expected admission to deny the request, but it was accepted") + Expect(strings.ToLower(err.Error())).To(ContainSubstring(strings.ToLower(wantSubstr)), + "denied, but not by the expected guard: %v", err) +} From 91c0f30a5d7a9b62e90bf6d3d886d1a90ffd0d8f Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Mon, 29 Jun 2026 16:00:15 +0300 Subject: [PATCH 2/3] ci(e2e): run the e2e suite via the storage-e2e pipeline on the e2e/run label Add a thin caller workflow that invokes the reusable deckhouse/storage-e2e/.github/workflows/e2e.yml pipeline, gated by the e2e/run PR label. Configured for this module: module_path=e2e, test_package=./tests/, cluster_config=e2e/tests/cluster_config.yml, cluster_provider=commander (each run creates a fresh cluster via the Commander API and tears it down). Documents the label trigger and Commander secrets in e2e/README.md. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/e2e-tests.yml | 39 +++++++++++++++++++++++++++++++++ e2e/README.md | 19 ++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/e2e-tests.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 0000000..44d2151 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,39 @@ +# Copyright 2026 Flant JSC +# +# 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. + +# Thin caller for the reusable storage-e2e pipeline. The heavy e2e run only +# fires when the PR carries the `e2e/run` label (set it on the PR to trigger). +# Other labels: `e2e/keep-cluster` (skip teardown), `e2e/label:` (Ginkgo +# label filter). See storage-e2e docs/CI.md for the secrets/vars to configure. + +name: E2E + +on: + pull_request: + types: [opened, synchronize, reopened, labeled] + +jobs: + e2e: + # Gate: run only when the PR is labeled e2e/run. + if: ${{ contains(github.event.pull_request.labels.*.name, 'e2e/run') }} + uses: deckhouse/storage-e2e/.github/workflows/e2e.yml@main + with: + module_slug: sds-object + # The e2e Go module lives under e2e/; tests are in e2e/tests/. + module_path: e2e + test_package: ./tests/ + cluster_config: e2e/tests/cluster_config.yml + # Create a fresh cluster through Deckhouse Commander for each run. + cluster_provider: commander + secrets: inherit diff --git a/e2e/README.md b/e2e/README.md index 1bd4577..a63f54b 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -15,6 +15,25 @@ finalizer-driven deletion. guards → delete. 4. `AfterSuite` hands the cluster back to `storage-e2e` for teardown. +## Running in CI (PR label) + +The suite is wired into the reusable `storage-e2e` pipeline via +[`.github/workflows/e2e-tests.yml`](../.github/workflows/e2e-tests.yml). It is +**gated by the `e2e/run` PR label**: add that label to a pull request to trigger +a run (the job graph is `resolve → bootstrap → run-tests → teardown`). The +pipeline is configured with `cluster_provider: commander`, so each run creates a +fresh cluster through the Deckhouse Commander API and deletes it on teardown. + +Other labels: + +- `e2e/keep-cluster` — skip teardown so you can inspect / re-run on the cluster. +- `e2e/label:` — Ginkgo label filter (multiple are OR-joined). + +The Commander endpoint, token and template come from inherited org/repo secrets +and vars (`E2E_COMMANDER_*`); see `storage-e2e` `docs/CI.md` for the full list. + +## Running locally + The suite drives the CRDs through the dynamic client and reads the `storage.deckhouse.io/v1alpha1` Go types from the in-repo `sds-object/api` module (`replace github.com/deckhouse/sds-object/api => ../api`). All generic From 341c6268cb41f9de277984da015c623b7781d48c Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Mon, 29 Jun 2026 17:01:04 +0300 Subject: [PATCH 3/3] ci(e2e): install the PR image via the commander pipeline (enable-modules) Point the e2e caller at the new storage-e2e pipeline capabilities so the suite actually runs against a Commander-created cluster: - add tests/cluster_config.ci.yml whose sds-object modulePullOverride is "${E2E_MODULE_IMAGE_TAG}" (resolved by the enable-modules step). It is a separate file because the local-run config loader rejects ${...}; the literal cluster_config.yml is kept for local runs. - workflow: cluster_config -> the CI file, and module_image_tag: pr so the pipeline installs the image built for this PR. - README: document the bootstrap -> enable-modules -> run-tests flow and the prerequisite that the PR dev image (pr) is built before e2e. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/e2e-tests.yml | 6 ++++- e2e/README.md | 9 +++++++ e2e/tests/cluster_config.ci.yml | 43 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 e2e/tests/cluster_config.ci.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 44d2151..ee9af73 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -33,7 +33,11 @@ jobs: # The e2e Go module lives under e2e/; tests are in e2e/tests/. module_path: e2e test_package: ./tests/ - cluster_config: e2e/tests/cluster_config.yml + # CI config: modulePullOverride is ${E2E_MODULE_IMAGE_TAG}, resolved by the + # enable-modules step to the PR image tag below. + cluster_config: e2e/tests/cluster_config.ci.yml # Create a fresh cluster through Deckhouse Commander for each run. cluster_provider: commander + # Install the image built for this PR (build_dev publishes the pr tag). + module_image_tag: pr${{ github.event.pull_request.number }} secrets: inherit diff --git a/e2e/README.md b/e2e/README.md index a63f54b..1979907 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -32,6 +32,15 @@ Other labels: The Commander endpoint, token and template come from inherited org/repo secrets and vars (`E2E_COMMANDER_*`); see `storage-e2e` `docs/CI.md` for the full list. +Pipeline flow (`resolve → bootstrap → enable-modules → run-tests → teardown`): +`bootstrap` creates the cluster via Commander and hands off its kubeconfig; +`enable-modules` installs `sds-object` from `tests/cluster_config.ci.yml` +(`modulePullOverride: "${E2E_MODULE_IMAGE_TAG}"`, resolved to `pr`); +`run-tests` connects to that cluster from the kubeconfig (no SSH) and runs the +suite. This requires the PR's dev image (`pr`) to be built and pushed to the +dev-registry **before** the e2e run (the `build_dev` workflow), and the Commander +cluster must be able to pull from that registry. + ## Running locally The suite drives the CRDs through the dynamic client and reads the diff --git a/e2e/tests/cluster_config.ci.yml b/e2e/tests/cluster_config.ci.yml new file mode 100644 index 0000000..82aedfe --- /dev/null +++ b/e2e/tests/cluster_config.ci.yml @@ -0,0 +1,43 @@ +# CI-only cluster config for the storage-e2e reusable pipeline (commander +# provider). It differs from cluster_config.yml in ONE way: the sds-object +# modulePullOverride is the env reference ${E2E_MODULE_IMAGE_TAG}, resolved by +# the pipeline's enable-modules step (LoadClusterDefinition) to the PR's image +# tag. The local-run loader rejects ${...}, which is why this lives in a +# separate file and cluster_config.yml keeps a literal tag. +# +# In the commander CI flow only the `modules:` list + dkpParameters.registryRepo +# are consumed (by enable-modules); the masters/workers/subnets below are present +# to satisfy validation — the cluster itself is created from the Commander +# template, not from this block. +clusterDefinition: + masters: + - hostname: "master-1" + hostType: "vm" + osType: "Ubuntu 22.04 6.2.0-39-generic" + cpu: 4 + coreFraction: 50 + ram: 8 + diskSize: 50 + workers: + - hostname: "worker-1" + hostType: "vm" + osType: "Ubuntu 22.04 6.2.0-39-generic" + cpu: 4 + coreFraction: 50 + ram: 8 + diskSize: 50 + dkpParameters: + kubernetesVersion: "Automatic" + podSubnetCIDR: "10.112.0.0/16" + serviceSubnetCIDR: "10.225.0.0/16" + clusterDomain: "cluster.local" + registryRepo: "dev-registry.deckhouse.io/sys/deckhouse-oss" + devBranch: "main" + modules: + - name: "sds-object" + version: 1 + enabled: true + # Resolved by enable-modules to the PR image tag (e.g. pr123). The + # pipeline exports E2E_MODULE_IMAGE_TAG from the module_image_tag input. + modulePullOverride: "${E2E_MODULE_IMAGE_TAG}" + dependencies: []