1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-29 10:55:05 +00:00

fix request.operation in globalValues is always set to CREATE (#5423)

Signed-off-by: cleverhu <shouping.hu@daocloud.io>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
This commit is contained in:
cleverhu 2022-11-22 20:17:06 +08:00 committed by GitHub
parent 2765ab166d
commit 8a09d76198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -327,8 +327,11 @@ func GetVariable(variablesString, valuesFile string, fs billy.Filesystem, isGit
}
if globalValMap != nil {
globalValMap["request.operation"] = "CREATE"
log.Log.V(3).Info("Defaulting request.operation to CREATE")
_, exist := globalValMap["request.operation"]
if !exist {
globalValMap["request.operation"] = "CREATE"
log.Log.V(3).Info("Defaulting request.operation to CREATE")
}
}
storePolicies := make([]store.Policy, 0)