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:
parent
2765ab166d
commit
8a09d76198
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue