mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 14:42:05 +09:00
fix(platform): stop handing tenants a root S3 the root tenant does not run
cozystack-basics wrote seaweedfs: tenant-root into the root values unconditionally, so every tenant without its own SeaweedFS inherited tenant-root as its S3 even when Tenant/root runs none. A Bucket there got a BucketClaim for a bucket class that never appears, and Harbor got its registry bucket the same way. seaweedfs.rootEnabled records that choice the way monitoring.rootEnabled does for monitoring, and the bucket and harbor charts refuse to render without S3 up the tenant chain rather than wait on a class that does not exist. Older configurations have no SeaweedFS flag. Keep their root S3 enabled. For an explicit value only true or the string "true" enables it. Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
This commit is contained in:
1 parent
15126f27ca
commit
19ab55c030
16 files changed
+188
-24
No files matched your search
@@ -286,7 +286,7 @@ persistentvolumeclaim/db-qdrant-test-0'
|
||||
tmp=$(mktemp -d)
|
||||
write_fake_kubectl "$tmp"
|
||||
render_hook "$HARBOR_CHART" harbor-test tenant-test harbor-test-cleanup "$tmp/hook.sh" \
|
||||
--set '_namespace.host=example.org' --set '_cluster.solver=http01'
|
||||
--set '_namespace.host=example.org' --set '_namespace.seaweedfs=tenant-root' --set '_cluster.solver=http01'
|
||||
|
||||
export KLOG="$tmp/calls"
|
||||
export CHALLENGE_LIST='harbor-test-cert-1 '
|
||||
@@ -322,7 +322,7 @@ persistentvolumeclaim/db-qdrant-test-0'
|
||||
tmp=$(mktemp -d)
|
||||
write_fake_kubectl "$tmp"
|
||||
render_hook "$HARBOR_CHART" harbor-test tenant-test harbor-test-cleanup "$tmp/hook.sh" \
|
||||
--set '_namespace.host=example.org' --set '_cluster.solver=http01'
|
||||
--set '_namespace.host=example.org' --set '_namespace.seaweedfs=tenant-root' --set '_cluster.solver=http01'
|
||||
|
||||
export KLOG="$tmp/calls"
|
||||
export CHALLENGE_LIST=''
|
||||
@@ -350,7 +350,7 @@ persistentvolumeclaim/db-qdrant-test-0'
|
||||
tmp=$(mktemp -d)
|
||||
write_fake_kubectl "$tmp"
|
||||
render_hook "$HARBOR_CHART" harbor-test tenant-test harbor-test-cleanup "$tmp/hook.sh" \
|
||||
--set '_namespace.host=example.org' --set '_cluster.solver=http01'
|
||||
--set '_namespace.host=example.org' --set '_namespace.seaweedfs=tenant-root' --set '_cluster.solver=http01'
|
||||
|
||||
export KLOG="$tmp/calls"
|
||||
export CHALLENGE_LIST='harbor-test-cert-1 '
|
||||
@@ -396,7 +396,7 @@ persistentvolumeclaim/db-qdrant-test-0'
|
||||
tmp=$(mktemp -d)
|
||||
write_fake_kubectl "$tmp"
|
||||
render_hook "$HARBOR_CHART" harbor-test tenant-test harbor-test-cleanup "$tmp/hook.sh" \
|
||||
--set '_namespace.host=example.org' --set '_cluster.solver=http01'
|
||||
--set '_namespace.host=example.org' --set '_namespace.seaweedfs=tenant-root' --set '_cluster.solver=http01'
|
||||
|
||||
export KLOG="$tmp/calls"
|
||||
export CHALLENGE_LIST='harbor-test-cert-1 '
|
||||
@@ -438,7 +438,7 @@ persistentvolumeclaim/db-qdrant-test-0'
|
||||
tmp=$(mktemp -d)
|
||||
write_fake_kubectl "$tmp"
|
||||
render_hook "$HARBOR_CHART" harbor-test tenant-test harbor-test-cleanup "$tmp/hook.sh" \
|
||||
--set '_namespace.host=example.org' --set '_cluster.solver=http01'
|
||||
--set '_namespace.host=example.org' --set '_namespace.seaweedfs=tenant-root' --set '_cluster.solver=http01'
|
||||
|
||||
export KLOG="$tmp/calls"
|
||||
export CHALLENGE_LIST='harbor-test-cert-1 '
|
||||
@@ -480,7 +480,7 @@ persistentvolumeclaim/db-qdrant-test-0'
|
||||
tmp=$(mktemp -d)
|
||||
write_fake_kubectl "$tmp"
|
||||
render_hook "$HARBOR_CHART" harbor-test tenant-test harbor-test-cleanup "$tmp/hook.sh" \
|
||||
--set '_namespace.host=example.org' --set '_cluster.solver=http01'
|
||||
--set '_namespace.host=example.org' --set '_namespace.seaweedfs=tenant-root' --set '_cluster.solver=http01'
|
||||
|
||||
export KLOG="$tmp/calls"
|
||||
export CHALLENGE_LIST=''
|
||||
|
||||
@@ -25,6 +25,8 @@ render_chart() {
|
||||
tenant) set -- tenant-sub --api-versions v1.edp.epam.com/v1 ;;
|
||||
# Satisfy the parent-cluster and release-name contract before the lookup.
|
||||
kubernetes-nodes) set -- kubernetes-nodes-render-check --set-string cluster=render ;;
|
||||
# Both refuse to render without S3 up the tenant chain.
|
||||
bucket|harbor) set -- "$name-render-check" --set-string _namespace.seaweedfs=tenant-root ;;
|
||||
*) set -- "$name-render-check" ;;
|
||||
esac
|
||||
helm template "$@" "$chart" -n tenant-test -f "$fixture"
|
||||
|
||||
@@ -57,6 +57,7 @@ render() {
|
||||
bootbox) set -- bootbox; namespace=tenant-root ;;
|
||||
computeplane|etcd|info|ingress|monitoring|seaweedfs|gateway) set -- "$name" ;;
|
||||
external-dns) set -- external-dns --set provider=inmemory ;;
|
||||
bucket|harbor) set -- "$name-render-check" --set-string _namespace.seaweedfs=tenant-root ;;
|
||||
kubernetes-nodes) set -- kubernetes-nodes-render-check --set-string cluster=render \
|
||||
--set-string resources.cpu=2 --set-string resources.memory=4Gi ;;
|
||||
tenant) set -- tenant-sub --api-versions v1.edp.epam.com/v1 ;;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ The source of `_cluster` is `packages/core/platform/templates/apps.yaml`; `_name
|
||||
| `configured.yaml` | OIDC on, per-host ACME via http01, shared services and topology constraint |
|
||||
| `wildcard.yaml` | OIDC on, dns01 with a platform-issued wildcard certificate, shared services and topology constraint |
|
||||
|
||||
Each chart is attempted under every fixture. `vm-instance` and `kubernetes-nodes` require a `VirtualMachineClusterInstancetype` lookup on their defaults. The sweep accepts their skip only while every fixture fails with the recorded lookup diagnostic; a successful render or a different error fails the sweep. For kubernetes-nodes it supplies a parent cluster and matching release name first. For tenant it declares the Keycloak API with `--api-versions v1.edp.epam.com/v1`, allowing OIDC-enabled fixtures to render the realm groups.
|
||||
Each chart is attempted under every fixture. `vm-instance` and `kubernetes-nodes` require a `VirtualMachineClusterInstancetype` lookup on their defaults. The sweep accepts their skip only while every fixture fails with the recorded lookup diagnostic; a successful render or a different error fails the sweep. For kubernetes-nodes it supplies a parent cluster and matching release name first. For bucket and harbor it names a SeaweedFS namespace, since both refuse to render without S3 up the tenant chain. For tenant it declares the Keycloak API with `--api-versions v1.edp.epam.com/v1`, allowing OIDC-enabled fixtures to render the realm groups.
|
||||
|
||||
`lookup` returns an empty result during this check. Tests for existing objects belong in chart-specific helm-unittest suites using `kubernetesProvider`; `packages/apps/clickhouse/tests/backup_api_password_persistence_test.yaml` covers both password generation and preservation that way. Presets, replica counts and other app feature toggles are outside this sweep.
|
||||
|
||||
|
||||
Reference in new issue
Block a user