multi-tenant: EnsureNamespaceSA + ns_watcher SA provisioning (v8)

This commit is contained in:
Naeel
2026-04-26 07:41:46 +03:00
parent 82e1ff76a5
commit 161de70576
24 changed files with 970 additions and 1 deletions
+7
View File
@@ -37,6 +37,7 @@ import (
"github.com/fission/fission/pkg/executor/executortype/newdeploy"
"github.com/fission/fission/pkg/executor/executortype/poolmgr"
"github.com/fission/fission/pkg/executor/fscache"
"github.com/fission/fission/pkg/executor/multitenant"
"github.com/fission/fission/pkg/executor/util"
fetcherConfig "github.com/fission/fission/pkg/fetcher/config"
"github.com/fission/fission/pkg/generated/clientset/versioned"
@@ -399,6 +400,12 @@ func StartExecutor(ctx context.Context, clientGen crd.ClientGeneratorInterface,
utils.CreateMissingPermissionForSA(ctx, kubernetesClient, logger)
// Start multi-tenant Namespace watcher.
// Detects Namespaces labeled fission.io/managed=true and registers them in all
// executor types without a pod restart. Backward-compatible with FISSION_RESOURCE_NAMESPACES.
// See: pkg/executor/multitenant/ns_watcher.go
multitenant.StartNSWatcher(ctx, logger, kubernetesClient, executorTypes, mgr)
mgr.Add(ctx, func(ctx context.Context) {
metrics.ServeMetrics(ctx, "executor", logger, mgr)
})