forked from kyverno/kyverno
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump update request api version (kyverno#10508)
* feat: bump update request api version Signed-off-by: Charles-Edouard Brétéché <[email protected]> * use v2 Signed-off-by: Charles-Edouard Brétéché <[email protected]> * codegen Signed-off-by: Charles-Edouard Brétéché <[email protected]> * codegen Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix linter Signed-off-by: Charles-Edouard Brétéché <[email protected]> * fix linter Signed-off-by: Charles-Edouard Brétéché <[email protected]> --------- Signed-off-by: Charles-Edouard Brétéché <[email protected]>
- Loading branch information
1 parent
4402e31
commit b36a2ec
Showing
76 changed files
with
316 additions
and
1,576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package v2 | ||
|
||
const ( | ||
// URMutatePolicyLabel adds the policy name to URs for mutate policies | ||
URMutatePolicyLabel = "mutate.updaterequest.kyverno.io/policy-name" | ||
URMutateTriggerNameLabel = "mutate.updaterequest.kyverno.io/trigger-name" | ||
URMutateTriggerNSLabel = "mutate.updaterequest.kyverno.io/trigger-namespace" | ||
URMutateTriggerKindLabel = "mutate.updaterequest.kyverno.io/trigger-kind" | ||
URMutateTriggerAPIVersionLabel = "mutate.updaterequest.kyverno.io/trigger-apiversion" | ||
|
||
// URGeneratePolicyLabel adds the policy name to URs for generate policies | ||
URGeneratePolicyLabel = "generate.kyverno.io/policy-name" | ||
URGenerateResourceNameLabel = "generate.kyverno.io/resource-name" | ||
URGenerateResourceUIDLabel = "generate.kyverno.io/resource-uid" | ||
URGenerateResourceNSLabel = "generate.kyverno.io/resource-namespace" | ||
URGenerateResourceKindLabel = "generate.kyverno.io/resource-kind" | ||
URGenerateRetryCountAnnotation = "generate.kyverno.io/retry-count" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import ( | |
|
||
"github.com/go-git/go-billy/v5" | ||
"github.com/go-git/go-billy/v5/memfs" | ||
kyvernov1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1" | ||
kyvernov2 "github.com/kyverno/kyverno/api/kyverno/v2" | ||
"github.com/kyverno/kyverno/cmd/cli/kubectl-kyverno/apis/v1alpha1" | ||
authenticationv1 "k8s.io/api/authentication/v1" | ||
) | ||
|
@@ -57,7 +57,7 @@ func TestLoad(t *testing.T) { | |
path: "../_testdata/user-infos/valid.yaml", | ||
resourcePath: "", | ||
want: &v1alpha1.UserInfo{ | ||
RequestInfo: kyvernov1beta1.RequestInfo{ | ||
RequestInfo: kyvernov2.RequestInfo{ | ||
ClusterRoles: []string{"cluster-admin"}, | ||
AdmissionUserInfo: authenticationv1.UserInfo{ | ||
Username: "[email protected]", | ||
|
@@ -85,7 +85,7 @@ func TestLoad(t *testing.T) { | |
path: "valid.yaml", | ||
resourcePath: "", | ||
want: &v1alpha1.UserInfo{ | ||
RequestInfo: kyvernov1beta1.RequestInfo{ | ||
RequestInfo: kyvernov2.RequestInfo{ | ||
ClusterRoles: []string{"cluster-admin"}, | ||
AdmissionUserInfo: authenticationv1.UserInfo{ | ||
Username: "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.