Add system namespace filtering
- Add configuration to exclude system namespaces by default - Add UI checkbox to include system namespaces when needed - Update API endpoints to accept include_system_namespaces parameter - Update Kubernetes client to apply namespace filtering - Update ConfigMap and deployment with new environment variables - Fix Dockerfile to install dependencies globally - Test functionality with both filtered and unfiltered results
This commit is contained in:
@@ -4,6 +4,7 @@ Configurações da aplicação
|
||||
import os
|
||||
from typing import List, Optional
|
||||
from pydantic_settings import BaseSettings
|
||||
from pydantic import Field
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Configurações da aplicação"""
|
||||
@@ -31,6 +32,24 @@ class Settings(BaseSettings):
|
||||
"openshift-sdn"
|
||||
]
|
||||
|
||||
# Configurações de filtro de namespaces
|
||||
include_system_namespaces: bool = Field(default=False, alias="INCLUDE_SYSTEM_NAMESPACES")
|
||||
system_namespace_prefixes: List[str] = Field(
|
||||
default=[
|
||||
"kube-",
|
||||
"openshift-",
|
||||
"default",
|
||||
"kube-system",
|
||||
"kube-public",
|
||||
"kube-node-lease"
|
||||
],
|
||||
alias="SYSTEM_NAMESPACE_PREFIXES"
|
||||
)
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
case_sensitive = False
|
||||
|
||||
# Configurações de relatório
|
||||
report_export_path: str = "/tmp/reports"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user