feat: remove test mode (X-Test-Sub), all functions stored in S3 via storagesvc

- Remove FISSION_TEST_MODE and X-Test-Sub bypass from authMiddleware
- Remove testMode field from Server/Config structs
- Remove TestAuthenticator branch from main.go
- Add uploadToStoragesvc/buildDeploySpec: all function code uploaded to S3
- Add deleteFromStoragesvc: archive deleted from S3 on function delete
- Add FISSION_STORAGESVC_URL env to main.go and deploy/console.yaml
- image: naeel/fission-console:v1.3.31
This commit is contained in:
“Naeel”
2026-05-03 13:37:12 +04:00
parent e8f06d4ab2
commit a09291e208
5 changed files with 141 additions and 40 deletions
+2 -10
View File
@@ -37,16 +37,8 @@ func main() {
log.Fatalf("create dynamic client: %v", err)
}
testMode := os.Getenv("FISSION_TEST_MODE") == "true"
var jwtAuth auth.Authenticator
if testMode {
jwtAuth = &auth.TestAuthenticator{}
} else {
jwtAuth = auth.NewDeckAuthenticator(auth.DefaultDeckAPIs, nil)
}
authenticator := &auth.MultiAuthenticator{
JWT: jwtAuth,
JWT: auth.NewDeckAuthenticator(auth.DefaultDeckAPIs, nil),
Demo: &auth.DemoAuthenticator{},
}
@@ -59,7 +51,7 @@ func main() {
SATokenPath: envDefault("SA_TOKEN_PATH", "/var/run/secrets/kubernetes.io/serviceaccount/token"),
AuthUser: envDefault("FISSION_AUTH_USERNAME", ""),
AuthPass: envDefault("FISSION_AUTH_PASSWORD", ""),
TestMode: testMode,
StoragesvcURL: envDefault("FISSION_STORAGESVC_URL", "http://storagesvc.fission.svc.cluster.local"),
Authenticator: authenticator,
// --- ai/ask feature ---
LLMUrl: envDefault("FISSION_LLM_URL", "https://api.aillm.ru"),