in cost-optimization/hpa-config-recommender/src/hpaconfigrecommender/utils/config.py [0:0]
def add_excluded_namespaces(cls, namespaces: str):
"""
Adds namespaces to the EXCLUDED_NAMESPACES list.
Takes a comma-separated string and adds each namespace if it doesn't
already exist.
Args:
namespaces (str): A comma-separated string of namespaces to add to
the exclusion list.
"""
for namespace in namespaces.split(","):
namespace = namespace.strip()
if namespace and namespace not in cls.EXCLUDED_NAMESPACES:
cls.EXCLUDED_NAMESPACES.append(namespace)
elif namespace in cls.EXCLUDED_NAMESPACES:
print(f"'{namespace}' is already in the exclusion list.")