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:
2025-09-25 17:39:33 -03:00
parent 3a6875a80e
commit 071ffefef7
7 changed files with 90 additions and 9 deletions

View File

@@ -16,6 +16,10 @@ data:
# Namespaces críticos para VPA
CRITICAL_NAMESPACES: '["openshift-monitoring", "openshift-ingress", "openshift-apiserver", "openshift-controller-manager", "openshift-sdn"]'
# Configurações de filtro de namespaces
INCLUDE_SYSTEM_NAMESPACES: "false"
SYSTEM_NAMESPACE_PREFIXES: '["kube-", "openshift-", "default", "kube-system", "kube-public", "kube-node-lease"]'
# URL do Prometheus
PROMETHEUS_URL: "http://prometheus.openshift-monitoring.svc.cluster.local:9090"

View File

@@ -89,6 +89,16 @@ spec:
configMapKeyRef:
name: resource-governance-config
key: CRITICAL_NAMESPACES
- name: INCLUDE_SYSTEM_NAMESPACES
valueFrom:
configMapKeyRef:
name: resource-governance-config
key: INCLUDE_SYSTEM_NAMESPACES
- name: SYSTEM_NAMESPACE_PREFIXES
valueFrom:
configMapKeyRef:
name: resource-governance-config
key: SYSTEM_NAMESPACE_PREFIXES
- name: PROMETHEUS_URL
valueFrom:
configMapKeyRef: