Exclude CNI, CSI namespaces from mutation

This commit is contained in:
Lauri Võsandi 2022-12-23 08:40:54 +02:00
parent 7077d75395
commit 713910086f
1 changed files with 13 additions and 1 deletions

View File

@ -10,7 +10,19 @@ from sanic.response import json
from image_mutation import mutate_image
from harbor_wrapper import Harbor
mutation_excluded_namespaces = set(["tigera-operator", "calico-system", "kube-system"])
mutation_excluded_namespaces = set([
# Do not fiddle with CNI stuff
"kube-system", # kube-proxy hosted here
"tigera-operator",
"calico-system",
# Do not fiddle with CSI stuff
"longhorn-system",
# Don't touch Harbor itself
"harbor-operator",
])
harbor = Harbor(os.environ["HARBOR_URI"])
cached_registries = set()
app = Sanic("admission_control")