From 713910086fa153165bc0dbfb9fbd5961c72b52f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 23 Dec 2022 08:40:54 +0200 Subject: [PATCH] Exclude CNI, CSI namespaces from mutation --- app/harbor-operator.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/harbor-operator.py b/app/harbor-operator.py index f959318..ff6d676 100755 --- a/app/harbor-operator.py +++ b/app/harbor-operator.py @@ -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")