Skip to content

Commit 09b4d73

Browse files
committed
[patch] switch kyverno label to str
1 parent bb78342 commit 09b4d73

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mas/devops/ocp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def getNamespace(dynClient: DynamicClient, namespace: str) -> dict:
9494
return {}
9595

9696

97-
def createNamespace(dynClient: DynamicClient, namespace: str, kyvernoLabels: bool = False) -> bool:
97+
def createNamespace(dynClient: DynamicClient, namespace: str, kyvernoLabel: str) -> bool:
9898
"""
9999
Create a namespace if it does not exist
100100
"""
@@ -110,7 +110,7 @@ def createNamespace(dynClient: DynamicClient, namespace: str, kyvernoLabels: boo
110110
"name": namespace
111111
}
112112
}
113-
if kyvernoLabels is not None:
113+
if kyvernoLabel is not None and kyvernoLabel == "audit":
114114
nsObj["metadata"]["labels"] = {
115115
"ibm.com/kyverno": "audit"
116116
}

0 commit comments

Comments
 (0)