From 371a372f7eae6cf1b84f0d5887b931b56b325338 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 15:05:15 +0900 Subject: [PATCH 01/13] Align the latest OSCAL Assessment Results and consolidate ocm test data in ocm dedicated directory Signed-off-by: Takumi Yanagawa --- cmd/ocm/oscal2policy/c2p-config.yaml | 2 +- cmd/ocm/result2oscal/c2p-config.yaml | 4 +- cmd/ocm/result2oscal/cmd/cmd.go | 17 +- docs/oscal-vs-ocm-status-mapping.csv | 16 ++ go.mod | 2 +- pkg/ocm/oscal2policy_test.go | 5 +- pkg/ocm/reporter/helper_test.go | 2 +- pkg/ocm/reporter/reporter.go | 192 +++++++++-------- pkg/ocm/reporter/reporter_test.go | 52 ++--- pkg/testdata/ocm/assessment-results.json | 204 ++++++++++++++++++ .../{oscal/reporter-test => ocm}/catalog.json | 0 .../component-definition.json | 0 .../MachineConfig.50-worker-chrony.0.yaml | 0 .../policies/add-chrony/kustomization.yaml | 0 .../policies/add-chrony/policy-generator.yaml | 0 .../kustomization.yaml | 0 .../LVMCluster.odf-lvmcluster.0.yaml | 0 .../policy-generator.yaml | 0 .../Namespace.openshift-storage.0.yaml | 0 ...oup.openshift-storage-operatorgroup.0.yaml | 0 .../Subscription.lvm-operator.0.yaml | 0 .../policy-deployment/kustomization.yaml | 0 .../policy-deployment/policy-generator.yaml | 0 .../Deployment.nginx-deployment.0.yaml | 0 .../kustomization.yaml | 0 .../Role.noname.0.yaml | 0 .../policy-generator.yaml | 0 .../ScanSettingBinding.high.0.yaml | 0 .../ComplianceCheckResult.noname.0.yaml | 0 .../ComplianceSuite.high.0.yaml | 0 .../policy-high-scan/kustomization.yaml | 0 .../policy-high-scan/policy-generator.yaml | 0 .../kustomization.yaml | 0 .../policy-generator.yaml | 0 .../Deployment.nginx-deployment.0.yaml | 0 .../policy-results/00.placementdecisions.yaml | 0 .../{ => ocm}/policy-results/00.policies.yaml | 0 .../policy-results/00.policysets.yaml | 0 ...lacement-managed-kubernetes-decision-1.yml | 0 .../Policy.c2p.policy-deployment.yml | 0 .../Policy.c2p.policy-disallowed-roles.yml | 0 .../Policy.c2p.policy-high-scan.yml | 0 .../Policy.cluster1.c2p.policy-deployment.yml | 0 ...y.cluster1.c2p.policy-disallowed-roles.yml | 0 .../Policy.cluster1.c2p.policy-high-scan.yml | 0 .../Policy.cluster2.c2p.policy-deployment.yml | 0 ...y.cluster2.c2p.policy-disallowed-roles.yml | 0 .../Policy.cluster2.c2p.policy-high-scan.yml | 0 .../PolicySet.c2p.managed-kubernetes.yml | 0 .../{oscal/reporter-test => ocm}/profile.json | 0 pkg/testdata/oscal/component-definition.json | 150 ------------- pkg/testdata/reports/compliance-report.md | 108 ---------- 52 files changed, 353 insertions(+), 401 deletions(-) create mode 100644 docs/oscal-vs-ocm-status-mapping.csv create mode 100755 pkg/testdata/ocm/assessment-results.json rename pkg/testdata/{oscal/reporter-test => ocm}/catalog.json (100%) rename pkg/testdata/{oscal/reporter-test => ocm}/component-definition.json (100%) rename pkg/testdata/{ => ocm}/policies/add-chrony/add-chrony-worker/MachineConfig.50-worker-chrony.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/add-chrony/kustomization.yaml (100%) rename pkg/testdata/{ => ocm}/policies/add-chrony/policy-generator.yaml (100%) rename pkg/testdata/{ => ocm}/policies/install-odf-lvm-operator/kustomization.yaml (100%) rename pkg/testdata/{ => ocm}/policies/install-odf-lvm-operator/odf-lvmcluster/LVMCluster.odf-lvmcluster.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/install-odf-lvm-operator/policy-generator.yaml (100%) rename pkg/testdata/{ => ocm}/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Namespace.openshift-storage.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/install-odf-lvm-operator/policy-odf-lvm-operator/OperatorGroup.openshift-storage-operatorgroup.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Subscription.lvm-operator.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-deployment/kustomization.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-deployment/policy-generator.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-disallowed-roles/kustomization.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-disallowed-roles/policy-disallowed-roles-sample-role/Role.noname.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-disallowed-roles/policy-generator.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-high-scan/compliance-high-scan/ScanSettingBinding.high.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-high-scan/compliance-suite-high-results/ComplianceCheckResult.noname.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-high-scan/compliance-suite-high/ComplianceSuite.high.0.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-high-scan/kustomization.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-high-scan/policy-generator.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-nginx-deployment/kustomization.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-nginx-deployment/policy-generator.yaml (100%) rename pkg/testdata/{ => ocm}/policies/policy-nginx-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml (100%) rename pkg/testdata/{ => ocm}/policy-results/00.placementdecisions.yaml (100%) rename pkg/testdata/{ => ocm}/policy-results/00.policies.yaml (100%) rename pkg/testdata/{ => ocm}/policy-results/00.policysets.yaml (100%) rename pkg/testdata/{ => ocm}/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.c2p.policy-deployment.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.c2p.policy-disallowed-roles.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.c2p.policy-high-scan.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.cluster1.c2p.policy-deployment.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.cluster1.c2p.policy-high-scan.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.cluster2.c2p.policy-deployment.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/Policy.cluster2.c2p.policy-high-scan.yml (100%) rename pkg/testdata/{ => ocm}/policy-results/PolicySet.c2p.managed-kubernetes.yml (100%) rename pkg/testdata/{oscal/reporter-test => ocm}/profile.json (100%) delete mode 100644 pkg/testdata/oscal/component-definition.json diff --git a/cmd/ocm/oscal2policy/c2p-config.yaml b/cmd/ocm/oscal2policy/c2p-config.yaml index 2c1bc45..1cd541a 100644 --- a/cmd/ocm/oscal2policy/c2p-config.yaml +++ b/cmd/ocm/oscal2policy/c2p-config.yaml @@ -7,7 +7,7 @@ compliance: componentDefinition: url: ./pkg/composer/testdata/oscal/component-definition.json policyResources: - url: ./pkg/composer/testdata/policies + url: ./pkg/composer/testdata/ocm/policies policyResults: url: a/b/c clusterGroups: diff --git a/cmd/ocm/result2oscal/c2p-config.yaml b/cmd/ocm/result2oscal/c2p-config.yaml index 70e663e..225c511 100644 --- a/cmd/ocm/result2oscal/c2p-config.yaml +++ b/cmd/ocm/result2oscal/c2p-config.yaml @@ -7,9 +7,9 @@ compliance: componentDefinition: url: ./pkg/testdata/oscal/reporter-test/component-definition.json policyResources: - url: ./pkg/testdata/policies + url: ./pkg/testdata/ocm/policies policyResults: - url: ./pkg/testdata/policy-results + url: ./pkg/testdata/ocm/policy-results clusterGroups: - name: test-group # name of clusterGroup matchLabels: diff --git a/cmd/ocm/result2oscal/cmd/cmd.go b/cmd/ocm/result2oscal/cmd/cmd.go index e53f233..1328a79 100644 --- a/cmd/ocm/result2oscal/cmd/cmd.go +++ b/cmd/ocm/result2oscal/cmd/cmd.go @@ -33,7 +33,7 @@ func New() *cobra.Command { command := &cobra.Command{ Use: "result2oscal", - Short: "Generate OSCAL Assessment Results from Kyverno policies and the policy reports", + Short: "Generate OSCAL Assessment Results from OCM Policy statuses", RunE: func(cmd *cobra.Command, args []string) error { if err := opts.Complete(); err != nil { return err @@ -71,26 +71,15 @@ func Run(options *options.Options) error { r := reporter.NewReporter(c2pcrParsed) r.SetGenerationType(reporter.GenerationTypePolicyReport) - report, err := r.Generate() + arRoot, err := r.Generate() if err != nil { panic(err) } - err = pkg.WriteObjToYamlFile(outputDir+"/compliance-report.yaml", report) + err = pkg.WriteObjToJsonFile(outputDir+"/assessment-results.json", arRoot) if err != nil { panic(err) } - for _, pr := range r.GetPolicyReports() { - nspath, err := pkg.MakeDir(outputDir + "/" + pr.Namespace) - if err != nil { - panic(err) - } - err = pkg.WriteObjToYamlFile(nspath+"/"+pr.Name+".yaml", pr) - if err != nil { - panic(err) - } - } - return nil } diff --git a/docs/oscal-vs-ocm-status-mapping.csv b/docs/oscal-vs-ocm-status-mapping.csv new file mode 100644 index 0000000..61fca5e --- /dev/null +++ b/docs/oscal-vs-ocm-status-mapping.csv @@ -0,0 +1,16 @@ +Field of OSCAL Assessment Result,How is OCM Policy status mapped,Field of OCM Policy status +local-definitions.inventory-items[],Per cluster,status_status = policies[].find(x -> x.namespace == hub ns).flatmap(x1 -> status.status[].map(x2 -> x2)) +local-definitions.inventory-items[].props[].(cluster-name),Cluster name,status_status.clustername +observations[],Per rule (= per policy),OSCAL CDef Rule Ids +observations[].props[].(assessment-rule-id),Rule Id,OSCAL CDef Rule Id +observations[].props[].(policy-id),Policy Id,OSCAL CDef Policy Id +observations[].props[].(control-id),Control Id,OSCAL CDef Control Id +observations[].props[].(result),Aggregated status of compliance over clusters (=subjects),policies[].find(x -> x.namespace == hub ns && x -> x.metadata.name == policy-id).status.compliant == “Compliant” ? “pass” : “fail” +observations[].subjects[],Per policy status of cluster,status[i] := policies[].find(x -> x.metadata.name == policy-id).status.status[] +observations[].subjects[].subject-uuid,Inventory item id of the check,inventory-items[].find(x -> x.props[].(cluster-name) == status[i].clustername).id +observations[].subjects[].props[].(result),Status of compliance (pass/fail),status[i].compliant == “Compliant” ? “pass” : “fail” +observations[].subjects[].props[].(reason),Reason of the status,details := policies[].find(x -> x.namespace == clustername && x.metadata.name == policy-id).status.details +observations[].subjects[].props[].(evaluate-on),Evaluation timestamp,details.map(x -> x.history[0].lastTimestamp).sort_by_descend()[0] +observations[].relevant_references[].description,Evidence description,TBD +observations[].relevant_references[].href,Evidence urls,TBD +observations[].links[].href,Report urls,TBD \ No newline at end of file diff --git a/go.mod b/go.mod index f81e71f..eb74e73 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.19 require ( github.com/go-logr/logr v1.2.4 + github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 github.com/kcp-dev/kcp/pkg/apis v0.11.0 github.com/kyverno/kyverno v1.10.3 @@ -128,7 +129,6 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/certificate-transparency-go v1.1.4 // indirect github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-containerregistry v0.14.0 // indirect github.com/google/go-github/v45 v45.2.0 // indirect github.com/google/go-querystring v1.1.0 // indirect diff --git a/pkg/ocm/oscal2policy_test.go b/pkg/ocm/oscal2policy_test.go index 0af10c3..8b09b08 100644 --- a/pkg/ocm/oscal2policy_test.go +++ b/pkg/ocm/oscal2policy_test.go @@ -27,11 +27,10 @@ import ( ) func TestOscal2Policy(t *testing.T) { - policyDir := pkg.PathFromPkgDirectory("./testdata/policies") + policyDir := pkg.PathFromPkgDirectory("./testdata/ocm/policies") catalogPath := pkg.PathFromPkgDirectory("./testdata/oscal/catalog.json") profilePath := pkg.PathFromPkgDirectory("./testdata/oscal/profile.json") - cdPath := pkg.PathFromPkgDirectory("./testdata/oscal/component-definition.json") - // expectedDir := pkg.PathFromPkgDirectory("./composer/testdata/expected/c2pcr-parser-composed-policies") + cdPath := pkg.PathFromPkgDirectory("./testdata/ocm/component-definition.json") tempDirPath := pkg.PathFromPkgDirectory("./testdata/_test") err := os.MkdirAll(tempDirPath, os.ModePerm) diff --git a/pkg/ocm/reporter/helper_test.go b/pkg/ocm/reporter/helper_test.go index 8cb418f..cc5a4c0 100644 --- a/pkg/ocm/reporter/helper_test.go +++ b/pkg/ocm/reporter/helper_test.go @@ -36,7 +36,7 @@ func TestConvertToPolicyReport(t *testing.T) { func(policySet typepolicy.PolicySet) {}, func(placementDecision typeplacementdecision.PlacementDecision) {}, ) - err := filepath.Walk(pkg.PathFromPkgDirectory("./testdata/policy-results"), traverseFunc) + err := filepath.Walk(pkg.PathFromPkgDirectory("./testdata/ocm/policy-results"), traverseFunc) assert.NoError(t, err, "Should not happen") tempDirPath := pkg.PathFromPkgDirectory("./testdata/_test") diff --git a/pkg/ocm/reporter/reporter.go b/pkg/ocm/reporter/reporter.go index 6a2a514..a656dea 100644 --- a/pkg/ocm/reporter/reporter.go +++ b/pkg/ocm/reporter/reporter.go @@ -32,6 +32,8 @@ import ( "github.com/IBM/compliance-to-policy/pkg/oscal" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" + typear "github.com/IBM/compliance-to-policy/pkg/types/oscal/assessmentresults" + typeoscalcommon "github.com/IBM/compliance-to-policy/pkg/types/oscal/common" typeplacementdecision "github.com/IBM/compliance-to-policy/pkg/types/placementdecision" typepolicy "github.com/IBM/compliance-to-policy/pkg/types/policy" typereport "github.com/IBM/compliance-to-policy/pkg/types/report" @@ -79,11 +81,7 @@ func (r *Reporter) SetGenerationType(generationType GenerationType) { r.generationType = generationType } -func (r *Reporter) GetPolicyReports() []*typepolr.PolicyReport { - return r.policyReports -} - -func (r *Reporter) Generate() (typereport.ComplianceReport, error) { +func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { traverseFunc := genTraverseFunc( func(policy typepolicy.Policy) { r.policies = append(r.policies, &policy) }, func(policySet typepolicy.PolicySet) { r.policySets = append(r.policySets, &policySet) }, @@ -94,11 +92,30 @@ func (r *Reporter) Generate() (typereport.ComplianceReport, error) { if err := filepath.Walk(r.c2pParsed.PolicyResultsDir, traverseFunc); err != nil { logger.Error(err.Error()) } + + inventories := []typear.InventoryItem{} + clusternameIndex := map[string]bool{} for _, policy := range r.policies { polr := ConvertToPolicyReport(*policy) r.policyReports = append(r.policyReports, &polr) + if policy.Namespace == r.c2pParsed.Namespace { + for _, s := range policy.Status.Status { + _, exist := clusternameIndex[s.ClusterName] + if !exist { + clusternameIndex[s.ClusterName] = true + item := typear.InventoryItem{ + UUID: oscal.GenerateUUID(), + Props: []typeoscalcommon.Prop{{ + Name: "cluster-name", + Value: s.ClusterName, + }}, + } + inventories = append(inventories, item) + } + } + } } - reportComponents := []typereport.Component{} + observations := []typear.Observation{} for _, cdobj := range r.c2pParsed.ComponentObjects { policySets := typeutils.FilterByAnnotation(r.policySets, pkg.ANNOTATION_COMPONENT_TITLE, cdobj.ComponentTitle) clusterNameSets := sets.NewString() @@ -119,7 +136,6 @@ func (r *Reporter) Generate() (typereport.ComplianceReport, error) { } } for _, controlImpleObj := range cdobj.ControlImpleObjects { - controlResults := []typereport.ControlResult{} requiredControls := sets.NewString() checkedControls := sets.NewString() for _, controlObj := range controlImpleObj.ControlObjects { @@ -140,8 +156,8 @@ func (r *Reporter) Generate() (typereport.ComplianceReport, error) { if policySet != nil { policy = typeutils.FindByNamespaceName(r.policies, policySet.Namespace, policyId) } - var reason string var ruleStatus typereport.RuleStatus + subjects := []typear.Subject{} if policy != nil { var reasons []Reason if r.generationType == GenerationTypePolicyReport { @@ -149,62 +165,98 @@ func (r *Reporter) Generate() (typereport.ComplianceReport, error) { } else { reasons = r.GenerateReasonsFromRawPolicies(*policy) } - if statusByte, err := sigyaml.Marshal(reasons); err == nil { - reason = string(statusByte) - } else { - reason = err.Error() - } ruleStatus = mapToRuleStatus(policy.Status.ComplianceState) + for _, reason := range reasons { + var clusterName string + var inventoryUuid string + for _, inventory := range inventories { + prop, ok := oscal.FindProp("cluster-name", inventory.Props) + if ok { + clusterName = prop.Value + inventoryUuid = inventory.UUID + } else { + clusterName = "N/A" + inventoryUuid = "" + } + } + if inventoryUuid != "" { + var message string + if messageByte, err := sigyaml.Marshal(reason.Messages); err == nil { + message = string(messageByte) + } else { + message = err.Error() + } + subject := typear.Subject{ + SubjectUUID: inventoryUuid, + Type: "resource", + Title: "Cluster Name: " + clusterName, + Props: []typeoscalcommon.Prop{{ + Name: "result", + Value: string(mapToRuleStatus(reason.ComplianceState)), + }, { + Name: "reason", + Value: message, + }}, + } + subjects = append(subjects, subject) + } + } } else { - reason = fmt.Sprintf("Unable to find policy status for policy %s", policyId) ruleStatus = typereport.RuleStatusError } - ruleResult := typereport.RuleResult{ - RuleId: ruleId, - PolicyId: policyId, - Status: ruleStatus, - Reason: reason, + observation := typear.Observation{ + UUID: oscal.GenerateUUID(), + Description: fmt.Sprintf("Observation of policy %s", policyId), + Methods: []string{"TEST-AUTOMATED"}, + Props: []typeoscalcommon.Prop{{ + Name: "assessment-rule-id", + Value: ruleId, + }, { + Name: "policy-id", + Value: policyId, + }, { + Name: "control-id", + Value: controlId, + }, { + Name: "result", + Value: string(ruleStatus), + }}, + Subjects: subjects, } - ruleResults = append(ruleResults, ruleResult) + observations = append(observations, observation) checkedControls.Insert(controlId) } } - controlResult := typereport.ControlResult{ - ControlId: controlId, - RuleResults: ruleResults, - ComplianceStatus: aggregateRuleResults(ruleResults), - } - controlResults = append(controlResults, controlResult) - } - parameters := map[string]string{} - for _, setParam := range controlImpleObj.SetParameters { - parameters[setParam.ParamID] = setParam.Values[0] - } - reportComponent := typereport.Component{ - ComponentTitle: cdobj.ComponentTitle, - RequiredControls: requiredControls.List(), - CheckedControls: checkedControls.List(), - Parameters: parameters, - ControlResults: controlResults, - ComplianceStatus: aggregateControlResults(controlResults), } - reportComponents = append(reportComponents, reportComponent) } } - spec := typereport.Spec{ - Catalog: r.c2pParsed.Catalog.Metadata.Title, - Profile: r.c2pParsed.Profile.Metadata.Title, - Components: reportComponents, + + metadata := typear.Metadata{ + Title: "OSCAL Assessment Results", + LastModified: time.Now(), + Version: "0.0.1", + OscalVersion: "1.0.4", } - complianceReport := typereport.ComplianceReport{ - ObjectMeta: v1.ObjectMeta{ - Name: "compliance-report", - CreationTimestamp: v1.Now(), - }, - Spec: spec, + importAp := typear.ImportAp{ + Href: "http://...", + } + ar := typear.AssessmentResults{ + UUID: oscal.GenerateUUID(), + Metadata: metadata, + ImportAp: importAp, + Results: []typear.Result{}, + } + result := typear.Result{ + UUID: oscal.GenerateUUID(), + Title: "Assessment Results by OCM", + Description: "Assessment Results by OCM...", + Start: time.Now(), + Observations: observations, } + ar.Results = append(ar.Results, result) + arRoot := typear.AssessmentResultsRoot{AssessmentResults: ar} - return complianceReport, nil + return &arRoot, nil } func (r *Reporter) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) []Reason { @@ -275,46 +327,6 @@ func aggregatePolicyReportSummaryToComplianceState(summary typepolr.PolicyReport } } -func aggregateRuleResults(ruleResults []typereport.RuleResult) typereport.ComplianceStatus { - countPass := 0 - countFail := 0 - countError := 0 - countUnimple := 0 - for _, ruleResult := range ruleResults { - switch ruleResult.Status { - case typereport.RuleStatusPass: - countPass++ - case typereport.RuleStatusFail: - countFail++ - case typereport.RuleStatusError: - countError++ - case typereport.RuleStatusUnImplemented: - countUnimple++ - } - } - if countPass != 0 && countPass == len(ruleResults) { - return typereport.ComplianceStatusCompliant - } - return typereport.ComplianceStatusNonCompliant -} - -func aggregateControlResults(controlResults []typereport.ControlResult) typereport.ComplianceStatus { - countCompiant := 0 - countNonCompiant := 0 - for _, controlResult := range controlResults { - switch controlResult.ComplianceStatus { - case typereport.ComplianceStatusCompliant: - countCompiant++ - case typereport.ComplianceStatusNonCompliant: - countNonCompiant++ - } - } - if countCompiant != 0 && countCompiant == len(controlResults) { - return typereport.ComplianceStatusCompliant - } - return typereport.ComplianceStatusNonCompliant -} - func genTraverseFunc(onPolicy func(typepolicy.Policy), onPolicySet func(typepolicy.PolicySet), onPlacementDesicion func(typeplacementdecision.PlacementDecision)) func(path string, info os.FileInfo, err error) error { return func(path string, info os.FileInfo, err error) error { if err != nil { diff --git a/pkg/ocm/reporter/reporter_test.go b/pkg/ocm/reporter/reporter_test.go index 8344487..5d258ef 100644 --- a/pkg/ocm/reporter/reporter_test.go +++ b/pkg/ocm/reporter/reporter_test.go @@ -17,24 +17,25 @@ limitations under the License. package reporter import ( - "fmt" "os" "testing" "github.com/IBM/compliance-to-policy/pkg" "github.com/IBM/compliance-to-policy/pkg/c2pcr" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" - typereport "github.com/IBM/compliance-to-policy/pkg/types/report" + typear "github.com/IBM/compliance-to-policy/pkg/types/oscal/assessmentresults" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/assert" ) func TestReporter(t *testing.T) { - policyDir := pkg.PathFromPkgDirectory("./testdata/policies") - policyResultsDir := pkg.PathFromPkgDirectory("./testdata/policy-results") - catalogPath := pkg.PathFromPkgDirectory("./testdata/oscal/reporter-test/catalog.json") - profilePath := pkg.PathFromPkgDirectory("./testdata/oscal/reporter-test/profile.json") - cdPath := pkg.PathFromPkgDirectory("./testdata/oscal/reporter-test/component-definition.json") + policyDir := pkg.PathFromPkgDirectory("./testdata/ocm/policies") + policyResultsDir := pkg.PathFromPkgDirectory("./testdata/ocm/policy-results") + catalogPath := pkg.PathFromPkgDirectory("./testdata/ocm/catalog.json") + profilePath := pkg.PathFromPkgDirectory("./testdata/ocm/profile.json") + cdPath := pkg.PathFromPkgDirectory("./testdata/ocm/component-definition.json") tempDirPath := pkg.PathFromPkgDirectory("./testdata/_test") err := os.MkdirAll(tempDirPath, os.ModePerm) @@ -79,34 +80,23 @@ func TestReporter(t *testing.T) { assert.NoError(t, err, "Should not happen") reporter := NewReporter(c2pcrParsed) - report, err := reporter.Generate() + arRoot, err := reporter.Generate() assert.NoError(t, err, "Should not happen") - err = pkg.WriteObjToYamlFile(tempDir.GetTempDir()+"/compliance-report.yaml", report) + err = pkg.WriteObjToJsonFile(tempDir.GetTempDir()+"/assessment-results.json", arRoot) assert.NoError(t, err, "Should not happen") - var expected typereport.ComplianceReport - err = pkg.LoadYamlFileToK8sTypedObject(pkg.PathFromPkgDirectory("./testdata/reports/compliance-report.yaml"), &expected) + var expected typear.AssessmentResultsRoot + err = pkg.LoadYamlFileToK8sTypedObject(pkg.PathFromPkgDirectory("./testdata/ocm/assessment-results.json"), &expected) - // Timestamp is currently set by Now(). Since the timestamp should be always different from expected one, reset creationTimestamp of expected one to actual one. - expected.CreationTimestamp = report.CreationTimestamp - - assert.NoError(t, err, "Should not happen") - assert.Equal(t, expected, report) - - reporter.SetGenerationType("policy-report") - reportFromPolicyReports, err := reporter.Generate() assert.NoError(t, err, "Should not happen") - - // Timestamp is currently set by Now(). Since the timestamp should be always different from expected one, reset creationTimestamp of expected one to actual one. - reportFromPolicyReports.CreationTimestamp = report.CreationTimestamp - - assert.Equal(t, report, reportFromPolicyReports) - - for _, policyReport := range reporter.policyReports { - fname := fmt.Sprintf("policy-report.%s.%s.yaml", policyReport.Namespace, policyReport.Name) - err := pkg.WriteObjToYamlFile(tempDir.GetTempDir()+"/"+fname, policyReport) - assert.NoError(t, err, "Should not happen") - } - + diff := cmp.Diff(expected, *arRoot, + cmpopts.IgnoreFields(typear.AssessmentResults{}, "UUID"), + cmpopts.IgnoreFields(typear.Metadata{}, "LastModified"), + cmpopts.IgnoreFields(typear.Result{}, "UUID", "Start"), + cmpopts.IgnoreFields(typear.InventoryItem{}, "UUID"), + cmpopts.IgnoreFields(typear.Subject{}, "SubjectUUID"), + cmpopts.IgnoreFields(typear.Observation{}, "UUID"), + ) + assert.Equal(t, diff, "", "assessment-result matched") } diff --git a/pkg/testdata/ocm/assessment-results.json b/pkg/testdata/ocm/assessment-results.json new file mode 100755 index 0000000..7ba4d8f --- /dev/null +++ b/pkg/testdata/ocm/assessment-results.json @@ -0,0 +1,204 @@ +{ + "assessment-results": { + "uuid": "9913b24e-931f-11ee-82cf-62f79297f1b7", + "metadata": { + "title": "OSCAL Assessment Results", + "last-modified": "2023-12-05T12:37:21.653819+09:00", + "version": "0.0.1", + "oscal-version": "1.0.4" + }, + "import-ap": { + "href": "http://..." + }, + "results": [ + { + "uuid": "9913b258-931f-11ee-82cf-62f79297f1b7", + "title": "Assessment Results by OCM", + "description": "Assessment Results by OCM...", + "start": "2023-12-05T12:37:21.65382+09:00", + "local-definitions": { + "inventory-items": null + }, + "observations": [ + { + "uuid": "9913a92a-931f-11ee-82cf-62f79297f1b7", + "description": "Observation of policy policy-high-scan", + "props": [ + { + "name": "assessment-rule-id", + "value": "test_configuration_check" + }, + { + "name": "policy-id", + "value": "policy-high-scan" + }, + { + "name": "control-id", + "value": "cm-6" + }, + { + "name": "result", + "value": "fail" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-high-scan.176f1dcdc2b51b01\n lastTimestamp: \"2023-07-05T23:52:34Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.176f1ddc44adf035\n lastTimestamp: \"2023-07-05T23:53:37Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.176f1ddc441457e5\n lastTimestamp: \"2023-07-05T23:53:37Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult,\n please check if you have CRD deployed\n" + } + ] + }, + { + "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-high-scan.176f1dc3684f9eb6\n lastTimestamp: \"2023-07-05T23:51:50Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.176f1dc426d20948\n lastTimestamp: \"2023-07-05T23:51:53Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.176f1dc4e29e1221\n lastTimestamp: \"2023-07-05T23:51:56Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult,\n please check if you have CRD deployed\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + }, + { + "uuid": "9913adf8-931f-11ee-82cf-62f79297f1b7", + "description": "Observation of policy policy-deployment", + "props": [ + { + "name": "assessment-rule-id", + "value": "test_proxy_check" + }, + { + "name": "policy-id", + "value": "policy-deployment" + }, + { + "name": "control-id", + "value": "cm-2" + }, + { + "name": "result", + "value": "fail" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-deployment.176f1ddc5591cb1c\n lastTimestamp: \"2023-07-05T23:53:37Z\"\n message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in\n namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease missing;\n [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace\n local-path-storage missing'\n" + } + ] + }, + { + "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-deployment.176f1dc4e7de17cb\n lastTimestamp: \"2023-07-05T23:51:56Z\"\n message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in\n namespace cluster2 missing; [nginx-deployment] in namespace default missing; [nginx-deployment]\n in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public\n missing; [nginx-deployment] in namespace local-path-storage missing'\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + }, + { + "uuid": "9913b244-931f-11ee-82cf-62f79297f1b7", + "description": "Observation of policy policy-disallowed-roles", + "props": [ + { + "name": "assessment-rule-id", + "value": "test_rbac_check" + }, + { + "name": "policy-id", + "value": "policy-disallowed-roles" + }, + { + "name": "control-id", + "value": "ac-6" + }, + { + "name": "result", + "value": "pass" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "pass" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-disallowed-roles.176f1dcdc4c8d17e\n lastTimestamp: \"2023-07-05T23:52:34Z\"\n message: Compliant; notification - roles in namespace cluster1; in namespace default;\n in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage\n missing as expected, therefore this Object template is compliant\n" + } + ] + }, + { + "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "pass" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-disallowed-roles.176f1dc36e36b7b2\n lastTimestamp: \"2023-07-05T23:51:50Z\"\n message: Compliant; notification - roles in namespace cluster2; in namespace default;\n in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage\n missing as expected, therefore this Object template is compliant\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/pkg/testdata/oscal/reporter-test/catalog.json b/pkg/testdata/ocm/catalog.json similarity index 100% rename from pkg/testdata/oscal/reporter-test/catalog.json rename to pkg/testdata/ocm/catalog.json diff --git a/pkg/testdata/oscal/reporter-test/component-definition.json b/pkg/testdata/ocm/component-definition.json similarity index 100% rename from pkg/testdata/oscal/reporter-test/component-definition.json rename to pkg/testdata/ocm/component-definition.json diff --git a/pkg/testdata/policies/add-chrony/add-chrony-worker/MachineConfig.50-worker-chrony.0.yaml b/pkg/testdata/ocm/policies/add-chrony/add-chrony-worker/MachineConfig.50-worker-chrony.0.yaml similarity index 100% rename from pkg/testdata/policies/add-chrony/add-chrony-worker/MachineConfig.50-worker-chrony.0.yaml rename to pkg/testdata/ocm/policies/add-chrony/add-chrony-worker/MachineConfig.50-worker-chrony.0.yaml diff --git a/pkg/testdata/policies/add-chrony/kustomization.yaml b/pkg/testdata/ocm/policies/add-chrony/kustomization.yaml similarity index 100% rename from pkg/testdata/policies/add-chrony/kustomization.yaml rename to pkg/testdata/ocm/policies/add-chrony/kustomization.yaml diff --git a/pkg/testdata/policies/add-chrony/policy-generator.yaml b/pkg/testdata/ocm/policies/add-chrony/policy-generator.yaml similarity index 100% rename from pkg/testdata/policies/add-chrony/policy-generator.yaml rename to pkg/testdata/ocm/policies/add-chrony/policy-generator.yaml diff --git a/pkg/testdata/policies/install-odf-lvm-operator/kustomization.yaml b/pkg/testdata/ocm/policies/install-odf-lvm-operator/kustomization.yaml similarity index 100% rename from pkg/testdata/policies/install-odf-lvm-operator/kustomization.yaml rename to pkg/testdata/ocm/policies/install-odf-lvm-operator/kustomization.yaml diff --git a/pkg/testdata/policies/install-odf-lvm-operator/odf-lvmcluster/LVMCluster.odf-lvmcluster.0.yaml b/pkg/testdata/ocm/policies/install-odf-lvm-operator/odf-lvmcluster/LVMCluster.odf-lvmcluster.0.yaml similarity index 100% rename from pkg/testdata/policies/install-odf-lvm-operator/odf-lvmcluster/LVMCluster.odf-lvmcluster.0.yaml rename to pkg/testdata/ocm/policies/install-odf-lvm-operator/odf-lvmcluster/LVMCluster.odf-lvmcluster.0.yaml diff --git a/pkg/testdata/policies/install-odf-lvm-operator/policy-generator.yaml b/pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-generator.yaml similarity index 100% rename from pkg/testdata/policies/install-odf-lvm-operator/policy-generator.yaml rename to pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-generator.yaml diff --git a/pkg/testdata/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Namespace.openshift-storage.0.yaml b/pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Namespace.openshift-storage.0.yaml similarity index 100% rename from pkg/testdata/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Namespace.openshift-storage.0.yaml rename to pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Namespace.openshift-storage.0.yaml diff --git a/pkg/testdata/policies/install-odf-lvm-operator/policy-odf-lvm-operator/OperatorGroup.openshift-storage-operatorgroup.0.yaml b/pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-odf-lvm-operator/OperatorGroup.openshift-storage-operatorgroup.0.yaml similarity index 100% rename from pkg/testdata/policies/install-odf-lvm-operator/policy-odf-lvm-operator/OperatorGroup.openshift-storage-operatorgroup.0.yaml rename to pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-odf-lvm-operator/OperatorGroup.openshift-storage-operatorgroup.0.yaml diff --git a/pkg/testdata/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Subscription.lvm-operator.0.yaml b/pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Subscription.lvm-operator.0.yaml similarity index 100% rename from pkg/testdata/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Subscription.lvm-operator.0.yaml rename to pkg/testdata/ocm/policies/install-odf-lvm-operator/policy-odf-lvm-operator/Subscription.lvm-operator.0.yaml diff --git a/pkg/testdata/policies/policy-deployment/kustomization.yaml b/pkg/testdata/ocm/policies/policy-deployment/kustomization.yaml similarity index 100% rename from pkg/testdata/policies/policy-deployment/kustomization.yaml rename to pkg/testdata/ocm/policies/policy-deployment/kustomization.yaml diff --git a/pkg/testdata/policies/policy-deployment/policy-generator.yaml b/pkg/testdata/ocm/policies/policy-deployment/policy-generator.yaml similarity index 100% rename from pkg/testdata/policies/policy-deployment/policy-generator.yaml rename to pkg/testdata/ocm/policies/policy-deployment/policy-generator.yaml diff --git a/pkg/testdata/policies/policy-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml b/pkg/testdata/ocm/policies/policy-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml similarity index 100% rename from pkg/testdata/policies/policy-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml rename to pkg/testdata/ocm/policies/policy-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml diff --git a/pkg/testdata/policies/policy-disallowed-roles/kustomization.yaml b/pkg/testdata/ocm/policies/policy-disallowed-roles/kustomization.yaml similarity index 100% rename from pkg/testdata/policies/policy-disallowed-roles/kustomization.yaml rename to pkg/testdata/ocm/policies/policy-disallowed-roles/kustomization.yaml diff --git a/pkg/testdata/policies/policy-disallowed-roles/policy-disallowed-roles-sample-role/Role.noname.0.yaml b/pkg/testdata/ocm/policies/policy-disallowed-roles/policy-disallowed-roles-sample-role/Role.noname.0.yaml similarity index 100% rename from pkg/testdata/policies/policy-disallowed-roles/policy-disallowed-roles-sample-role/Role.noname.0.yaml rename to pkg/testdata/ocm/policies/policy-disallowed-roles/policy-disallowed-roles-sample-role/Role.noname.0.yaml diff --git a/pkg/testdata/policies/policy-disallowed-roles/policy-generator.yaml b/pkg/testdata/ocm/policies/policy-disallowed-roles/policy-generator.yaml similarity index 100% rename from pkg/testdata/policies/policy-disallowed-roles/policy-generator.yaml rename to pkg/testdata/ocm/policies/policy-disallowed-roles/policy-generator.yaml diff --git a/pkg/testdata/policies/policy-high-scan/compliance-high-scan/ScanSettingBinding.high.0.yaml b/pkg/testdata/ocm/policies/policy-high-scan/compliance-high-scan/ScanSettingBinding.high.0.yaml similarity index 100% rename from pkg/testdata/policies/policy-high-scan/compliance-high-scan/ScanSettingBinding.high.0.yaml rename to pkg/testdata/ocm/policies/policy-high-scan/compliance-high-scan/ScanSettingBinding.high.0.yaml diff --git a/pkg/testdata/policies/policy-high-scan/compliance-suite-high-results/ComplianceCheckResult.noname.0.yaml b/pkg/testdata/ocm/policies/policy-high-scan/compliance-suite-high-results/ComplianceCheckResult.noname.0.yaml similarity index 100% rename from pkg/testdata/policies/policy-high-scan/compliance-suite-high-results/ComplianceCheckResult.noname.0.yaml rename to pkg/testdata/ocm/policies/policy-high-scan/compliance-suite-high-results/ComplianceCheckResult.noname.0.yaml diff --git a/pkg/testdata/policies/policy-high-scan/compliance-suite-high/ComplianceSuite.high.0.yaml b/pkg/testdata/ocm/policies/policy-high-scan/compliance-suite-high/ComplianceSuite.high.0.yaml similarity index 100% rename from pkg/testdata/policies/policy-high-scan/compliance-suite-high/ComplianceSuite.high.0.yaml rename to pkg/testdata/ocm/policies/policy-high-scan/compliance-suite-high/ComplianceSuite.high.0.yaml diff --git a/pkg/testdata/policies/policy-high-scan/kustomization.yaml b/pkg/testdata/ocm/policies/policy-high-scan/kustomization.yaml similarity index 100% rename from pkg/testdata/policies/policy-high-scan/kustomization.yaml rename to pkg/testdata/ocm/policies/policy-high-scan/kustomization.yaml diff --git a/pkg/testdata/policies/policy-high-scan/policy-generator.yaml b/pkg/testdata/ocm/policies/policy-high-scan/policy-generator.yaml similarity index 100% rename from pkg/testdata/policies/policy-high-scan/policy-generator.yaml rename to pkg/testdata/ocm/policies/policy-high-scan/policy-generator.yaml diff --git a/pkg/testdata/policies/policy-nginx-deployment/kustomization.yaml b/pkg/testdata/ocm/policies/policy-nginx-deployment/kustomization.yaml similarity index 100% rename from pkg/testdata/policies/policy-nginx-deployment/kustomization.yaml rename to pkg/testdata/ocm/policies/policy-nginx-deployment/kustomization.yaml diff --git a/pkg/testdata/policies/policy-nginx-deployment/policy-generator.yaml b/pkg/testdata/ocm/policies/policy-nginx-deployment/policy-generator.yaml similarity index 100% rename from pkg/testdata/policies/policy-nginx-deployment/policy-generator.yaml rename to pkg/testdata/ocm/policies/policy-nginx-deployment/policy-generator.yaml diff --git a/pkg/testdata/policies/policy-nginx-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml b/pkg/testdata/ocm/policies/policy-nginx-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml similarity index 100% rename from pkg/testdata/policies/policy-nginx-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml rename to pkg/testdata/ocm/policies/policy-nginx-deployment/policy-nginx-deployment/Deployment.nginx-deployment.0.yaml diff --git a/pkg/testdata/policy-results/00.placementdecisions.yaml b/pkg/testdata/ocm/policy-results/00.placementdecisions.yaml similarity index 100% rename from pkg/testdata/policy-results/00.placementdecisions.yaml rename to pkg/testdata/ocm/policy-results/00.placementdecisions.yaml diff --git a/pkg/testdata/policy-results/00.policies.yaml b/pkg/testdata/ocm/policy-results/00.policies.yaml similarity index 100% rename from pkg/testdata/policy-results/00.policies.yaml rename to pkg/testdata/ocm/policy-results/00.policies.yaml diff --git a/pkg/testdata/policy-results/00.policysets.yaml b/pkg/testdata/ocm/policy-results/00.policysets.yaml similarity index 100% rename from pkg/testdata/policy-results/00.policysets.yaml rename to pkg/testdata/ocm/policy-results/00.policysets.yaml diff --git a/pkg/testdata/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml b/pkg/testdata/ocm/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml similarity index 100% rename from pkg/testdata/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml rename to pkg/testdata/ocm/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml diff --git a/pkg/testdata/policy-results/Policy.c2p.policy-deployment.yml b/pkg/testdata/ocm/policy-results/Policy.c2p.policy-deployment.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.c2p.policy-deployment.yml rename to pkg/testdata/ocm/policy-results/Policy.c2p.policy-deployment.yml diff --git a/pkg/testdata/policy-results/Policy.c2p.policy-disallowed-roles.yml b/pkg/testdata/ocm/policy-results/Policy.c2p.policy-disallowed-roles.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.c2p.policy-disallowed-roles.yml rename to pkg/testdata/ocm/policy-results/Policy.c2p.policy-disallowed-roles.yml diff --git a/pkg/testdata/policy-results/Policy.c2p.policy-high-scan.yml b/pkg/testdata/ocm/policy-results/Policy.c2p.policy-high-scan.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.c2p.policy-high-scan.yml rename to pkg/testdata/ocm/policy-results/Policy.c2p.policy-high-scan.yml diff --git a/pkg/testdata/policy-results/Policy.cluster1.c2p.policy-deployment.yml b/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-deployment.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.cluster1.c2p.policy-deployment.yml rename to pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-deployment.yml diff --git a/pkg/testdata/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml b/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml rename to pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml diff --git a/pkg/testdata/policy-results/Policy.cluster1.c2p.policy-high-scan.yml b/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-high-scan.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.cluster1.c2p.policy-high-scan.yml rename to pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-high-scan.yml diff --git a/pkg/testdata/policy-results/Policy.cluster2.c2p.policy-deployment.yml b/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-deployment.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.cluster2.c2p.policy-deployment.yml rename to pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-deployment.yml diff --git a/pkg/testdata/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml b/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml rename to pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml diff --git a/pkg/testdata/policy-results/Policy.cluster2.c2p.policy-high-scan.yml b/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-high-scan.yml similarity index 100% rename from pkg/testdata/policy-results/Policy.cluster2.c2p.policy-high-scan.yml rename to pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-high-scan.yml diff --git a/pkg/testdata/policy-results/PolicySet.c2p.managed-kubernetes.yml b/pkg/testdata/ocm/policy-results/PolicySet.c2p.managed-kubernetes.yml similarity index 100% rename from pkg/testdata/policy-results/PolicySet.c2p.managed-kubernetes.yml rename to pkg/testdata/ocm/policy-results/PolicySet.c2p.managed-kubernetes.yml diff --git a/pkg/testdata/oscal/reporter-test/profile.json b/pkg/testdata/ocm/profile.json similarity index 100% rename from pkg/testdata/oscal/reporter-test/profile.json rename to pkg/testdata/ocm/profile.json diff --git a/pkg/testdata/oscal/component-definition.json b/pkg/testdata/oscal/component-definition.json deleted file mode 100644 index 49a22b4..0000000 --- a/pkg/testdata/oscal/component-definition.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "component-definition": { - "uuid": "e3f74636-b63c-4406-bbc7-cf9dee495816", - "metadata": { - "title": "Test Component Definition", - "last-modified": "2023-05-22T04:20:26+00:00", - "version": "20210826", - "oscal-version": "1.0.4" - }, - "components": [ - { - "uuid": "5ccc0047-6b10-4f9d-90d4-5f2bc4141fa8", - "type": "Service", - "title": "My Test Service", - "description": "My Test Service...", - "props": [ - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule1", - "class": "scc_class", - "remarks": "rule_set_01" - }, - { - "name": "Rule_Description", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule1...", - "class": "scc_class", - "remarks": "rule_set_01" - }, - { - "name": "Policy_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "add-chrony", - "remarks": "rule_set_01" - }, - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule2", - "class": "scc_class", - "remarks": "rule_set_02" - }, - { - "name": "Rule_Description", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule2...", - "class": "scc_class", - "remarks": "rule_set_02" - }, - { - "name": "Policy_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "install-odf-lvm-operator", - "remarks": "rule_set_02" - }, - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule3", - "class": "scc_class", - "remarks": "rule_set_03" - }, - { - "name": "Rule_Description", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule3...", - "class": "scc_class", - "remarks": "rule_set_03" - }, - { - "name": "Policy_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "policy-nginx-deployment", - "remarks": "rule_set_03" - }, - { - "name": "Parameter_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "minimum_nginx_deployment_replicas", - "class": "scc_class", - "remarks": "rule_set_03" - }, - { - "name": "Parameter_Description", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "Minimum # of NGINX pod", - "class": "scc_class", - "remarks": "rule_set_02" - } - ], - "control-implementations": [ - { - "uuid": "18c98b61-9561-4fc6-b65a-7715bf61e17f", - "source": "https://github.com/usnistgov/oscal-content/blob/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json", - "description": "NIST Special Publication 800-53 Revision 5 HIGH IMPACT BASELINE", - "set-parameters": [ - { - "param-id": "minimum_nginx_deployment_replicas", - "values": [ - "3" - ] - } - ], - "implemented-requirements": [ - { - "uuid": "bdc3a56a-d12e-46d7-bd39-db909a3daabd", - "control-id": "ac-1", - "description": "", - "props": [ - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule1", - "class": "scc_class" - }, - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule2", - "class": "scc_class" - } - ] - }, - { - "uuid": "8a2cb5a3-f3d1-480f-8463-dd4ecf45a8cd", - "control-id": "ac-2.1", - "description": "", - "props": [ - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule2", - "class": "scc_class" - }, - { - "name": "Rule_Id", - "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", - "value": "rule3", - "class": "scc_class" - } - ] - } - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/pkg/testdata/reports/compliance-report.md b/pkg/testdata/reports/compliance-report.md index 9fa7bb9..e69de29 100755 --- a/pkg/testdata/reports/compliance-report.md +++ b/pkg/testdata/reports/compliance-report.md @@ -1,108 +0,0 @@ -## Catalog -Electronic Version of NIST SP 800-53 Rev 5 Controls and SP 800-53A Rev 5 Assessment Procedures -## Component: Managed Kubernetes - -Compliance status: NonCompliant - -Checked controls: [ac-6,cm-2,cm-6,] -#### Result of control: cm-6 -**Compliance status: NonCompliant** - -Rules: -- Rule ID: test_configuration_check -- Policy ID: policy-high-scan -- Status: fail -- Reason: -``` -- clusterName: cluster1 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-high-scan.176f1dcdc2b51b01 - lastTimestamp: "2023-07-05T23:52:34Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1ddc44adf035 - lastTimestamp: "2023-07-05T23:53:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1ddc441457e5 - lastTimestamp: "2023-07-05T23:53:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, - please check if you have CRD deployed -- clusterName: cluster2 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-high-scan.176f1dc3684f9eb6 - lastTimestamp: "2023-07-05T23:51:50Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1dc426d20948 - lastTimestamp: "2023-07-05T23:51:53Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1dc4e29e1221 - lastTimestamp: "2023-07-05T23:51:56Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, - please check if you have CRD deployed - -``` ---- -#### Result of control: cm-2 -**Compliance status: NonCompliant** - -Rules: -- Rule ID: test_proxy_check -- Policy ID: policy-deployment -- Status: fail -- Reason: -``` -- clusterName: cluster1 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-deployment.176f1ddc5591cb1c - lastTimestamp: "2023-07-05T23:53:37Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] - in namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease - missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] - in namespace local-path-storage missing' -- clusterName: cluster2 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-deployment.176f1dc4e7de17cb - lastTimestamp: "2023-07-05T23:51:56Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] - in namespace cluster2 missing; [nginx-deployment] in namespace default missing; - [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] - in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage - missing' - -``` ---- -#### Result of control: ac-6 -**Compliance status: Compliant** - -Rules: -- Rule ID: test_rbac_check -- Policy ID: policy-disallowed-roles -- Status: pass -- Reason: -``` -- clusterName: cluster1 - complianceState: Compliant - messages: - - eventName: c2p.policy-disallowed-roles.176f1dcdc4c8d17e - lastTimestamp: "2023-07-05T23:52:34Z" - message: Compliant; notification - roles in namespace cluster1; in namespace default; - in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage - missing as expected, therefore this Object template is compliant -- clusterName: cluster2 - complianceState: Compliant - messages: - - eventName: c2p.policy-disallowed-roles.176f1dc36e36b7b2 - lastTimestamp: "2023-07-05T23:51:50Z" - message: Compliant; notification - roles in namespace cluster2; in namespace default; - in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage - missing as expected, therefore this Object template is compliant - -``` ---- From 68980f9cd9454b1945885984db27bd73bb8db3be Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 16:14:26 +0900 Subject: [PATCH 02/13] Reuse oscal2posture implemented for C2P for Kyverno Signed-off-by: Takumi Yanagawa --- cmd/c2pcli/subcommands/kyverno.go | 5 +- cmd/c2pcli/subcommands/ocm.go | 5 +- cmd/kyverno/oscal2posture/main.go | 30 ---------- .../oscal2posture/cmd/cmd.go | 12 ++-- .../oscal2posture/options/options.go | 3 - pkg/ocm/reporter/reporter.go | 21 +++---- pkg/{kyverno => pvpcommon}/oscal2posture.go | 21 +++++-- pkg/{kyverno => pvpcommon}/template/model.go | 0 .../template/template.md | 2 +- pkg/testdata/ocm/assessment-results.json | 55 +++++++++++++------ 10 files changed, 78 insertions(+), 76 deletions(-) delete mode 100644 cmd/kyverno/oscal2posture/main.go rename cmd/{kyverno => pvpcommon}/oscal2posture/cmd/cmd.go (84%) rename cmd/{kyverno => pvpcommon}/oscal2posture/options/options.go (92%) rename pkg/{kyverno => pvpcommon}/oscal2posture.go (89%) rename pkg/{kyverno => pvpcommon}/template/model.go (100%) rename pkg/{kyverno => pvpcommon}/template/template.md (93%) diff --git a/cmd/c2pcli/subcommands/kyverno.go b/cmd/c2pcli/subcommands/kyverno.go index 6cd9cb4..3b0aa08 100644 --- a/cmd/c2pcli/subcommands/kyverno.go +++ b/cmd/c2pcli/subcommands/kyverno.go @@ -21,9 +21,10 @@ import ( "github.com/IBM/compliance-to-policy/cmd/c2pcli/options" oscal2policycmd "github.com/IBM/compliance-to-policy/cmd/kyverno/oscal2policy/cmd" - oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/kyverno/oscal2posture/cmd" result2oscalcmd "github.com/IBM/compliance-to-policy/cmd/kyverno/result2oscal/cmd" toolscmd "github.com/IBM/compliance-to-policy/cmd/kyverno/tools/cmd" + oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/cmd" + "github.com/IBM/compliance-to-policy/pkg" ) func NewKyvernoSubCommand() *cobra.Command { @@ -38,7 +39,7 @@ func NewKyvernoSubCommand() *cobra.Command { command.AddCommand(oscal2policycmd.New()) command.AddCommand(result2oscalcmd.New()) - command.AddCommand(oscal2posturecmd.New()) + command.AddCommand(oscal2posturecmd.New(pkg.GetLogger("kyverno/oscal2posture"))) command.AddCommand(toolscmd.New()) return command diff --git a/cmd/c2pcli/subcommands/ocm.go b/cmd/c2pcli/subcommands/ocm.go index 1ce9738..9b9659d 100644 --- a/cmd/c2pcli/subcommands/ocm.go +++ b/cmd/c2pcli/subcommands/ocm.go @@ -21,8 +21,9 @@ import ( "github.com/IBM/compliance-to-policy/cmd/c2pcli/options" oscal2policycmd "github.com/IBM/compliance-to-policy/cmd/ocm/oscal2policy/cmd" - oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/ocm/oscal2posture/cmd" result2oscalcmd "github.com/IBM/compliance-to-policy/cmd/ocm/result2oscal/cmd" + oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/cmd" + "github.com/IBM/compliance-to-policy/pkg" ) func NewOcmSubCommand() *cobra.Command { @@ -37,7 +38,7 @@ func NewOcmSubCommand() *cobra.Command { command.AddCommand(oscal2policycmd.New()) command.AddCommand(result2oscalcmd.New()) - command.AddCommand(oscal2posturecmd.New()) + command.AddCommand(oscal2posturecmd.New(pkg.GetLogger("ocm/oscal2posture"))) return command } diff --git a/cmd/kyverno/oscal2posture/main.go b/cmd/kyverno/oscal2posture/main.go deleted file mode 100644 index eb3d2aa..0000000 --- a/cmd/kyverno/oscal2posture/main.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "os" - - "github.com/IBM/compliance-to-policy/cmd/kyverno/oscal2posture/cmd" -) - -func main() { - err := cmd.New().Execute() - if err != nil { - os.Exit(1) - } -} diff --git a/cmd/kyverno/oscal2posture/cmd/cmd.go b/cmd/pvpcommon/oscal2posture/cmd/cmd.go similarity index 84% rename from cmd/kyverno/oscal2posture/cmd/cmd.go rename to cmd/pvpcommon/oscal2posture/cmd/cmd.go index cf828b7..e154d51 100644 --- a/cmd/kyverno/oscal2posture/cmd/cmd.go +++ b/cmd/pvpcommon/oscal2posture/cmd/cmd.go @@ -21,14 +21,16 @@ import ( "os" "github.com/spf13/cobra" + "go.uber.org/zap" - "github.com/IBM/compliance-to-policy/cmd/kyverno/oscal2posture/options" + "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/options" "github.com/IBM/compliance-to-policy/pkg" "github.com/IBM/compliance-to-policy/pkg/kyverno" + "github.com/IBM/compliance-to-policy/pkg/pvpcommon" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" ) -func New() *cobra.Command { +func New(logger *zap.Logger) *cobra.Command { opts := options.NewOptions() command := &cobra.Command{ @@ -42,7 +44,7 @@ func New() *cobra.Command { if err := opts.Validate(); err != nil { return err } - return Run(opts) + return Run(opts, logger) }, } @@ -51,7 +53,7 @@ func New() *cobra.Command { return command } -func Run(options *options.Options) error { +func Run(options *options.Options, logger *zap.Logger) error { output, c2pcrPath, tempDirPath := options.Out, options.C2PCRPath, options.TempDirPath var c2pcrSpec typec2pcr.Spec @@ -71,7 +73,7 @@ func Run(options *options.Options) error { return err } - r := kyverno.NewOscal2Posture(c2pcrParsed, arRoot, nil) + r := pvpcommon.NewOscal2Posture(c2pcrParsed, arRoot, nil, logger) data, err := r.Generate() if err != nil { return err diff --git a/cmd/kyverno/oscal2posture/options/options.go b/cmd/pvpcommon/oscal2posture/options/options.go similarity index 92% rename from cmd/kyverno/oscal2posture/options/options.go rename to cmd/pvpcommon/oscal2posture/options/options.go index 4758317..e9c657a 100644 --- a/cmd/kyverno/oscal2posture/options/options.go +++ b/cmd/pvpcommon/oscal2posture/options/options.go @@ -48,8 +48,5 @@ func (o *Options) Validate() error { if o.C2PCRPath == "" { return errors.New("-c or --config is required") } - if o.AssessmentResults == "" { - return errors.New("--assessment-results is required") - } return nil } diff --git a/pkg/ocm/reporter/reporter.go b/pkg/ocm/reporter/reporter.go index a656dea..7e2738f 100644 --- a/pkg/ocm/reporter/reporter.go +++ b/pkg/ocm/reporter/reporter.go @@ -167,16 +167,14 @@ func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { } ruleStatus = mapToRuleStatus(policy.Status.ComplianceState) for _, reason := range reasons { - var clusterName string - var inventoryUuid string + clusterName := "N/A" + inventoryUuid := "" for _, inventory := range inventories { prop, ok := oscal.FindProp("cluster-name", inventory.Props) - if ok { + if ok && prop.Value == reason.ClusterName { clusterName = prop.Value inventoryUuid = inventory.UUID - } else { - clusterName = "N/A" - inventoryUuid = "" + break } } if inventoryUuid != "" { @@ -247,10 +245,13 @@ func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { Results: []typear.Result{}, } result := typear.Result{ - UUID: oscal.GenerateUUID(), - Title: "Assessment Results by OCM", - Description: "Assessment Results by OCM...", - Start: time.Now(), + UUID: oscal.GenerateUUID(), + Title: "Assessment Results by OCM", + Description: "Assessment Results by OCM...", + Start: time.Now(), + LocalDefinitions: typear.LocalDefinitions{ + InventoryItems: inventories, + }, Observations: observations, } ar.Results = append(ar.Results, result) diff --git a/pkg/kyverno/oscal2posture.go b/pkg/pvpcommon/oscal2posture.go similarity index 89% rename from pkg/kyverno/oscal2posture.go rename to pkg/pvpcommon/oscal2posture.go index da9758c..1ecf3cf 100644 --- a/pkg/kyverno/oscal2posture.go +++ b/pkg/pvpcommon/oscal2posture.go @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -package kyverno +package pvpcommon import ( "bytes" "embed" "html/template" "os" + "strings" - "github.com/IBM/compliance-to-policy/pkg" "go.uber.org/zap" - tp "github.com/IBM/compliance-to-policy/pkg/kyverno/template" "github.com/IBM/compliance-to-policy/pkg/oscal" + tp "github.com/IBM/compliance-to-policy/pkg/pvpcommon/template" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" typear "github.com/IBM/compliance-to-policy/pkg/types/oscal/assessmentresults" typecd "github.com/IBM/compliance-to-policy/pkg/types/oscal/componentdefinition" @@ -48,9 +48,8 @@ type TemplateValues struct { AssessmentResult typear.AssessmentResults } -func NewOscal2Posture(c2pParsed typec2pcr.C2PCRParsed, assessmentResults typear.AssessmentResultsRoot, templateFile *string) *Oscal2Posture { +func NewOscal2Posture(c2pParsed typec2pcr.C2PCRParsed, assessmentResults typear.AssessmentResultsRoot, templateFile *string, logger *zap.Logger) *Oscal2Posture { return &Oscal2Posture{ - logger: pkg.GetLogger("kyverno/oscal2posture"), c2pParsed: c2pParsed, assessmentResults: assessmentResults, templateFile: templateFile, @@ -138,8 +137,18 @@ func (r *Oscal2Posture) Generate() ([]byte, error) { if err != nil { return nil, err } + + funcmap := template.FuncMap{ + "newline_with_indent": func(text string, indent int) string { + newText := strings.ReplaceAll(text, "\n", "\n"+strings.Repeat(" ", indent)) + return newText + }, + } + templateString := string(templateData) - tmpl, err := template.New("report.md").Parse(templateString) + tmpl := template.New("report.md") + tmpl.Funcs(funcmap) + tmpl, err = tmpl.Parse(templateString) if err != nil { return nil, err } diff --git a/pkg/kyverno/template/model.go b/pkg/pvpcommon/template/model.go similarity index 100% rename from pkg/kyverno/template/model.go rename to pkg/pvpcommon/template/model.go diff --git a/pkg/kyverno/template/template.md b/pkg/pvpcommon/template/template.md similarity index 93% rename from pkg/kyverno/template/template.md rename to pkg/pvpcommon/template/template.md index b4586bc..24c8bdc 100644 --- a/pkg/kyverno/template/template.md +++ b/pkg/pvpcommon/template/template.md @@ -18,7 +18,7 @@ Rule ID: {{$ruleResult.RuleId}} - Result: {{$subject.Result}} - Reason: ``` - {{$subject.Reason}} + {{ newline_with_indent $subject.Reason 6}} ``` {{- end}} diff --git a/pkg/testdata/ocm/assessment-results.json b/pkg/testdata/ocm/assessment-results.json index 7ba4d8f..24bc121 100755 --- a/pkg/testdata/ocm/assessment-results.json +++ b/pkg/testdata/ocm/assessment-results.json @@ -1,9 +1,9 @@ { "assessment-results": { - "uuid": "9913b24e-931f-11ee-82cf-62f79297f1b7", + "uuid": "50436d5c-933d-11ee-a9ed-62f79297f1b7", "metadata": { "title": "OSCAL Assessment Results", - "last-modified": "2023-12-05T12:37:21.653819+09:00", + "last-modified": "2023-12-05T16:10:04.394838+09:00", "version": "0.0.1", "oscal-version": "1.0.4" }, @@ -12,16 +12,37 @@ }, "results": [ { - "uuid": "9913b258-931f-11ee-82cf-62f79297f1b7", + "uuid": "50436d5c-933d-11ee-a9ee-62f79297f1b7", "title": "Assessment Results by OCM", "description": "Assessment Results by OCM...", - "start": "2023-12-05T12:37:21.65382+09:00", + "start": "2023-12-05T16:10:04.394839+09:00", "local-definitions": { - "inventory-items": null + "inventory-items": [ + { + "uuid": "5042d8ec-933d-11ee-a9ed-62f79297f1b7", + "description": "", + "props": [ + { + "name": "cluster-name", + "value": "cluster1" + } + ] + }, + { + "uuid": "5042df04-933d-11ee-a9ed-62f79297f1b7", + "description": "", + "props": [ + { + "name": "cluster-name", + "value": "cluster2" + } + ] + } + ] }, "observations": [ { - "uuid": "9913a92a-931f-11ee-82cf-62f79297f1b7", + "uuid": "50436320-933d-11ee-a9ed-62f79297f1b7", "description": "Observation of policy policy-high-scan", "props": [ { @@ -46,9 +67,9 @@ ], "subjects": [ { - "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "subject-uuid": "5042d8ec-933d-11ee-a9ed-62f79297f1b7", "type": "resource", - "title": "Cluster Name: cluster2", + "title": "Cluster Name: cluster1", "props": [ { "name": "result", @@ -61,7 +82,7 @@ ] }, { - "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "subject-uuid": "5042df04-933d-11ee-a9ed-62f79297f1b7", "type": "resource", "title": "Cluster Name: cluster2", "props": [ @@ -80,7 +101,7 @@ "expires": "0001-01-01T00:00:00Z" }, { - "uuid": "9913adf8-931f-11ee-82cf-62f79297f1b7", + "uuid": "50436898-933d-11ee-a9ed-62f79297f1b7", "description": "Observation of policy policy-deployment", "props": [ { @@ -105,9 +126,9 @@ ], "subjects": [ { - "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "subject-uuid": "5042d8ec-933d-11ee-a9ed-62f79297f1b7", "type": "resource", - "title": "Cluster Name: cluster2", + "title": "Cluster Name: cluster1", "props": [ { "name": "result", @@ -120,7 +141,7 @@ ] }, { - "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "subject-uuid": "5042df04-933d-11ee-a9ed-62f79297f1b7", "type": "resource", "title": "Cluster Name: cluster2", "props": [ @@ -139,7 +160,7 @@ "expires": "0001-01-01T00:00:00Z" }, { - "uuid": "9913b244-931f-11ee-82cf-62f79297f1b7", + "uuid": "50436d52-933d-11ee-a9ed-62f79297f1b7", "description": "Observation of policy policy-disallowed-roles", "props": [ { @@ -164,9 +185,9 @@ ], "subjects": [ { - "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "subject-uuid": "5042d8ec-933d-11ee-a9ed-62f79297f1b7", "type": "resource", - "title": "Cluster Name: cluster2", + "title": "Cluster Name: cluster1", "props": [ { "name": "result", @@ -179,7 +200,7 @@ ] }, { - "subject-uuid": "99133e9a-931f-11ee-82cf-62f79297f1b7", + "subject-uuid": "5042df04-933d-11ee-a9ed-62f79297f1b7", "type": "resource", "title": "Cluster Name: cluster2", "props": [ From f49947e12c5bdd8e42b836db00aed665bd354dc6 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 16:20:21 +0900 Subject: [PATCH 03/13] Conversion to PolicyReport is no longer required Signed-off-by: Takumi Yanagawa --- cmd/ocm/oscal2posture/cmd/cmd.go | 70 ------------ cmd/ocm/oscal2posture/main.go | 30 ----- cmd/ocm/oscal2posture/options/options.go | 48 -------- cmd/ocm/result2oscal/cmd/cmd.go | 1 - pkg/ocm/reporter/helper.go | 65 ----------- pkg/ocm/reporter/helper_test.go | 68 ----------- pkg/ocm/reporter/markdown.go | 59 ---------- pkg/ocm/reporter/markdown_test.go | 40 ------- pkg/ocm/reporter/reporter.go | 50 +------- pkg/ocm/reporter/template.md | 27 ----- pkg/testdata/reports/compliance-report.md | 0 pkg/testdata/reports/compliance-report.yaml | 107 ------------------ .../policy-report.c2p.policy-deployment.yaml | 31 ----- ...cy-report.c2p.policy-disallowed-roles.yaml | 30 ----- .../policy-report.c2p.policy-high-scan.yaml | 57 ---------- ...report.cluster1.c2p.policy-deployment.yaml | 38 ------- ....cluster1.c2p.policy-disallowed-roles.yaml | 36 ------ ...-report.cluster1.c2p.policy-high-scan.yaml | 72 ------------ ...report.cluster2.c2p.policy-deployment.yaml | 39 ------- ....cluster2.c2p.policy-disallowed-roles.yaml | 36 ------ ...-report.cluster2.c2p.policy-high-scan.yaml | 72 ------------ 21 files changed, 1 insertion(+), 975 deletions(-) delete mode 100644 cmd/ocm/oscal2posture/cmd/cmd.go delete mode 100644 cmd/ocm/oscal2posture/main.go delete mode 100644 cmd/ocm/oscal2posture/options/options.go delete mode 100644 pkg/ocm/reporter/helper_test.go delete mode 100644 pkg/ocm/reporter/markdown.go delete mode 100644 pkg/ocm/reporter/markdown_test.go delete mode 100644 pkg/ocm/reporter/template.md delete mode 100755 pkg/testdata/reports/compliance-report.md delete mode 100755 pkg/testdata/reports/compliance-report.yaml delete mode 100755 pkg/testdata/reports/policy-report.c2p.policy-deployment.yaml delete mode 100755 pkg/testdata/reports/policy-report.c2p.policy-disallowed-roles.yaml delete mode 100755 pkg/testdata/reports/policy-report.c2p.policy-high-scan.yaml delete mode 100755 pkg/testdata/reports/policy-report.cluster1.c2p.policy-deployment.yaml delete mode 100755 pkg/testdata/reports/policy-report.cluster1.c2p.policy-disallowed-roles.yaml delete mode 100755 pkg/testdata/reports/policy-report.cluster1.c2p.policy-high-scan.yaml delete mode 100755 pkg/testdata/reports/policy-report.cluster2.c2p.policy-deployment.yaml delete mode 100755 pkg/testdata/reports/policy-report.cluster2.c2p.policy-disallowed-roles.yaml delete mode 100755 pkg/testdata/reports/policy-report.cluster2.c2p.policy-high-scan.yaml diff --git a/cmd/ocm/oscal2posture/cmd/cmd.go b/cmd/ocm/oscal2posture/cmd/cmd.go deleted file mode 100644 index 735f76d..0000000 --- a/cmd/ocm/oscal2posture/cmd/cmd.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cmd - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - - "github.com/IBM/compliance-to-policy/cmd/ocm/oscal2posture/options" - "github.com/IBM/compliance-to-policy/pkg" - "github.com/IBM/compliance-to-policy/pkg/ocm/reporter" - typereport "github.com/IBM/compliance-to-policy/pkg/types/report" -) - -func New() *cobra.Command { - opts := options.NewOptions() - - command := &cobra.Command{ - Use: "oscal2posture", - Short: "Generate Compliance Posture from OSCAL artifacts", - RunE: func(cmd *cobra.Command, args []string) error { - if err := opts.Complete(); err != nil { - return err - } - - if err := opts.Validate(); err != nil { - return err - } - return Run(opts) - }, - } - - opts.AddFlags(command.Flags()) - - return command -} - -func Run(options *options.Options) error { - - var report typereport.ComplianceReport - err := pkg.LoadYamlFileToK8sTypedObject(options.ComplianceReportFile, &report) - if err != nil { - panic(err) - } - - md := reporter.NewMarkdown() - generated, err := md.Generate(options.MdTemplateFile, report) - if err != nil { - panic(err) - } - fmt.Fprintln(os.Stdout, string(generated)) - - return nil -} diff --git a/cmd/ocm/oscal2posture/main.go b/cmd/ocm/oscal2posture/main.go deleted file mode 100644 index a06ae50..0000000 --- a/cmd/ocm/oscal2posture/main.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "os" - - "github.com/IBM/compliance-to-policy/cmd/ocm/oscal2posture/cmd" -) - -func main() { - err := cmd.New().Execute() - if err != nil { - os.Exit(1) - } -} diff --git a/cmd/ocm/oscal2posture/options/options.go b/cmd/ocm/oscal2posture/options/options.go deleted file mode 100644 index 4774cae..0000000 --- a/cmd/ocm/oscal2posture/options/options.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package options - -import ( - "errors" - - "github.com/spf13/pflag" -) - -type Options struct { - ComplianceReportFile string - MdTemplateFile string -} - -func NewOptions() *Options { - return &Options{} -} - -func (o *Options) AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&o.ComplianceReportFile, "compliance-report", "", "path to a compliance report") - fs.StringVar(&o.MdTemplateFile, "template", "", "path to a template of markdown (default: pre-defined template)") -} - -func (o *Options) Complete() error { - return nil -} - -func (o *Options) Validate() error { - if o.ComplianceReportFile == "" { - return errors.New("--compliance-report is required") - } - return nil -} diff --git a/cmd/ocm/result2oscal/cmd/cmd.go b/cmd/ocm/result2oscal/cmd/cmd.go index 1328a79..dc189fa 100644 --- a/cmd/ocm/result2oscal/cmd/cmd.go +++ b/cmd/ocm/result2oscal/cmd/cmd.go @@ -70,7 +70,6 @@ func Run(options *options.Options) error { } r := reporter.NewReporter(c2pcrParsed) - r.SetGenerationType(reporter.GenerationTypePolicyReport) arRoot, err := r.Generate() if err != nil { panic(err) diff --git a/pkg/ocm/reporter/helper.go b/pkg/ocm/reporter/helper.go index e239bc8..54f04f0 100644 --- a/pkg/ocm/reporter/helper.go +++ b/pkg/ocm/reporter/helper.go @@ -17,15 +17,9 @@ limitations under the License. package reporter import ( - "fmt" - "strings" - - "github.com/IBM/compliance-to-policy/pkg" typeconfigpolicy "github.com/IBM/compliance-to-policy/pkg/types/configurationpolicy" typepolicy "github.com/IBM/compliance-to-policy/pkg/types/policy" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" typepolr "sigs.k8s.io/wg-policy-prototypes/policy-report/pkg/api/wgpolicyk8s.io/v1beta1" ) @@ -53,65 +47,6 @@ const ( PolicyResultSkip PolicyResult = "skip" ) -func ConvertToPolicyReport(policy typepolicy.Policy) typepolr.PolicyReport { - results := []*typepolr.PolicyReportResult{} - for _, pt := range policy.Spec.PolicyTemplates { - var configPolicy typeconfigpolicy.ConfigurationPolicy - if err := pkg.LoadByteToK8sTypedObject(pt.ObjectDefinition.Raw, &configPolicy); err != nil { - logger.Error(err.Error()) - continue - } - subjects := []*corev1.ObjectReference{} - descriptions := []string{} - for _, ot := range configPolicy.Spec.ObjectTemplates { - var unstObj unstructured.Unstructured - if err := pkg.LoadByteToK8sTypedObject(ot.ObjectDefinition.Raw, &unstObj); err != nil { - logger.Error(err.Error()) - continue - } - subject := corev1.ObjectReference{ - Kind: unstObj.GetKind(), - APIVersion: unstObj.GetAPIVersion(), - Name: unstObj.GetName(), - Namespace: unstObj.GetNamespace(), - } - subjects = append(subjects, &subject) - descriptions = append(descriptions, fmt.Sprintf("%s Kind:%s Name:%s", ot.ComplianceType, unstObj.GetKind(), unstObj.GetName())) - } - details := findConfigPolicyStatus(policy, configPolicy) - result := typepolr.PolicyReportResult{ - Policy: configPolicy.GetName(), - Description: strings.Join(descriptions, ","), - Subjects: subjects, - Result: mapToPolicyResult(details.ComplianceState), - Severity: mapToSeverity(configPolicy.Spec.Severity), - Properties: mapToProps(details), - Timestamp: mapToTimestamp(details), - } - results = append(results, &result) - } - policyReport := typepolr.PolicyReport{ - TypeMeta: metav1.TypeMeta{ - Kind: "PolicyReport", - APIVersion: "wgpolicyk8s.io/v1beta1", - }, - ObjectMeta: metav1.ObjectMeta{ - Namespace: policy.Namespace, - Name: policy.Name, - CreationTimestamp: metav1.Now(), - }, - Scope: &corev1.ObjectReference{ - Kind: "Policy", - APIVersion: "policy.open-cluster-management.io/v1", - Namespace: policy.Namespace, - Name: policy.Name, - }, - Results: results, - } - policyReport.Summary = summary(policyReport) - return policyReport -} - func mapToPolicyResult(complianceState typepolicy.ComplianceState) typepolr.PolicyResult { var result PolicyResult switch complianceState { diff --git a/pkg/ocm/reporter/helper_test.go b/pkg/ocm/reporter/helper_test.go deleted file mode 100644 index cc5a4c0..0000000 --- a/pkg/ocm/reporter/helper_test.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package reporter - -import ( - "fmt" - "os" - "path/filepath" - "testing" - - "github.com/IBM/compliance-to-policy/pkg" - typeplacementdecision "github.com/IBM/compliance-to-policy/pkg/types/placementdecision" - typepolicy "github.com/IBM/compliance-to-policy/pkg/types/policy" - "github.com/stretchr/testify/assert" - typepolr "sigs.k8s.io/wg-policy-prototypes/policy-report/pkg/api/wgpolicyk8s.io/v1beta1" -) - -func TestConvertToPolicyReport(t *testing.T) { - policies := []typepolicy.Policy{} - traverseFunc := genTraverseFunc( - func(policy typepolicy.Policy) { policies = append(policies, policy) }, - func(policySet typepolicy.PolicySet) {}, - func(placementDecision typeplacementdecision.PlacementDecision) {}, - ) - err := filepath.Walk(pkg.PathFromPkgDirectory("./testdata/ocm/policy-results"), traverseFunc) - assert.NoError(t, err, "Should not happen") - - tempDirPath := pkg.PathFromPkgDirectory("./testdata/_test") - err = os.MkdirAll(tempDirPath, os.ModePerm) - assert.NoError(t, err, "Should not happen") - tempDir := pkg.NewTempDirectory(tempDirPath) - - for _, policy := range policies { - policyReport := ConvertToPolicyReport(policy) - assert.NotNil(t, policyReport, "Should not happen") - fname := fmt.Sprintf("policy-report.%s.%s.yaml", policy.Namespace, policy.Name) - err = pkg.WriteObjToYamlFile(tempDir.GetTempDir()+"/"+fname, policyReport) - assert.NoError(t, err, "Should not happen") - - var expected typepolr.PolicyReport - err = pkg.LoadYamlFileToK8sTypedObject(pkg.PathFromPkgDirectory("./testdata/reports")+"/"+fname, &expected) - assert.NoError(t, err, "Should not happen") - - // Workaround: I'm not sure why empty map field is treated as nil for loaded object. Explicitly set as empty map. - for idx := range expected.Results { - if expected.Results[idx].Properties == nil { - expected.Results[idx].Properties = map[string]string{} - } - } - // Timestamp is currently set by Now(). Since the timestamp should be always different from expected one, reset creationTimestamp of expected one to actual one. - expected.CreationTimestamp = policyReport.CreationTimestamp - assert.Equal(t, expected, policyReport) - } -} diff --git a/pkg/ocm/reporter/markdown.go b/pkg/ocm/reporter/markdown.go deleted file mode 100644 index c91018d..0000000 --- a/pkg/ocm/reporter/markdown.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package reporter - -import ( - "bytes" - "embed" - "os" - "text/template" - - typereport "github.com/IBM/compliance-to-policy/pkg/types/report" -) - -//go:embed *.md -var embeddedResources embed.FS - -type Markdown struct{} - -func NewMarkdown() Markdown { - return Markdown{} -} - -func (m *Markdown) Generate(templateFile string, report typereport.ComplianceReport) ([]byte, error) { - var templateData []byte - var err error - if templateFile == "" { - templateData, err = embeddedResources.ReadFile("template.md") - } else { - templateData, err = os.ReadFile(templateFile) - } - if err != nil { - return nil, err - } - templateString := string(templateData) - tmpl, err := template.New("report.md").Parse(templateString) - if err != nil { - return nil, err - } - buffer := bytes.NewBuffer([]byte{}) - err = tmpl.Execute(buffer, report.Spec) - if err != nil { - return nil, err - } - return buffer.Bytes(), nil -} diff --git a/pkg/ocm/reporter/markdown_test.go b/pkg/ocm/reporter/markdown_test.go deleted file mode 100644 index cebd2ec..0000000 --- a/pkg/ocm/reporter/markdown_test.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2023 IBM Corporation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package reporter - -import ( - "os" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/IBM/compliance-to-policy/pkg" - typereport "github.com/IBM/compliance-to-policy/pkg/types/report" -) - -func TestMarkdown(t *testing.T) { - var report typereport.ComplianceReport - err := pkg.LoadYamlFileToK8sTypedObject(pkg.PathFromPkgDirectory("./testdata/reports/compliance-report.yaml"), &report) - assert.NoError(t, err, "Should not happen") - - markdown := NewMarkdown() - generated, err := markdown.Generate("", report) - assert.NoError(t, err, "Should not happen") - - err = os.WriteFile(pkg.PathFromPkgDirectory("./testdata/reports/compliance-report.md"), generated, os.ModePerm) - assert.NoError(t, err, "Should not happen") -} diff --git a/pkg/ocm/reporter/reporter.go b/pkg/ocm/reporter/reporter.go index 7e2738f..113ccec 100644 --- a/pkg/ocm/reporter/reporter.go +++ b/pkg/ocm/reporter/reporter.go @@ -27,7 +27,6 @@ import ( "go.uber.org/zap" sigyaml "sigs.k8s.io/yaml" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "github.com/IBM/compliance-to-policy/pkg/oscal" @@ -38,7 +37,6 @@ import ( typepolicy "github.com/IBM/compliance-to-policy/pkg/types/policy" typereport "github.com/IBM/compliance-to-policy/pkg/types/report" typeutils "github.com/IBM/compliance-to-policy/pkg/types/utils" - typepolr "sigs.k8s.io/wg-policy-prototypes/policy-report/pkg/api/wgpolicyk8s.io/v1beta1" ) var logger *zap.Logger = pkg.GetLogger("reporter") @@ -48,8 +46,6 @@ type Reporter struct { policies []*typepolicy.Policy policySets []*typepolicy.PolicySet placementDecisions []*typeplacementdecision.PlacementDecision - policyReports []*typepolr.PolicyReport - generationType GenerationType } type Reason struct { @@ -71,16 +67,10 @@ func NewReporter(c2pParsed typec2pcr.C2PCRParsed) *Reporter { policies: []*typepolicy.Policy{}, policySets: []*typepolicy.PolicySet{}, placementDecisions: []*typeplacementdecision.PlacementDecision{}, - policyReports: []*typepolr.PolicyReport{}, - generationType: GenerationTypeRaw, } return &r } -func (r *Reporter) SetGenerationType(generationType GenerationType) { - r.generationType = generationType -} - func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { traverseFunc := genTraverseFunc( func(policy typepolicy.Policy) { r.policies = append(r.policies, &policy) }, @@ -96,8 +86,6 @@ func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { inventories := []typear.InventoryItem{} clusternameIndex := map[string]bool{} for _, policy := range r.policies { - polr := ConvertToPolicyReport(*policy) - r.policyReports = append(r.policyReports, &polr) if policy.Namespace == r.c2pParsed.Namespace { for _, s := range policy.Status.Status { _, exist := clusternameIndex[s.ClusterName] @@ -159,12 +147,7 @@ func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { var ruleStatus typereport.RuleStatus subjects := []typear.Subject{} if policy != nil { - var reasons []Reason - if r.generationType == GenerationTypePolicyReport { - reasons = r.GenerateReasonsFromPolicyReports(*policy) - } else { - reasons = r.GenerateReasonsFromRawPolicies(*policy) - } + reasons := r.GenerateReasonsFromRawPolicies(*policy) ruleStatus = mapToRuleStatus(policy.Status.ComplianceState) for _, reason := range reasons { clusterName := "N/A" @@ -284,29 +267,6 @@ func (r *Reporter) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) []Re } -func (r *Reporter) GenerateReasonsFromPolicyReports(policy typepolicy.Policy) []Reason { - reasons := []Reason{} - for _, status := range policy.Status.Status { - clusterName := status.ClusterName - policyReport := findPolicyReportByNamespaceName(r.policyReports, clusterName, policy.Namespace+"."+policy.Name) - clusterHistories := []typepolicy.ComplianceHistory{} - for _, result := range policyReport.Results { - clusterHistory := typepolicy.ComplianceHistory{ - LastTimestamp: v1.NewTime(time.Unix(result.Timestamp.Seconds, int64(result.Timestamp.Nanos))), - EventName: result.Properties["eventName"], - Message: result.Properties["details"], - } - clusterHistories = append(clusterHistories, clusterHistory) - } - reasons = append(reasons, Reason{ - ClusterName: policyReport.Namespace, - ComplianceState: aggregatePolicyReportSummaryToComplianceState(policyReport.Summary), - Messages: clusterHistories, - }) - } - return reasons -} - func mapToRuleStatus(complianceState typepolicy.ComplianceState) typereport.RuleStatus { switch complianceState { case typepolicy.Compliant: @@ -320,14 +280,6 @@ func mapToRuleStatus(complianceState typepolicy.ComplianceState) typereport.Rule } } -func aggregatePolicyReportSummaryToComplianceState(summary typepolr.PolicyReportSummary) typepolicy.ComplianceState { - if summary.Pass == 0 { - return typepolicy.NonCompliant - } else { - return typepolicy.Compliant - } -} - func genTraverseFunc(onPolicy func(typepolicy.Policy), onPolicySet func(typepolicy.PolicySet), onPlacementDesicion func(typeplacementdecision.PlacementDecision)) func(path string, info os.FileInfo, err error) error { return func(path string, info os.FileInfo, err error) error { if err != nil { diff --git a/pkg/ocm/reporter/template.md b/pkg/ocm/reporter/template.md deleted file mode 100644 index 58ed2ac..0000000 --- a/pkg/ocm/reporter/template.md +++ /dev/null @@ -1,27 +0,0 @@ -## Catalog -{{.Catalog}} - -{{- range $component := .Components}} -## Component: {{$component.ComponentTitle}} - -Compliance status: {{$component.ComplianceStatus}} - -Checked controls: [{{- range $checkedControl := $component.CheckedControls}}{{$checkedControl}},{{- end}}] - -{{- range $controlResult := $component.ControlResults}} -#### Result of control: {{$controlResult.ControlId}} -**Compliance status: {{$controlResult.ComplianceStatus}}** - -Rules: -{{- range $ruleResult := $controlResult.RuleResults}} -- Rule ID: {{$ruleResult.RuleId}} -- Policy ID: {{$ruleResult.PolicyId}} -- Status: {{$ruleResult.Status}} -- Reason: -``` -{{$ruleResult.Reason}} -``` -{{- end}} ---- -{{- end}} -{{- end}} diff --git a/pkg/testdata/reports/compliance-report.md b/pkg/testdata/reports/compliance-report.md deleted file mode 100755 index e69de29..0000000 diff --git a/pkg/testdata/reports/compliance-report.yaml b/pkg/testdata/reports/compliance-report.yaml deleted file mode 100755 index e59b522..0000000 --- a/pkg/testdata/reports/compliance-report.yaml +++ /dev/null @@ -1,107 +0,0 @@ -metadata: - creationTimestamp: "2023-07-13T04:51:54Z" - name: compliance-report -spec: - catalog: Electronic Version of NIST SP 800-53 Rev 5 Controls and SP 800-53A Rev - 5 Assessment Procedures - components: - - checkedControls: - - ac-6 - - cm-2 - - cm-6 - complianceStatus: NonCompliant - componentTitle: Managed Kubernetes - controlResults: - - complianceStatus: NonCompliant - controlId: cm-6 - ruleResults: - - policyId: policy-high-scan - reason: | - - clusterName: cluster1 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-high-scan.176f1dcdc2b51b01 - lastTimestamp: "2023-07-05T23:52:34Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1ddc44adf035 - lastTimestamp: "2023-07-05T23:53:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1ddc441457e5 - lastTimestamp: "2023-07-05T23:53:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, - please check if you have CRD deployed - - clusterName: cluster2 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-high-scan.176f1dc3684f9eb6 - lastTimestamp: "2023-07-05T23:51:50Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1dc426d20948 - lastTimestamp: "2023-07-05T23:51:53Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, - please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1dc4e29e1221 - lastTimestamp: "2023-07-05T23:51:56Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, - please check if you have CRD deployed - ruleId: test_configuration_check - status: fail - - complianceStatus: NonCompliant - controlId: cm-2 - ruleResults: - - policyId: policy-deployment - reason: | - - clusterName: cluster1 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-deployment.176f1ddc5591cb1c - lastTimestamp: "2023-07-05T23:53:37Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] - in namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease - missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] - in namespace local-path-storage missing' - - clusterName: cluster2 - complianceState: NonCompliant - messages: - - eventName: c2p.policy-deployment.176f1dc4e7de17cb - lastTimestamp: "2023-07-05T23:51:56Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] - in namespace cluster2 missing; [nginx-deployment] in namespace default missing; - [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] - in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage - missing' - ruleId: test_proxy_check - status: fail - - complianceStatus: Compliant - controlId: ac-6 - ruleResults: - - policyId: policy-disallowed-roles - reason: | - - clusterName: cluster1 - complianceState: Compliant - messages: - - eventName: c2p.policy-disallowed-roles.176f1dcdc4c8d17e - lastTimestamp: "2023-07-05T23:52:34Z" - message: Compliant; notification - roles in namespace cluster1; in namespace default; - in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage - missing as expected, therefore this Object template is compliant - - clusterName: cluster2 - complianceState: Compliant - messages: - - eventName: c2p.policy-disallowed-roles.176f1dc36e36b7b2 - lastTimestamp: "2023-07-05T23:51:50Z" - message: Compliant; notification - roles in namespace cluster2; in namespace default; - in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage - missing as expected, therefore this Object template is compliant - ruleId: test_rbac_check - status: pass - parameters: - minimum_nginx_deployment_replicas: "3" - requiredControls: - - ac-6 - - cm-2 - - cm-6 - profile: NIST Special Publication 800-53 Revision 5 Customized BASELINE diff --git a/pkg/testdata/reports/policy-report.c2p.policy-deployment.yaml b/pkg/testdata/reports/policy-report.c2p.policy-deployment.yaml deleted file mode 100755 index d65591e..0000000 --- a/pkg/testdata/reports/policy-report.c2p.policy-deployment.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: policy-deployment - namespace: c2p -results: -- message: musthave Kind:Deployment Name:nginx-deployment - policy: policy-deployment - resources: - - apiVersion: apps/v1 - kind: Deployment - name: nginx-deployment - result: error - severity: low - source: "" - timestamp: - nanos: 0 - seconds: 0 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: policy-deployment - namespace: c2p -source: "" -summary: - error: 1 - fail: 0 - pass: 0 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.c2p.policy-disallowed-roles.yaml b/pkg/testdata/reports/policy-report.c2p.policy-disallowed-roles.yaml deleted file mode 100755 index 560842b..0000000 --- a/pkg/testdata/reports/policy-report.c2p.policy-disallowed-roles.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: policy-disallowed-roles - namespace: c2p -results: -- message: 'mustnothave Kind:Role Name:' - policy: policy-disallowed-roles - resources: - - apiVersion: rbac.authorization.k8s.io/v1 - kind: Role - result: error - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 0 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: policy-disallowed-roles - namespace: c2p -source: "" -summary: - error: 1 - fail: 0 - pass: 0 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.c2p.policy-high-scan.yaml b/pkg/testdata/reports/policy-report.c2p.policy-high-scan.yaml deleted file mode 100755 index b06dc5c..0000000 --- a/pkg/testdata/reports/policy-report.c2p.policy-high-scan.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: policy-high-scan - namespace: c2p -results: -- message: musthave Kind:ScanSettingBinding Name:high - policy: policy-high-scan - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ScanSettingBinding - name: high - namespace: openshift-compliance - result: error - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 0 -- message: musthave Kind:ComplianceSuite Name:high - policy: policy-high-scan2 - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceSuite - name: high - namespace: openshift-compliance - result: error - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 0 -- message: 'mustnothave Kind:ComplianceCheckResult Name:' - policy: policy-high-scan3 - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceCheckResult - namespace: openshift-compliance - result: error - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 0 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: policy-high-scan - namespace: c2p -source: "" -summary: - error: 3 - fail: 0 - pass: 0 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.cluster1.c2p.policy-deployment.yaml b/pkg/testdata/reports/policy-report.cluster1.c2p.policy-deployment.yaml deleted file mode 100755 index 07c616f..0000000 --- a/pkg/testdata/reports/policy-report.cluster1.c2p.policy-deployment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: c2p.policy-deployment - namespace: cluster1 -results: -- message: musthave Kind:Deployment Name:nginx-deployment - policy: policy-deployment - properties: - details: 'NonCompliant; violation - deployments not found: [nginx-deployment] - in namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease - missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] - in namespace local-path-storage missing' - eventName: c2p.policy-deployment.176f1ddc5591cb1c - lastTimestamp: 2023-07-06 08:53:37 +0900 JST - resources: - - apiVersion: apps/v1 - kind: Deployment - name: nginx-deployment - result: fail - severity: low - source: "" - timestamp: - nanos: 0 - seconds: 1688601217 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: c2p.policy-deployment - namespace: cluster1 -source: "" -summary: - error: 0 - fail: 1 - pass: 0 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.cluster1.c2p.policy-disallowed-roles.yaml b/pkg/testdata/reports/policy-report.cluster1.c2p.policy-disallowed-roles.yaml deleted file mode 100755 index 8291d08..0000000 --- a/pkg/testdata/reports/policy-report.cluster1.c2p.policy-disallowed-roles.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: c2p.policy-disallowed-roles - namespace: cluster1 -results: -- message: 'mustnothave Kind:Role Name:' - policy: policy-disallowed-roles - properties: - details: Compliant; notification - roles in namespace cluster1; in namespace default; - in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage - missing as expected, therefore this Object template is compliant - eventName: c2p.policy-disallowed-roles.176f1dcdc4c8d17e - lastTimestamp: 2023-07-06 08:52:34 +0900 JST - resources: - - apiVersion: rbac.authorization.k8s.io/v1 - kind: Role - result: pass - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601154 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: c2p.policy-disallowed-roles - namespace: cluster1 -source: "" -summary: - error: 0 - fail: 0 - pass: 1 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.cluster1.c2p.policy-high-scan.yaml b/pkg/testdata/reports/policy-report.cluster1.c2p.policy-high-scan.yaml deleted file mode 100755 index 56ac958..0000000 --- a/pkg/testdata/reports/policy-report.cluster1.c2p.policy-high-scan.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: c2p.policy-high-scan - namespace: cluster1 -results: -- message: musthave Kind:ScanSettingBinding Name:high - policy: policy-high-scan - properties: - details: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, - please check if you have CRD deployed - eventName: c2p.policy-high-scan.176f1dcdc2b51b01 - lastTimestamp: 2023-07-06 08:52:34 +0900 JST - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ScanSettingBinding - name: high - namespace: openshift-compliance - result: fail - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601154 -- message: musthave Kind:ComplianceSuite Name:high - policy: policy-high-scan2 - properties: - details: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, - please check if you have CRD deployed - eventName: c2p.policy-high-scan.176f1ddc44adf035 - lastTimestamp: 2023-07-06 08:53:37 +0900 JST - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceSuite - name: high - namespace: openshift-compliance - result: fail - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601217 -- message: 'mustnothave Kind:ComplianceCheckResult Name:' - policy: policy-high-scan3 - properties: - details: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, - please check if you have CRD deployed - eventName: c2p.policy-high-scan.176f1ddc441457e5 - lastTimestamp: 2023-07-06 08:53:37 +0900 JST - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceCheckResult - namespace: openshift-compliance - result: fail - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601217 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: c2p.policy-high-scan - namespace: cluster1 -source: "" -summary: - error: 0 - fail: 3 - pass: 0 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.cluster2.c2p.policy-deployment.yaml b/pkg/testdata/reports/policy-report.cluster2.c2p.policy-deployment.yaml deleted file mode 100755 index c175001..0000000 --- a/pkg/testdata/reports/policy-report.cluster2.c2p.policy-deployment.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: c2p.policy-deployment - namespace: cluster2 -results: -- message: musthave Kind:Deployment Name:nginx-deployment - policy: policy-deployment - properties: - details: 'NonCompliant; violation - deployments not found: [nginx-deployment] - in namespace cluster2 missing; [nginx-deployment] in namespace default missing; - [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] - in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage - missing' - eventName: c2p.policy-deployment.176f1dc4e7de17cb - lastTimestamp: 2023-07-06 08:51:56 +0900 JST - resources: - - apiVersion: apps/v1 - kind: Deployment - name: nginx-deployment - result: fail - severity: low - source: "" - timestamp: - nanos: 0 - seconds: 1688601116 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: c2p.policy-deployment - namespace: cluster2 -source: "" -summary: - error: 0 - fail: 1 - pass: 0 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.cluster2.c2p.policy-disallowed-roles.yaml b/pkg/testdata/reports/policy-report.cluster2.c2p.policy-disallowed-roles.yaml deleted file mode 100755 index b5416e4..0000000 --- a/pkg/testdata/reports/policy-report.cluster2.c2p.policy-disallowed-roles.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: c2p.policy-disallowed-roles - namespace: cluster2 -results: -- message: 'mustnothave Kind:Role Name:' - policy: policy-disallowed-roles - properties: - details: Compliant; notification - roles in namespace cluster2; in namespace default; - in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage - missing as expected, therefore this Object template is compliant - eventName: c2p.policy-disallowed-roles.176f1dc36e36b7b2 - lastTimestamp: 2023-07-06 08:51:50 +0900 JST - resources: - - apiVersion: rbac.authorization.k8s.io/v1 - kind: Role - result: pass - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601110 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: c2p.policy-disallowed-roles - namespace: cluster2 -source: "" -summary: - error: 0 - fail: 0 - pass: 1 - skip: 0 - warn: 0 diff --git a/pkg/testdata/reports/policy-report.cluster2.c2p.policy-high-scan.yaml b/pkg/testdata/reports/policy-report.cluster2.c2p.policy-high-scan.yaml deleted file mode 100755 index 09dd187..0000000 --- a/pkg/testdata/reports/policy-report.cluster2.c2p.policy-high-scan.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: wgpolicyk8s.io/v1beta1 -kind: PolicyReport -metadata: - creationTimestamp: "2023-07-13T03:45:31Z" - name: c2p.policy-high-scan - namespace: cluster2 -results: -- message: musthave Kind:ScanSettingBinding Name:high - policy: policy-high-scan - properties: - details: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, - please check if you have CRD deployed - eventName: c2p.policy-high-scan.176f1dc3684f9eb6 - lastTimestamp: 2023-07-06 08:51:50 +0900 JST - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ScanSettingBinding - name: high - namespace: openshift-compliance - result: fail - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601110 -- message: musthave Kind:ComplianceSuite Name:high - policy: policy-high-scan2 - properties: - details: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, - please check if you have CRD deployed - eventName: c2p.policy-high-scan.176f1dc426d20948 - lastTimestamp: 2023-07-06 08:51:53 +0900 JST - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceSuite - name: high - namespace: openshift-compliance - result: fail - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601113 -- message: 'mustnothave Kind:ComplianceCheckResult Name:' - policy: policy-high-scan3 - properties: - details: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, - please check if you have CRD deployed - eventName: c2p.policy-high-scan.176f1dc4e29e1221 - lastTimestamp: 2023-07-06 08:51:56 +0900 JST - resources: - - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceCheckResult - namespace: openshift-compliance - result: fail - severity: high - source: "" - timestamp: - nanos: 0 - seconds: 1688601116 -scope: - apiVersion: policy.open-cluster-management.io/v1 - kind: Policy - name: c2p.policy-high-scan - namespace: cluster2 -source: "" -summary: - error: 0 - fail: 3 - pass: 0 - skip: 0 - warn: 0 From 73ee110b943c7916745746469855bb9a457c289c Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 16:25:02 +0900 Subject: [PATCH 04/13] Rename reporter to result2oscal Signed-off-by: Takumi Yanagawa --- cmd/ocm/result2oscal/cmd/cmd.go | 4 ++-- pkg/ocm/{reporter => }/helper.go | 2 +- pkg/ocm/{reporter/reporter.go => result2oscal.go} | 15 ++++++--------- .../reporter_test.go => result2oscal_test.go} | 6 +++--- 4 files changed, 12 insertions(+), 15 deletions(-) rename pkg/ocm/{reporter => }/helper.go (99%) rename pkg/ocm/{reporter/reporter.go => result2oscal.go} (96%) rename pkg/ocm/{reporter/reporter_test.go => result2oscal_test.go} (97%) diff --git a/cmd/ocm/result2oscal/cmd/cmd.go b/cmd/ocm/result2oscal/cmd/cmd.go index dc189fa..9c1b761 100644 --- a/cmd/ocm/result2oscal/cmd/cmd.go +++ b/cmd/ocm/result2oscal/cmd/cmd.go @@ -24,7 +24,7 @@ import ( "github.com/IBM/compliance-to-policy/cmd/ocm/result2oscal/options" "github.com/IBM/compliance-to-policy/pkg" "github.com/IBM/compliance-to-policy/pkg/c2pcr" - "github.com/IBM/compliance-to-policy/pkg/ocm/reporter" + "github.com/IBM/compliance-to-policy/pkg/ocm" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" ) @@ -69,7 +69,7 @@ func Run(options *options.Options) error { panic(err) } - r := reporter.NewReporter(c2pcrParsed) + r := ocm.NewResultToOscal(c2pcrParsed) arRoot, err := r.Generate() if err != nil { panic(err) diff --git a/pkg/ocm/reporter/helper.go b/pkg/ocm/helper.go similarity index 99% rename from pkg/ocm/reporter/helper.go rename to pkg/ocm/helper.go index 54f04f0..c99ef5f 100644 --- a/pkg/ocm/reporter/helper.go +++ b/pkg/ocm/helper.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package reporter +package ocm import ( typeconfigpolicy "github.com/IBM/compliance-to-policy/pkg/types/configurationpolicy" diff --git a/pkg/ocm/reporter/reporter.go b/pkg/ocm/result2oscal.go similarity index 96% rename from pkg/ocm/reporter/reporter.go rename to pkg/ocm/result2oscal.go index 113ccec..987952f 100644 --- a/pkg/ocm/reporter/reporter.go +++ b/pkg/ocm/result2oscal.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package reporter +package ocm import ( "fmt" @@ -24,7 +24,6 @@ import ( "time" "github.com/IBM/compliance-to-policy/pkg" - "go.uber.org/zap" sigyaml "sigs.k8s.io/yaml" "k8s.io/apimachinery/pkg/util/sets" @@ -39,9 +38,7 @@ import ( typeutils "github.com/IBM/compliance-to-policy/pkg/types/utils" ) -var logger *zap.Logger = pkg.GetLogger("reporter") - -type Reporter struct { +type ResultToOscal struct { c2pParsed typec2pcr.C2PCRParsed policies []*typepolicy.Policy policySets []*typepolicy.PolicySet @@ -61,8 +58,8 @@ const ( GenerationTypePolicyReport GenerationType = "policy-report" ) -func NewReporter(c2pParsed typec2pcr.C2PCRParsed) *Reporter { - r := Reporter{ +func NewResultToOscal(c2pParsed typec2pcr.C2PCRParsed) *ResultToOscal { + r := ResultToOscal{ c2pParsed: c2pParsed, policies: []*typepolicy.Policy{}, policySets: []*typepolicy.PolicySet{}, @@ -71,7 +68,7 @@ func NewReporter(c2pParsed typec2pcr.C2PCRParsed) *Reporter { return &r } -func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { +func (r *ResultToOscal) Generate() (*typear.AssessmentResultsRoot, error) { traverseFunc := genTraverseFunc( func(policy typepolicy.Policy) { r.policies = append(r.policies, &policy) }, func(policySet typepolicy.PolicySet) { r.policySets = append(r.policySets, &policySet) }, @@ -243,7 +240,7 @@ func (r *Reporter) Generate() (*typear.AssessmentResultsRoot, error) { return &arRoot, nil } -func (r *Reporter) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) []Reason { +func (r *ResultToOscal) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) []Reason { reasons := []Reason{} for _, status := range policy.Status.Status { clusterName := status.ClusterName diff --git a/pkg/ocm/reporter/reporter_test.go b/pkg/ocm/result2oscal_test.go similarity index 97% rename from pkg/ocm/reporter/reporter_test.go rename to pkg/ocm/result2oscal_test.go index 5d258ef..20a06df 100644 --- a/pkg/ocm/reporter/reporter_test.go +++ b/pkg/ocm/result2oscal_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package reporter +package ocm import ( "os" @@ -29,7 +29,7 @@ import ( "github.com/stretchr/testify/assert" ) -func TestReporter(t *testing.T) { +func TestResult2Oscal(t *testing.T) { policyDir := pkg.PathFromPkgDirectory("./testdata/ocm/policies") policyResultsDir := pkg.PathFromPkgDirectory("./testdata/ocm/policy-results") @@ -79,7 +79,7 @@ func TestReporter(t *testing.T) { c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) assert.NoError(t, err, "Should not happen") - reporter := NewReporter(c2pcrParsed) + reporter := NewResultToOscal(c2pcrParsed) arRoot, err := reporter.Generate() assert.NoError(t, err, "Should not happen") From bdbd11078a63eb4e6ee0d0c0ba2c076e6b46c234 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 19:07:20 +0900 Subject: [PATCH 05/13] Use List typed object Signed-off-by: Takumi Yanagawa --- pkg/ocm/result2oscal.go | 89 ++++------ ...lacement-managed-kubernetes-decision-1.yml | 24 --- .../Policy.c2p.policy-deployment.yml | 72 -------- .../Policy.c2p.policy-disallowed-roles.yml | 60 ------- .../Policy.c2p.policy-high-scan.yml | 119 -------------- .../Policy.cluster1.c2p.policy-deployment.yml | 80 --------- ...y.cluster1.c2p.policy-disallowed-roles.yml | 68 -------- .../Policy.cluster1.c2p.policy-high-scan.yml | 155 ------------------ .../Policy.cluster2.c2p.policy-deployment.yml | 80 --------- ...y.cluster2.c2p.policy-disallowed-roles.yml | 65 -------- .../Policy.cluster2.c2p.policy-high-scan.yml | 146 ----------------- .../PolicySet.c2p.managed-kubernetes.yml | 25 --- ...s.cluster.open-cluster-management.io.yaml} | 0 ...es.policy.open-cluster-management.io.yaml} | 0 ...ts.policy.open-cluster-management.io.yaml} | 0 pkg/types/policy/policyset_types.go | 7 + 16 files changed, 37 insertions(+), 953 deletions(-) delete mode 100644 pkg/testdata/ocm/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.c2p.policy-deployment.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.c2p.policy-disallowed-roles.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.c2p.policy-high-scan.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-deployment.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-high-scan.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-deployment.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml delete mode 100644 pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-high-scan.yml delete mode 100644 pkg/testdata/ocm/policy-results/PolicySet.c2p.managed-kubernetes.yml rename pkg/testdata/ocm/policy-results/{00.placementdecisions.yaml => placementdecisions.cluster.open-cluster-management.io.yaml} (100%) rename pkg/testdata/ocm/policy-results/{00.policies.yaml => policies.policy.open-cluster-management.io.yaml} (100%) rename pkg/testdata/ocm/policy-results/{00.policysets.yaml => policysets.policy.open-cluster-management.io.yaml} (100%) diff --git a/pkg/ocm/result2oscal.go b/pkg/ocm/result2oscal.go index 987952f..01953b9 100644 --- a/pkg/ocm/result2oscal.go +++ b/pkg/ocm/result2oscal.go @@ -18,9 +18,6 @@ package ocm import ( "fmt" - "os" - "path/filepath" - "strings" "time" "github.com/IBM/compliance-to-policy/pkg" @@ -69,15 +66,29 @@ func NewResultToOscal(c2pParsed typec2pcr.C2PCRParsed) *ResultToOscal { } func (r *ResultToOscal) Generate() (*typear.AssessmentResultsRoot, error) { - traverseFunc := genTraverseFunc( - func(policy typepolicy.Policy) { r.policies = append(r.policies, &policy) }, - func(policySet typepolicy.PolicySet) { r.policySets = append(r.policySets, &policySet) }, - func(placementDecision typeplacementdecision.PlacementDecision) { - r.placementDecisions = append(r.placementDecisions, &placementDecision) - }, - ) - if err := filepath.Walk(r.c2pParsed.PolicyResultsDir, traverseFunc); err != nil { - logger.Error(err.Error()) + + var policyList typepolicy.PolicyList + if err := r.loadData("policies.policy.open-cluster-management.io.yaml", &policyList); err != nil { + return nil, err + } + for idx := range policyList.Items { + r.policies = append(r.policies, &policyList.Items[idx]) + } + + var policySetList typepolicy.PolicySetList + if err := r.loadData("policysets.policy.open-cluster-management.io.yaml", &policySetList); err != nil { + return nil, err + } + for idx := range policySetList.Items { + r.policySets = append(r.policySets, &policySetList.Items[idx]) + } + + var placementDecisionLost typeplacementdecision.PlacementDecisionList + if err := r.loadData("placementdecisions.cluster.open-cluster-management.io.yaml", &placementDecisionLost); err != nil { + return nil, err + } + for idx := range placementDecisionLost.Items { + r.placementDecisions = append(r.placementDecisions, &placementDecisionLost.Items[idx]) } inventories := []typear.InventoryItem{} @@ -264,6 +275,13 @@ func (r *ResultToOscal) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) } +func (r *ResultToOscal) loadData(path string, out interface{}) error { + if err := pkg.LoadYamlFileToK8sTypedObject(r.c2pParsed.PolicyResultsDir+path, &out); err != nil { + return err + } + return nil +} + func mapToRuleStatus(complianceState typepolicy.ComplianceState) typereport.RuleStatus { switch complianceState { case typepolicy.Compliant: @@ -276,50 +294,3 @@ func mapToRuleStatus(complianceState typepolicy.ComplianceState) typereport.Rule return typereport.RuleStatusError } } - -func genTraverseFunc(onPolicy func(typepolicy.Policy), onPolicySet func(typepolicy.PolicySet), onPlacementDesicion func(typeplacementdecision.PlacementDecision)) func(path string, info os.FileInfo, err error) error { - return func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if !info.IsDir() { - kind, _, _, ok := parseFileName(info.Name()) - if ok { - switch kind { - case "Policy": - var policy typepolicy.Policy - if err := pkg.LoadYamlFileToK8sTypedObject(path, &policy); err != nil { - return err - } - onPolicy(policy) - case "PolicySet": - var policySet typepolicy.PolicySet - if err := pkg.LoadYamlFileToK8sTypedObject(path, &policySet); err != nil { - return err - } - onPolicySet(policySet) - case "PlacementDecision": - var placementDecision typeplacementdecision.PlacementDecision - if err := pkg.LoadYamlFileToK8sTypedObject(path, &placementDecision); err != nil { - return err - } - onPlacementDesicion(placementDecision) - } - } - } - return nil - } -} - -func parseFileName(fname string) (kind string, namespace string, name string, ok bool) { - splitted := strings.Split(fname, ".") - if len(splitted) >= 4 { - kind = splitted[0] - namespace = splitted[1] - name = strings.Join(splitted[2:len(splitted)-2], ".") - ok = true - } else { - ok = false - } - return -} diff --git a/pkg/testdata/ocm/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml b/pkg/testdata/ocm/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml deleted file mode 100644 index 841913a..0000000 --- a/pkg/testdata/ocm/policy-results/PlacementDecision.c2p.placement-managed-kubernetes-decision-1.yml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: cluster.open-cluster-management.io/v1beta1 -kind: PlacementDecision -metadata: - creationTimestamp: "2023-07-05T16:10:56Z" - generation: 1 - labels: - cluster.open-cluster-management.io/placement: placement-managed-kubernetes - name: placement-managed-kubernetes-decision-1 - namespace: c2p - ownerReferences: - - apiVersion: cluster.open-cluster-management.io/v1beta1 - blockOwnerDeletion: true - controller: true - kind: Placement - name: placement-managed-kubernetes - uid: fb698906-ffbc-4483-afc1-e87cd6048858 - resourceVersion: "127345" - uid: 78e9e593-8ca7-48f2-86af-0306238cdedc -status: - decisions: - - clusterName: cluster1 - reason: "" - - clusterName: cluster2 - reason: "" diff --git a/pkg/testdata/ocm/policy-results/Policy.c2p.policy-deployment.yml b/pkg/testdata/ocm/policy-results/Policy.c2p.policy-deployment.yml deleted file mode 100644 index a46f33d..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.c2p.policy-deployment.yml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"cm-2","policy.open-cluster-management.io/standards":""},"name":"policy-deployment","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-deployment"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"labels":{"app":"nginx"},"name":"nginx-deployment"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"image":"nginx:1.21.4","name":"nginx","ports":[{"containerPort":80}]}]}}}}}],"remediationAction":"inform","severity":"low"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: cm-2 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T16:10:56Z" - generation: 2 - name: policy-deployment - namespace: c2p - resourceVersion: "58942" - uid: 55fb6d11-cdf5-43a6-8848-7076ea3c02ba -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-deployment - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: apps/v1 - kind: Deployment - metadata: - labels: - app: nginx - name: nginx-deployment - spec: - replicas: 3 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - image: nginx:1.21.4 - name: nginx - ports: - - containerPort: 80 - remediationAction: inform - severity: low - remediationAction: inform -status: - compliant: NonCompliant - placement: - - placement: placement-managed-kubernetes - placementBinding: policy-set - policySet: managed-kubernetes - status: - - clustername: cluster1 - clusternamespace: cluster1 - compliant: NonCompliant - - clustername: cluster2 - clusternamespace: cluster2 - compliant: NonCompliant diff --git a/pkg/testdata/ocm/policy-results/Policy.c2p.policy-disallowed-roles.yml b/pkg/testdata/ocm/policy-results/Policy.c2p.policy-disallowed-roles.yml deleted file mode 100644 index 4a5b446..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.c2p.policy-disallowed-roles.yml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"ac-6","policy.open-cluster-management.io/standards":""},"name":"policy-disallowed-roles","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-disallowed-roles"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"mustnothave","objectDefinition":{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"Role","rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["*"]}]}}],"remediationAction":"inform","severity":"high"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: ac-6 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T16:10:56Z" - generation: 2 - name: policy-disallowed-roles - namespace: c2p - resourceVersion: "58945" - uid: 3aa8b4b0-6aa0-4635-a55d-342a9f38660e -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-disallowed-roles - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: mustnothave - objectDefinition: - apiVersion: rbac.authorization.k8s.io/v1 - kind: Role - rules: - - apiGroups: - - '*' - resources: - - '*' - verbs: - - '*' - remediationAction: inform - severity: high - remediationAction: inform -status: - compliant: Compliant - placement: - - placement: placement-managed-kubernetes - placementBinding: policy-set - policySet: managed-kubernetes - status: - - clustername: cluster1 - clusternamespace: cluster1 - compliant: Compliant - - clustername: cluster2 - clusternamespace: cluster2 - compliant: Compliant diff --git a/pkg/testdata/ocm/policy-results/Policy.c2p.policy-high-scan.yml b/pkg/testdata/ocm/policy-results/Policy.c2p.policy-high-scan.yml deleted file mode 100644 index 1c76fe6..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.c2p.policy-high-scan.yml +++ /dev/null @@ -1,119 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"cm-6","policy.open-cluster-management.io/standards":""},"name":"policy-high-scan","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ScanSettingBinding","metadata":{"name":"high","namespace":"openshift-compliance"},"profiles":[{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"Profile","name":"ocp4-high"},{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"Profile","name":"ocp4-high-node"}],"settingsRef":{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"ScanSetting","name":"default"}}}],"remediationAction":"inform","severity":"high"}}},{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan2"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ComplianceSuite","metadata":{"name":"high","namespace":"openshift-compliance"},"status":{"phase":"DONE"}}}],"remediationAction":"inform","severity":"high"}}},{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan3"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"mustnothave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ComplianceCheckResult","metadata":{"labels":{"compliance.openshift.io/check-status":"FAIL","compliance.openshift.io/suite":"high"},"namespace":"openshift-compliance"}}}],"remediationAction":"inform","severity":"high"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: cm-6 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T16:10:56Z" - generation: 2 - name: policy-high-scan - namespace: c2p - resourceVersion: "58952" - uid: 1e829f28-a2e6-4b5b-9b58-d18c11730841 -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ScanSettingBinding - metadata: - name: high - namespace: openshift-compliance - profiles: - - apiGroup: compliance.openshift.io/v1alpha1 - kind: Profile - name: ocp4-high - - apiGroup: compliance.openshift.io/v1alpha1 - kind: Profile - name: ocp4-high-node - settingsRef: - apiGroup: compliance.openshift.io/v1alpha1 - kind: ScanSetting - name: default - remediationAction: inform - severity: high - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan2 - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceSuite - metadata: - name: high - namespace: openshift-compliance - status: - phase: DONE - remediationAction: inform - severity: high - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan3 - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: mustnothave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceCheckResult - metadata: - labels: - compliance.openshift.io/check-status: FAIL - compliance.openshift.io/suite: high - namespace: openshift-compliance - remediationAction: inform - severity: high - remediationAction: inform -status: - compliant: NonCompliant - placement: - - placement: placement-managed-kubernetes - placementBinding: policy-set - policySet: managed-kubernetes - status: - - clustername: cluster1 - clusternamespace: cluster1 - compliant: NonCompliant - - clustername: cluster2 - clusternamespace: cluster2 - compliant: NonCompliant diff --git a/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-deployment.yml b/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-deployment.yml deleted file mode 100644 index 76a31bd..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-deployment.yml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"cm-2","policy.open-cluster-management.io/standards":""},"name":"policy-deployment","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-deployment"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"labels":{"app":"nginx"},"name":"nginx-deployment"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"image":"nginx:1.21.4","name":"nginx","ports":[{"containerPort":80}]}]}}}}}],"remediationAction":"inform","severity":"low"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: cm-2 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T23:52:32Z" - generation: 1 - labels: - policy.open-cluster-management.io/cluster-name: cluster1 - policy.open-cluster-management.io/cluster-namespace: cluster1 - policy.open-cluster-management.io/root-policy: c2p.policy-deployment - name: c2p.policy-deployment - namespace: cluster1 - resourceVersion: "58997" - uid: 3d7bf6b3-4332-4195-81b4-d343a847c3f8 -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-deployment - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: apps/v1 - kind: Deployment - metadata: - labels: - app: nginx - name: nginx-deployment - spec: - replicas: 3 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - image: nginx:1.21.4 - name: nginx - ports: - - containerPort: 80 - remediationAction: inform - severity: low - remediationAction: inform -status: - compliant: NonCompliant - details: - - compliant: NonCompliant - history: - - eventName: c2p.policy-deployment.176f1ddc5591cb1c - lastTimestamp: "2023-07-05T23:53:37Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage missing' - - eventName: c2p.policy-deployment.176f1dc090333b1b - lastTimestamp: "2023-07-05T23:51:38Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage missing' - - eventName: c2p.policy-deployment.176f1bee3daf20de - lastTimestamp: "2023-07-05T23:18:15Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in namespace cluster1 missing; [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage missing' - templateMeta: - creationTimestamp: null - name: policy-deployment diff --git a/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml b/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml deleted file mode 100644 index 8961127..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-disallowed-roles.yml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"ac-6","policy.open-cluster-management.io/standards":""},"name":"policy-disallowed-roles","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-disallowed-roles"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"mustnothave","objectDefinition":{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"Role","rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["*"]}]}}],"remediationAction":"inform","severity":"high"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: ac-6 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T23:52:32Z" - generation: 1 - labels: - policy.open-cluster-management.io/cluster-name: cluster1 - policy.open-cluster-management.io/cluster-namespace: cluster1 - policy.open-cluster-management.io/root-policy: c2p.policy-disallowed-roles - name: c2p.policy-disallowed-roles - namespace: cluster1 - resourceVersion: "58962" - uid: dea67078-25f4-4c45-9e55-01796af1999e -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-disallowed-roles - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: mustnothave - objectDefinition: - apiVersion: rbac.authorization.k8s.io/v1 - kind: Role - rules: - - apiGroups: - - '*' - resources: - - '*' - verbs: - - '*' - remediationAction: inform - severity: high - remediationAction: inform -status: - compliant: Compliant - details: - - compliant: Compliant - history: - - eventName: c2p.policy-disallowed-roles.176f1dcdc4c8d17e - lastTimestamp: "2023-07-05T23:52:34Z" - message: Compliant; notification - roles in namespace cluster1; in namespace default; in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage missing as expected, therefore this Object template is compliant - - eventName: c2p.policy-disallowed-roles.176f1cd7a1623786 - lastTimestamp: "2023-07-05T23:34:57Z" - message: Compliant; notification - roles in namespace cluster1; in namespace default; in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage missing as expected, therefore this Object template is compliant - - eventName: c2p.policy-disallowed-roles.176f1bee3d61b1f3 - lastTimestamp: "2023-07-05T23:18:15Z" - message: Compliant; notification - roles in namespace cluster1; in namespace default; in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage missing as expected, therefore this Object template is compliant - templateMeta: - creationTimestamp: null - name: policy-disallowed-roles diff --git a/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-high-scan.yml b/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-high-scan.yml deleted file mode 100644 index d51355b..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.cluster1.c2p.policy-high-scan.yml +++ /dev/null @@ -1,155 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"cm-6","policy.open-cluster-management.io/standards":""},"name":"policy-high-scan","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ScanSettingBinding","metadata":{"name":"high","namespace":"openshift-compliance"},"profiles":[{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"Profile","name":"ocp4-high"},{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"Profile","name":"ocp4-high-node"}],"settingsRef":{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"ScanSetting","name":"default"}}}],"remediationAction":"inform","severity":"high"}}},{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan2"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ComplianceSuite","metadata":{"name":"high","namespace":"openshift-compliance"},"status":{"phase":"DONE"}}}],"remediationAction":"inform","severity":"high"}}},{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan3"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"mustnothave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ComplianceCheckResult","metadata":{"labels":{"compliance.openshift.io/check-status":"FAIL","compliance.openshift.io/suite":"high"},"namespace":"openshift-compliance"}}}],"remediationAction":"inform","severity":"high"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: cm-6 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T23:52:32Z" - generation: 1 - labels: - policy.open-cluster-management.io/cluster-name: cluster1 - policy.open-cluster-management.io/cluster-namespace: cluster1 - policy.open-cluster-management.io/root-policy: c2p.policy-high-scan - name: c2p.policy-high-scan - namespace: cluster1 - resourceVersion: "58991" - uid: 4007f281-2977-42c4-ab42-cf0fb8563f56 -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ScanSettingBinding - metadata: - name: high - namespace: openshift-compliance - profiles: - - apiGroup: compliance.openshift.io/v1alpha1 - kind: Profile - name: ocp4-high - - apiGroup: compliance.openshift.io/v1alpha1 - kind: Profile - name: ocp4-high-node - settingsRef: - apiGroup: compliance.openshift.io/v1alpha1 - kind: ScanSetting - name: default - remediationAction: inform - severity: high - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan2 - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceSuite - metadata: - name: high - namespace: openshift-compliance - status: - phase: DONE - remediationAction: inform - severity: high - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan3 - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: mustnothave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceCheckResult - metadata: - labels: - compliance.openshift.io/check-status: FAIL - compliance.openshift.io/suite: high - namespace: openshift-compliance - remediationAction: inform - severity: high - remediationAction: inform -status: - compliant: NonCompliant - details: - - compliant: NonCompliant - history: - - eventName: c2p.policy-high-scan.176f1dcdc2b51b01 - lastTimestamp: "2023-07-05T23:52:34Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1cd79ed5ce45 - lastTimestamp: "2023-07-05T23:34:57Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1bef5d9a8c7c - lastTimestamp: "2023-07-05T23:18:20Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, please check if you have CRD deployed - templateMeta: - creationTimestamp: null - name: policy-high-scan - - compliant: NonCompliant - history: - - eventName: c2p.policy-high-scan.176f1ddc44adf035 - lastTimestamp: "2023-07-05T23:53:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1dc08583a394 - lastTimestamp: "2023-07-05T23:51:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1bef5e40c973 - lastTimestamp: "2023-07-05T23:18:20Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, please check if you have CRD deployed - templateMeta: - creationTimestamp: null - name: policy-high-scan2 - - compliant: NonCompliant - history: - - eventName: c2p.policy-high-scan.176f1ddc441457e5 - lastTimestamp: "2023-07-05T23:53:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1dc085241b09 - lastTimestamp: "2023-07-05T23:51:37Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1bf01c04e351 - lastTimestamp: "2023-07-05T23:18:23Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, please check if you have CRD deployed - templateMeta: - creationTimestamp: null - name: policy-high-scan3 diff --git a/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-deployment.yml b/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-deployment.yml deleted file mode 100644 index bacc5ec..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-deployment.yml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"cm-2","policy.open-cluster-management.io/standards":""},"name":"policy-deployment","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-deployment"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"labels":{"app":"nginx"},"name":"nginx-deployment"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"image":"nginx:1.21.4","name":"nginx","ports":[{"containerPort":80}]}]}}}}}],"remediationAction":"inform","severity":"low"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: cm-2 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T23:51:43Z" - generation: 1 - labels: - policy.open-cluster-management.io/cluster-name: cluster2 - policy.open-cluster-management.io/cluster-namespace: cluster2 - policy.open-cluster-management.io/root-policy: c2p.policy-deployment - name: c2p.policy-deployment - namespace: cluster2 - resourceVersion: "58322" - uid: 25080d0e-e6cf-4f39-94cb-04a7d01d6cfe -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-deployment - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: apps/v1 - kind: Deployment - metadata: - labels: - app: nginx - name: nginx-deployment - spec: - replicas: 3 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - image: nginx:1.21.4 - name: nginx - ports: - - containerPort: 80 - remediationAction: inform - severity: low - remediationAction: inform -status: - compliant: NonCompliant - details: - - compliant: NonCompliant - history: - - eventName: c2p.policy-deployment.176f1dc4e7de17cb - lastTimestamp: "2023-07-05T23:51:56Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in namespace cluster2 missing; [nginx-deployment] in namespace default missing; [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage missing' - - eventName: c2p.policy-deployment.176f1bf28b594e3c - lastTimestamp: "2023-07-05T23:18:33Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in namespace cluster2 missing; [nginx-deployment] in namespace default missing; [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage missing' - - eventName: c2p.policy-deployment.176f1bf06f3be6c5 - lastTimestamp: "2023-07-05T23:18:24Z" - message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in namespace cluster2 missing; [nginx-deployment] in namespace default missing; [nginx-deployment] in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public missing; [nginx-deployment] in namespace local-path-storage missing' - templateMeta: - creationTimestamp: null - name: policy-deployment diff --git a/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml b/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml deleted file mode 100644 index 901fc6a..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-disallowed-roles.yml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"ac-6","policy.open-cluster-management.io/standards":""},"name":"policy-disallowed-roles","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-disallowed-roles"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"mustnothave","objectDefinition":{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"Role","rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["*"]}]}}],"remediationAction":"inform","severity":"high"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: ac-6 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T23:51:43Z" - generation: 1 - labels: - policy.open-cluster-management.io/cluster-name: cluster2 - policy.open-cluster-management.io/cluster-namespace: cluster2 - policy.open-cluster-management.io/root-policy: c2p.policy-disallowed-roles - name: c2p.policy-disallowed-roles - namespace: cluster2 - resourceVersion: "58171" - uid: fb2bed28-f7be-4ad3-9df2-00f26600feb7 -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-disallowed-roles - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: mustnothave - objectDefinition: - apiVersion: rbac.authorization.k8s.io/v1 - kind: Role - rules: - - apiGroups: - - '*' - resources: - - '*' - verbs: - - '*' - remediationAction: inform - severity: high - remediationAction: inform -status: - compliant: Compliant - details: - - compliant: Compliant - history: - - eventName: c2p.policy-disallowed-roles.176f1dc36e36b7b2 - lastTimestamp: "2023-07-05T23:51:50Z" - message: Compliant; notification - roles in namespace cluster2; in namespace default; in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage missing as expected, therefore this Object template is compliant - - eventName: c2p.policy-disallowed-roles.176f1bf28b48947f - lastTimestamp: "2023-07-05T23:18:33Z" - message: Compliant; notification - roles in namespace cluster2; in namespace default; in namespace kube-node-lease; in namespace kube-public; in namespace local-path-storage missing as expected, therefore this Object template is compliant - templateMeta: - creationTimestamp: null - name: policy-disallowed-roles diff --git a/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-high-scan.yml b/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-high-scan.yml deleted file mode 100644 index 913e48d..0000000 --- a/pkg/testdata/ocm/policy-results/Policy.cluster2.c2p.policy-high-scan.yml +++ /dev/null @@ -1,146 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1 -kind: Policy -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1","kind":"Policy","metadata":{"annotations":{"policy.open-cluster-management.io/categories":"","policy.open-cluster-management.io/controls":"cm-6","policy.open-cluster-management.io/standards":""},"name":"policy-high-scan","namespace":"c2p"},"spec":{"disabled":false,"policy-templates":[{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ScanSettingBinding","metadata":{"name":"high","namespace":"openshift-compliance"},"profiles":[{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"Profile","name":"ocp4-high"},{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"Profile","name":"ocp4-high-node"}],"settingsRef":{"apiGroup":"compliance.openshift.io/v1alpha1","kind":"ScanSetting","name":"default"}}}],"remediationAction":"inform","severity":"high"}}},{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan2"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"musthave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ComplianceSuite","metadata":{"name":"high","namespace":"openshift-compliance"},"status":{"phase":"DONE"}}}],"remediationAction":"inform","severity":"high"}}},{"objectDefinition":{"apiVersion":"policy.open-cluster-management.io/v1","kind":"ConfigurationPolicy","metadata":{"name":"policy-high-scan3"},"spec":{"namespaceSelector":{"exclude":["kube-system","open-cluster-management","open-cluster-management-agent","open-cluster-management-agent-addon"],"include":["*"]},"object-templates":[{"complianceType":"mustnothave","objectDefinition":{"apiVersion":"compliance.openshift.io/v1alpha1","kind":"ComplianceCheckResult","metadata":{"labels":{"compliance.openshift.io/check-status":"FAIL","compliance.openshift.io/suite":"high"},"namespace":"openshift-compliance"}}}],"remediationAction":"inform","severity":"high"}}}],"remediationAction":"inform"}} - policy.open-cluster-management.io/categories: "" - policy.open-cluster-management.io/controls: cm-6 - policy.open-cluster-management.io/standards: "" - creationTimestamp: "2023-07-05T23:51:43Z" - generation: 1 - labels: - policy.open-cluster-management.io/cluster-name: cluster2 - policy.open-cluster-management.io/cluster-namespace: cluster2 - policy.open-cluster-management.io/root-policy: c2p.policy-high-scan - name: c2p.policy-high-scan - namespace: cluster2 - resourceVersion: "58319" - uid: 38eb6af4-5b3f-4a8b-aa1b-f066cd7a3ed8 -spec: - disabled: false - policy-templates: - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ScanSettingBinding - metadata: - name: high - namespace: openshift-compliance - profiles: - - apiGroup: compliance.openshift.io/v1alpha1 - kind: Profile - name: ocp4-high - - apiGroup: compliance.openshift.io/v1alpha1 - kind: Profile - name: ocp4-high-node - settingsRef: - apiGroup: compliance.openshift.io/v1alpha1 - kind: ScanSetting - name: default - remediationAction: inform - severity: high - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan2 - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: musthave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceSuite - metadata: - name: high - namespace: openshift-compliance - status: - phase: DONE - remediationAction: inform - severity: high - - objectDefinition: - apiVersion: policy.open-cluster-management.io/v1 - kind: ConfigurationPolicy - metadata: - name: policy-high-scan3 - spec: - namespaceSelector: - exclude: - - kube-system - - open-cluster-management - - open-cluster-management-agent - - open-cluster-management-agent-addon - include: - - '*' - object-templates: - - complianceType: mustnothave - objectDefinition: - apiVersion: compliance.openshift.io/v1alpha1 - kind: ComplianceCheckResult - metadata: - labels: - compliance.openshift.io/check-status: FAIL - compliance.openshift.io/suite: high - namespace: openshift-compliance - remediationAction: inform - severity: high - remediationAction: inform -status: - compliant: NonCompliant - details: - - compliant: NonCompliant - history: - - eventName: c2p.policy-high-scan.176f1dc3684f9eb6 - lastTimestamp: "2023-07-05T23:51:50Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1ccd9a7768a0 - lastTimestamp: "2023-07-05T23:34:14Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, please check if you have CRD deployed - templateMeta: - creationTimestamp: null - name: policy-high-scan - - compliant: NonCompliant - history: - - eventName: c2p.policy-high-scan.176f1dc426d20948 - lastTimestamp: "2023-07-05T23:51:53Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1ccd9a7af3da - lastTimestamp: "2023-07-05T23:34:14Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, please check if you have CRD deployed - templateMeta: - creationTimestamp: null - name: policy-high-scan2 - - compliant: NonCompliant - history: - - eventName: c2p.policy-high-scan.176f1dc4e29e1221 - lastTimestamp: "2023-07-05T23:51:56Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, please check if you have CRD deployed - - eventName: c2p.policy-high-scan.176f1cce592bc71e - lastTimestamp: "2023-07-05T23:34:17Z" - message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, please check if you have CRD deployed - templateMeta: - creationTimestamp: null - name: policy-high-scan3 diff --git a/pkg/testdata/ocm/policy-results/PolicySet.c2p.managed-kubernetes.yml b/pkg/testdata/ocm/policy-results/PolicySet.c2p.managed-kubernetes.yml deleted file mode 100644 index 09b2109..0000000 --- a/pkg/testdata/ocm/policy-results/PolicySet.c2p.managed-kubernetes.yml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: policy.open-cluster-management.io/v1beta1 -kind: PolicySet -metadata: - annotations: - compliance-to-policy.component-title: Managed Kubernetes - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"policy.open-cluster-management.io/v1beta1","kind":"PolicySet","metadata":{"annotations":{"compliance-to-policy.component-title":"Managed Kubernetes"},"name":"managed-kubernetes","namespace":"c2p"},"spec":{"description":"","policies":["policy-deployment","policy-disallowed-roles","policy-high-scan"]}} - creationTimestamp: "2023-07-05T16:10:56Z" - generation: 1 - name: managed-kubernetes - namespace: c2p - resourceVersion: "80787" - uid: 1ac57f03-4782-4ef8-8b65-08384e36971f -spec: - description: "" - policies: - - policy-deployment - - policy-disallowed-roles - - policy-high-scan -status: - compliant: NonCompliant - placement: - - placement: placement-managed-kubernetes - placementBinding: policy-set - statusMessage: All policies are reporting status diff --git a/pkg/testdata/ocm/policy-results/00.placementdecisions.yaml b/pkg/testdata/ocm/policy-results/placementdecisions.cluster.open-cluster-management.io.yaml similarity index 100% rename from pkg/testdata/ocm/policy-results/00.placementdecisions.yaml rename to pkg/testdata/ocm/policy-results/placementdecisions.cluster.open-cluster-management.io.yaml diff --git a/pkg/testdata/ocm/policy-results/00.policies.yaml b/pkg/testdata/ocm/policy-results/policies.policy.open-cluster-management.io.yaml similarity index 100% rename from pkg/testdata/ocm/policy-results/00.policies.yaml rename to pkg/testdata/ocm/policy-results/policies.policy.open-cluster-management.io.yaml diff --git a/pkg/testdata/ocm/policy-results/00.policysets.yaml b/pkg/testdata/ocm/policy-results/policysets.policy.open-cluster-management.io.yaml similarity index 100% rename from pkg/testdata/ocm/policy-results/00.policysets.yaml rename to pkg/testdata/ocm/policy-results/policysets.policy.open-cluster-management.io.yaml diff --git a/pkg/types/policy/policyset_types.go b/pkg/types/policy/policyset_types.go index 21eda2e..83a126b 100644 --- a/pkg/types/policy/policyset_types.go +++ b/pkg/types/policy/policyset_types.go @@ -58,3 +58,10 @@ type PolicySet struct { Spec PolicySetSpec `json:"spec"` Status PolicySetStatus `json:"status,omitempty"` } + +// PolicySetList contains a list of PolicySet +type PolicySetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PolicySet `json:"items"` +} From 7dce15b062227ac0f209e832dd78bc8cf0d64e7c Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 19:57:15 +0900 Subject: [PATCH 06/13] -o option in result2oscal points output file instead of directory Signed-off-by: Takumi Yanagawa --- cmd/kyverno/result2oscal/cmd/cmd.go | 9 ++------- cmd/kyverno/result2oscal/options/options.go | 4 ++-- cmd/ocm/result2oscal/cmd/cmd.go | 11 +++-------- cmd/ocm/result2oscal/options/options.go | 4 ++-- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/cmd/kyverno/result2oscal/cmd/cmd.go b/cmd/kyverno/result2oscal/cmd/cmd.go index 2cf4860..3024cd4 100644 --- a/cmd/kyverno/result2oscal/cmd/cmd.go +++ b/cmd/kyverno/result2oscal/cmd/cmd.go @@ -17,8 +17,6 @@ limitations under the License. package cmd import ( - "os" - "github.com/spf13/cobra" "github.com/IBM/compliance-to-policy/cmd/kyverno/result2oscal/options" @@ -51,10 +49,7 @@ func New() *cobra.Command { } func Run(options *options.Options) error { - outputDir, c2pcrPath, tempDirPath := options.OutputDir, options.C2PCRPath, options.TempDirPath - if err := os.MkdirAll(outputDir, os.ModePerm); err != nil { - panic(err) - } + outputPath, c2pcrPath, tempDirPath := options.OutputPath, options.C2PCRPath, options.TempDirPath var c2pcrSpec typec2pcr.Spec if err := pkg.LoadYamlFileToObject(c2pcrPath, &c2pcrSpec); err != nil { @@ -74,7 +69,7 @@ func Run(options *options.Options) error { return err } - err = pkg.WriteObjToJsonFile(outputDir+"/assessment-results.json", ar) + err = pkg.WriteObjToJsonFile(outputPath, ar) if err != nil { return err } diff --git a/cmd/kyverno/result2oscal/options/options.go b/cmd/kyverno/result2oscal/options/options.go index bbb31d5..333a2c5 100644 --- a/cmd/kyverno/result2oscal/options/options.go +++ b/cmd/kyverno/result2oscal/options/options.go @@ -25,7 +25,7 @@ import ( type Options struct { C2PCRPath string TempDirPath string - OutputDir string + OutputPath string } func NewOptions() *Options { @@ -35,7 +35,7 @@ func NewOptions() *Options { func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.StringVarP(&o.C2PCRPath, "config", "c", "", "path to c2p-config.yaml") fs.StringVar(&o.TempDirPath, "temp-dir", "", "path to temp directory") - fs.StringVarP(&o.OutputDir, "out", "o", ".", "path to a directory for output files") + fs.StringVarP(&o.OutputPath, "out", "o", "./assessment-results.json", "path to output OSCAL Assessment Results") } func (o *Options) Complete() error { diff --git a/cmd/ocm/result2oscal/cmd/cmd.go b/cmd/ocm/result2oscal/cmd/cmd.go index 9c1b761..47ac5d9 100644 --- a/cmd/ocm/result2oscal/cmd/cmd.go +++ b/cmd/ocm/result2oscal/cmd/cmd.go @@ -17,8 +17,6 @@ limitations under the License. package cmd import ( - "os" - "github.com/spf13/cobra" "github.com/IBM/compliance-to-policy/cmd/ocm/result2oscal/options" @@ -52,10 +50,7 @@ func New() *cobra.Command { } func Run(options *options.Options) error { - outputDir, c2pcrPath, tempDirPath := options.OutputDir, options.C2PCRPath, options.TempDirPath - if err := os.MkdirAll(outputDir, os.ModePerm); err != nil { - panic(err) - } + outputPath, c2pcrPath, tempDirPath := options.OutputPath, options.C2PCRPath, options.TempDirPath var c2pcrSpec typec2pcr.Spec if err := pkg.LoadYamlFileToObject(c2pcrPath, &c2pcrSpec); err != nil { @@ -75,9 +70,9 @@ func Run(options *options.Options) error { panic(err) } - err = pkg.WriteObjToJsonFile(outputDir+"/assessment-results.json", arRoot) + err = pkg.WriteObjToJsonFile(outputPath, arRoot) if err != nil { - panic(err) + return err } return nil diff --git a/cmd/ocm/result2oscal/options/options.go b/cmd/ocm/result2oscal/options/options.go index 01ab6b3..9571886 100644 --- a/cmd/ocm/result2oscal/options/options.go +++ b/cmd/ocm/result2oscal/options/options.go @@ -25,7 +25,7 @@ import ( type Options struct { C2PCRPath string TempDirPath string - OutputDir string + OutputPath string } func NewOptions() *Options { @@ -35,7 +35,7 @@ func NewOptions() *Options { func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.StringVarP(&o.C2PCRPath, "config", "c", "", "path to c2p config file") fs.StringVar(&o.TempDirPath, "temp-dir", "", "path to temp directory") - fs.StringVarP(&o.OutputDir, "out", "o", ".", "path to a directory for output files") + fs.StringVarP(&o.OutputPath, "out", "o", "./assessment-results.json", "path to output OSCAL Assessment Results") } func (o *Options) Complete() error { From ca148ddf64b07e8f26a0feac28dfe0a26dfd66ca Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 20:01:54 +0900 Subject: [PATCH 07/13] consolidate c2p configfile parser in each pvp Signed-off-by: Takumi Yanagawa --- cmd/ocm/oscal2policy/cmd/cmd.go | 3 +-- cmd/ocm/result2oscal/cmd/cmd.go | 3 +-- pkg/kyverno/oscal2policy_test.go | 3 +-- pkg/{c2pcr/parser.go => ocm/configparser.go} | 5 +---- pkg/ocm/oscal2policy_test.go | 3 +-- pkg/ocm/result2oscal_test.go | 3 +-- 6 files changed, 6 insertions(+), 14 deletions(-) rename pkg/{c2pcr/parser.go => ocm/configparser.go} (97%) diff --git a/cmd/ocm/oscal2policy/cmd/cmd.go b/cmd/ocm/oscal2policy/cmd/cmd.go index 4984b91..c3df179 100644 --- a/cmd/ocm/oscal2policy/cmd/cmd.go +++ b/cmd/ocm/oscal2policy/cmd/cmd.go @@ -24,7 +24,6 @@ import ( "github.com/IBM/compliance-to-policy/cmd/ocm/oscal2policy/options" "github.com/IBM/compliance-to-policy/pkg" - "github.com/IBM/compliance-to-policy/pkg/c2pcr" "github.com/IBM/compliance-to-policy/pkg/ocm" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" ) @@ -63,7 +62,7 @@ func Run(options *options.Options) error { } gitUtils := pkg.NewGitUtils(pkg.NewTempDirectory(options.TempDirPath)) - c2pcrParser := c2pcr.NewParser(gitUtils) + c2pcrParser := ocm.NewParser(gitUtils) c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) if err != nil { panic(err) diff --git a/cmd/ocm/result2oscal/cmd/cmd.go b/cmd/ocm/result2oscal/cmd/cmd.go index 47ac5d9..e0a50ca 100644 --- a/cmd/ocm/result2oscal/cmd/cmd.go +++ b/cmd/ocm/result2oscal/cmd/cmd.go @@ -21,7 +21,6 @@ import ( "github.com/IBM/compliance-to-policy/cmd/ocm/result2oscal/options" "github.com/IBM/compliance-to-policy/pkg" - "github.com/IBM/compliance-to-policy/pkg/c2pcr" "github.com/IBM/compliance-to-policy/pkg/ocm" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" ) @@ -58,7 +57,7 @@ func Run(options *options.Options) error { } gitUtils := pkg.NewGitUtils(pkg.NewTempDirectory(tempDirPath)) - c2pcrParser := c2pcr.NewParser(gitUtils) + c2pcrParser := ocm.NewParser(gitUtils) c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) if err != nil { panic(err) diff --git a/pkg/kyverno/oscal2policy_test.go b/pkg/kyverno/oscal2policy_test.go index bedc8d9..f708fde 100644 --- a/pkg/kyverno/oscal2policy_test.go +++ b/pkg/kyverno/oscal2policy_test.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/IBM/compliance-to-policy/pkg" - "github.com/IBM/compliance-to-policy/pkg/c2pcr" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" "github.com/stretchr/testify/assert" ) @@ -71,7 +70,7 @@ func TestOscal2Policy(t *testing.T) { Namespace: "", }, } - c2pcrParser := c2pcr.NewParser(gitUtils) + c2pcrParser := NewParser(gitUtils) c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) assert.NoError(t, err, "Should not happen") diff --git a/pkg/c2pcr/parser.go b/pkg/ocm/configparser.go similarity index 97% rename from pkg/c2pcr/parser.go rename to pkg/ocm/configparser.go index a2c12dd..ec023aa 100644 --- a/pkg/c2pcr/parser.go +++ b/pkg/ocm/configparser.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package c2pcr +package ocm import ( "fmt" @@ -22,11 +22,8 @@ import ( "github.com/IBM/compliance-to-policy/pkg" "github.com/IBM/compliance-to-policy/pkg/oscal" "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" - "go.uber.org/zap" ) -var logger *zap.Logger = pkg.GetLogger("c2pcr") - type C2PCRParser struct { gitUtils pkg.GitUtils } diff --git a/pkg/ocm/oscal2policy_test.go b/pkg/ocm/oscal2policy_test.go index 8b09b08..fc4a0ee 100644 --- a/pkg/ocm/oscal2policy_test.go +++ b/pkg/ocm/oscal2policy_test.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/IBM/compliance-to-policy/pkg" - "github.com/IBM/compliance-to-policy/pkg/c2pcr" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" "github.com/stretchr/testify/assert" ) @@ -70,7 +69,7 @@ func TestOscal2Policy(t *testing.T) { Namespace: "", }, } - c2pcrParser := c2pcr.NewParser(gitUtils) + c2pcrParser := NewParser(gitUtils) c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) assert.NoError(t, err, "Should not happen") diff --git a/pkg/ocm/result2oscal_test.go b/pkg/ocm/result2oscal_test.go index 20a06df..849b4a6 100644 --- a/pkg/ocm/result2oscal_test.go +++ b/pkg/ocm/result2oscal_test.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/IBM/compliance-to-policy/pkg" - "github.com/IBM/compliance-to-policy/pkg/c2pcr" typec2pcr "github.com/IBM/compliance-to-policy/pkg/types/c2pcr" typear "github.com/IBM/compliance-to-policy/pkg/types/oscal/assessmentresults" "github.com/google/go-cmp/cmp" @@ -75,7 +74,7 @@ func TestResult2Oscal(t *testing.T) { Namespace: "c2p", }, } - c2pcrParser := c2pcr.NewParser(gitUtils) + c2pcrParser := NewParser(gitUtils) c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) assert.NoError(t, err, "Should not happen") From 2a07afa25b947e98b82004b6715977f0b91fc2fd Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 20:39:34 +0900 Subject: [PATCH 08/13] add --results option to specify path to the directory of Policy Results Signed-off-by: Takumi Yanagawa --- cmd/kyverno/result2oscal/cmd/cmd.go | 4 ++-- cmd/kyverno/result2oscal/options/options.go | 11 ++++++--- cmd/ocm/oscal2policy/c2p-config.yaml | 22 ------------------ cmd/ocm/result2oscal/c2p-config.yaml | 22 ------------------ cmd/ocm/result2oscal/cmd/cmd.go | 4 ++-- cmd/ocm/result2oscal/options/options.go | 11 ++++++--- docs/ocm.md | 25 +++++++++++++++++++++ pkg/kyverno/configparser.go | 4 ---- pkg/kyverno/oscal2policy_test.go | 3 --- pkg/kyverno/result2oscal.go | 6 +++-- pkg/ocm/configparser.go | 4 ---- pkg/ocm/oscal2policy_test.go | 3 --- pkg/ocm/result2oscal.go | 6 +++-- pkg/ocm/result2oscal_test.go | 9 +------- 14 files changed, 54 insertions(+), 80 deletions(-) delete mode 100644 cmd/ocm/oscal2policy/c2p-config.yaml delete mode 100644 cmd/ocm/result2oscal/c2p-config.yaml diff --git a/cmd/kyverno/result2oscal/cmd/cmd.go b/cmd/kyverno/result2oscal/cmd/cmd.go index 3024cd4..4fcaae7 100644 --- a/cmd/kyverno/result2oscal/cmd/cmd.go +++ b/cmd/kyverno/result2oscal/cmd/cmd.go @@ -49,7 +49,7 @@ func New() *cobra.Command { } func Run(options *options.Options) error { - outputPath, c2pcrPath, tempDirPath := options.OutputPath, options.C2PCRPath, options.TempDirPath + outputPath, c2pcrPath, policyResultsDir, tempDirPath := options.OutputPath, options.C2PCRPath, options.PolicyResultsDir, options.TempDirPath var c2pcrSpec typec2pcr.Spec if err := pkg.LoadYamlFileToObject(c2pcrPath, &c2pcrSpec); err != nil { @@ -63,7 +63,7 @@ func Run(options *options.Options) error { panic(err) } - r := kyverno.NewResultToOscal(c2pcrParsed) + r := kyverno.NewResultToOscal(c2pcrParsed, policyResultsDir) ar, err := r.GenerateAssessmentResults() if err != nil { return err diff --git a/cmd/kyverno/result2oscal/options/options.go b/cmd/kyverno/result2oscal/options/options.go index 333a2c5..4cda40d 100644 --- a/cmd/kyverno/result2oscal/options/options.go +++ b/cmd/kyverno/result2oscal/options/options.go @@ -23,9 +23,10 @@ import ( ) type Options struct { - C2PCRPath string - TempDirPath string - OutputPath string + C2PCRPath string + PolicyResultsDir string + TempDirPath string + OutputPath string } func NewOptions() *Options { @@ -34,6 +35,7 @@ func NewOptions() *Options { func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.StringVarP(&o.C2PCRPath, "config", "c", "", "path to c2p-config.yaml") + fs.StringVar(&o.PolicyResultsDir, "results", "", "path to directory containing Kyverno Policies List (policies.kyverno.io.yaml), ClusterPolicies List (clusterpolicies.kyverno.io.yaml), PolicyReports List (policyreports.wgpolicyk8s.io.yaml), and ClusterPolicyReports List (clusterpolicyreports.wgpolicyk8s.io.yaml)") fs.StringVar(&o.TempDirPath, "temp-dir", "", "path to temp directory") fs.StringVarP(&o.OutputPath, "out", "o", "./assessment-results.json", "path to output OSCAL Assessment Results") } @@ -46,5 +48,8 @@ func (o *Options) Validate() error { if o.C2PCRPath == "" { return errors.New("-c or --config is required") } + if o.PolicyResultsDir == "" { + return errors.New("--results is required") + } return nil } diff --git a/cmd/ocm/oscal2policy/c2p-config.yaml b/cmd/ocm/oscal2policy/c2p-config.yaml deleted file mode 100644 index 1cd541a..0000000 --- a/cmd/ocm/oscal2policy/c2p-config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -compliance: - name: Test Compliance # name of compliance - catalog: - url: ./pkg/composer/testdata/oscal/catalog.json - profile: - url: ./pkg/composer/testdata/oscal/profile.json - componentDefinition: - url: ./pkg/composer/testdata/oscal/component-definition.json -policyResources: - url: ./pkg/composer/testdata/ocm/policies -policyResults: - url: a/b/c -clusterGroups: - - name: cluster-nist-high # name of clusterGroup - matchLabels: - level: nist-high # label's key value pair of clusterlabel -binding: - compliance: NIST_SP-800-53-HIGH # compliance name - clusterGroups: - - cluster-nist-high # clusterGroup name -target: - namespace: "" # namespace to which C2P deploys generated resources \ No newline at end of file diff --git a/cmd/ocm/result2oscal/c2p-config.yaml b/cmd/ocm/result2oscal/c2p-config.yaml deleted file mode 100644 index 225c511..0000000 --- a/cmd/ocm/result2oscal/c2p-config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -compliance: - name: Test Compliance # name of compliance - catalog: - url: ./pkg/testdata/oscal/reporter-test/catalog.json - profile: - url: ./pkg/testdata/oscal/reporter-test/profile.json - componentDefinition: - url: ./pkg/testdata/oscal/reporter-test/component-definition.json -policyResources: - url: ./pkg/testdata/ocm/policies -policyResults: - url: ./pkg/testdata/ocm/policy-results -clusterGroups: - - name: test-group # name of clusterGroup - matchLabels: - environment: test # label's key value pair of clusterlabel -binding: - compliance: Test Complianc # compliance name - clusterGroups: - - test-group # clusterGroup name -target: - namespace: c2p # namespace to which C2P deploys generated resources \ No newline at end of file diff --git a/cmd/ocm/result2oscal/cmd/cmd.go b/cmd/ocm/result2oscal/cmd/cmd.go index e0a50ca..87cb305 100644 --- a/cmd/ocm/result2oscal/cmd/cmd.go +++ b/cmd/ocm/result2oscal/cmd/cmd.go @@ -49,7 +49,7 @@ func New() *cobra.Command { } func Run(options *options.Options) error { - outputPath, c2pcrPath, tempDirPath := options.OutputPath, options.C2PCRPath, options.TempDirPath + outputPath, c2pcrPath, policyResultsDir, tempDirPath := options.OutputPath, options.C2PCRPath, options.PolicyResultsDir, options.TempDirPath var c2pcrSpec typec2pcr.Spec if err := pkg.LoadYamlFileToObject(c2pcrPath, &c2pcrSpec); err != nil { @@ -63,7 +63,7 @@ func Run(options *options.Options) error { panic(err) } - r := ocm.NewResultToOscal(c2pcrParsed) + r := ocm.NewResultToOscal(c2pcrParsed, policyResultsDir) arRoot, err := r.Generate() if err != nil { panic(err) diff --git a/cmd/ocm/result2oscal/options/options.go b/cmd/ocm/result2oscal/options/options.go index 9571886..7a9e3fe 100644 --- a/cmd/ocm/result2oscal/options/options.go +++ b/cmd/ocm/result2oscal/options/options.go @@ -23,9 +23,10 @@ import ( ) type Options struct { - C2PCRPath string - TempDirPath string - OutputPath string + C2PCRPath string + PolicyResultsDir string + TempDirPath string + OutputPath string } func NewOptions() *Options { @@ -34,6 +35,7 @@ func NewOptions() *Options { func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.StringVarP(&o.C2PCRPath, "config", "c", "", "path to c2p config file") + fs.StringVar(&o.PolicyResultsDir, "results", "", "path to directory containing OCM Policy List (placementdecisions.cluster.open-cluster-management.io.yaml), OCM PolicySet List (policysets.policy.open-cluster-management.io.yaml), and OCM PlacementDecisions List (placementdecisions.cluster.open-cluster-management.io.yaml)") fs.StringVar(&o.TempDirPath, "temp-dir", "", "path to temp directory") fs.StringVarP(&o.OutputPath, "out", "o", "./assessment-results.json", "path to output OSCAL Assessment Results") } @@ -46,5 +48,8 @@ func (o *Options) Validate() error { if o.C2PCRPath == "" { return errors.New("-c or --config is required") } + if o.PolicyResultsDir == "" { + return errors.New("--results is required") + } return nil } diff --git a/docs/ocm.md b/docs/ocm.md index b30ac71..039fb1d 100644 --- a/docs/ocm.md +++ b/docs/ocm.md @@ -3,6 +3,31 @@ ### Prerequisites 1. Install [Policy Generator Plugin](https://github.com/open-cluster-management-io/policy-generator-plugin#as-a-kustomize-plugin) +### Manual end-to-end use case +1. Run oscal2policy + ``` + c2pcli ocm oscal2policy -c c2p-config.yaml -o ./ocm-policies + ``` +1. Deploy generated OCM Policies to OCM Hub + ``` + kubectl create -f ./ocm-policies + ``` +1. Get OCM Policies from OCM Hub + ``` + mkdir results + kubectl get policies.policy.open-cluster-management.io -A -o yaml > ./results/policies.policy.open-cluster-management.io.yaml + kubectl get policies.policy.open-cluster-management.io -A -o yaml > ./results/policies.policy.open-cluster-management.io.yaml + kubectl get policysets.policy.open-cluster-management.io -A -o yaml > ./results/policysets.policy.open-cluster-management.io.yaml + ``` +1. Run result2oscal + ``` + c2pcli ocm result2oscal -c c2p-config.yaml --results ./results -o ./assessment-results.json + ``` +1. (Optional) Prettify OSCAL Assessment Results in .md format + ``` + c2pcli ocm oscal2posture -c c2p-config.yaml --assessment-results ./assessment-results.json -o compliance-posture.md + ``` + ### C2P Decomposer Decompose OCM poicy collection to kubernetes resources composing each OCM policy (we call it policy resource). diff --git a/pkg/kyverno/configparser.go b/pkg/kyverno/configparser.go index b6a39c7..a85b70d 100644 --- a/pkg/kyverno/configparser.go +++ b/pkg/kyverno/configparser.go @@ -46,10 +46,6 @@ func (p *C2PCRParser) Parse(c2pcrSpec c2pcr.Spec) (c2pcr.C2PCRParsed, error) { if err != nil { return parsed, err } - parsed.PolicyResultsDir, err = p.loadResourceFromUrl(c2pcrSpec.PolicyRersults.Url) - if err != nil { - return parsed, err - } logger.Info(fmt.Sprintf("Component-definition is loaded from %s", c2pcrSpec.Compliance.ComponentDefinition.Url)) if err := p.gitUtils.LoadFromGit(c2pcrSpec.Compliance.ComponentDefinition.Url, &parsed.ComponentDefinition); err != nil { diff --git a/pkg/kyverno/oscal2policy_test.go b/pkg/kyverno/oscal2policy_test.go index f708fde..8dc2d5c 100644 --- a/pkg/kyverno/oscal2policy_test.go +++ b/pkg/kyverno/oscal2policy_test.go @@ -55,9 +55,6 @@ func TestOscal2Policy(t *testing.T) { PolicyResources: typec2pcr.ResourceRef{ Url: policyDir, }, - PolicyRersults: typec2pcr.ResourceRef{ - Url: "/1/2/3", - }, ClusterGroups: []typec2pcr.ClusterGroup{{ Name: "test-group", MatchLabels: &map[string]string{"environment": "test"}, diff --git a/pkg/kyverno/result2oscal.go b/pkg/kyverno/result2oscal.go index 3dfcb12..7cb7500 100644 --- a/pkg/kyverno/result2oscal.go +++ b/pkg/kyverno/result2oscal.go @@ -35,6 +35,7 @@ import ( type ResultToOscal struct { logger *zap.Logger c2pParsed typec2pcr.C2PCRParsed + policyResultsDir string policyReportList *typepolr.PolicyReportList clusterPolicyReportList *typepolr.ClusterPolicyReportList policyList *kyvernov1.PolicyList @@ -51,10 +52,11 @@ type PolicyResourceIndexContainer struct { ControlIds []string } -func NewResultToOscal(c2pParsed typec2pcr.C2PCRParsed) *ResultToOscal { +func NewResultToOscal(c2pParsed typec2pcr.C2PCRParsed, policyResultsDir string) *ResultToOscal { r := ResultToOscal{ logger: pkg.GetLogger("kyverno/result2oscal"), c2pParsed: c2pParsed, + policyResultsDir: policyResultsDir, policyReportList: &typepolr.PolicyReportList{}, clusterPolicyReportList: &typepolr.ClusterPolicyReportList{}, policyList: &kyvernov1.PolicyList{}, @@ -121,7 +123,7 @@ func (r *ResultToOscal) retrievePolicyReportResults(name string) []*typepolr.Pol } func (r *ResultToOscal) loadData(path string, out interface{}) error { - if err := pkg.LoadYamlFileToK8sTypedObject(r.c2pParsed.PolicyResultsDir+path, &out); err != nil { + if err := pkg.LoadYamlFileToK8sTypedObject(r.policyResultsDir+"/"+path, &out); err != nil { return err } return nil diff --git a/pkg/ocm/configparser.go b/pkg/ocm/configparser.go index ec023aa..2ce0fed 100644 --- a/pkg/ocm/configparser.go +++ b/pkg/ocm/configparser.go @@ -43,10 +43,6 @@ func (p *C2PCRParser) Parse(c2pcrSpec c2pcr.Spec) (c2pcr.C2PCRParsed, error) { if err != nil { return parsed, err } - parsed.PolicyResultsDir, err = p.loadResourceFromUrl(c2pcrSpec.PolicyRersults.Url) - if err != nil { - return parsed, err - } logger.Info(fmt.Sprintf("Component-definition is loaded from %s", c2pcrSpec.Compliance.ComponentDefinition.Url)) if err := p.gitUtils.LoadFromGit(c2pcrSpec.Compliance.ComponentDefinition.Url, &parsed.ComponentDefinition); err != nil { diff --git a/pkg/ocm/oscal2policy_test.go b/pkg/ocm/oscal2policy_test.go index fc4a0ee..1e62d8f 100644 --- a/pkg/ocm/oscal2policy_test.go +++ b/pkg/ocm/oscal2policy_test.go @@ -54,9 +54,6 @@ func TestOscal2Policy(t *testing.T) { PolicyResources: typec2pcr.ResourceRef{ Url: policyDir, }, - PolicyRersults: typec2pcr.ResourceRef{ - Url: "/1/2/3", - }, ClusterGroups: []typec2pcr.ClusterGroup{{ Name: "test-group", MatchLabels: &map[string]string{"environment": "test"}, diff --git a/pkg/ocm/result2oscal.go b/pkg/ocm/result2oscal.go index 01953b9..b7e6a5b 100644 --- a/pkg/ocm/result2oscal.go +++ b/pkg/ocm/result2oscal.go @@ -37,6 +37,7 @@ import ( type ResultToOscal struct { c2pParsed typec2pcr.C2PCRParsed + policyResultsDir string policies []*typepolicy.Policy policySets []*typepolicy.PolicySet placementDecisions []*typeplacementdecision.PlacementDecision @@ -55,9 +56,10 @@ const ( GenerationTypePolicyReport GenerationType = "policy-report" ) -func NewResultToOscal(c2pParsed typec2pcr.C2PCRParsed) *ResultToOscal { +func NewResultToOscal(c2pParsed typec2pcr.C2PCRParsed, policyResultsDir string) *ResultToOscal { r := ResultToOscal{ c2pParsed: c2pParsed, + policyResultsDir: policyResultsDir, policies: []*typepolicy.Policy{}, policySets: []*typepolicy.PolicySet{}, placementDecisions: []*typeplacementdecision.PlacementDecision{}, @@ -276,7 +278,7 @@ func (r *ResultToOscal) GenerateReasonsFromRawPolicies(policy typepolicy.Policy) } func (r *ResultToOscal) loadData(path string, out interface{}) error { - if err := pkg.LoadYamlFileToK8sTypedObject(r.c2pParsed.PolicyResultsDir+path, &out); err != nil { + if err := pkg.LoadYamlFileToK8sTypedObject(r.policyResultsDir+"/"+path, &out); err != nil { return err } return nil diff --git a/pkg/ocm/result2oscal_test.go b/pkg/ocm/result2oscal_test.go index 849b4a6..b8b6226 100644 --- a/pkg/ocm/result2oscal_test.go +++ b/pkg/ocm/result2oscal_test.go @@ -59,17 +59,10 @@ func TestResult2Oscal(t *testing.T) { PolicyResources: typec2pcr.ResourceRef{ Url: policyDir, }, - PolicyRersults: typec2pcr.ResourceRef{ - Url: policyResultsDir, - }, ClusterGroups: []typec2pcr.ClusterGroup{{ Name: "test-group", MatchLabels: &map[string]string{"environment": "test"}, }}, - Binding: typec2pcr.Binding{ - Compliance: "Test Compliance", - ClusterGroups: []string{"test-group"}, - }, Target: typec2pcr.Target{ Namespace: "c2p", }, @@ -78,7 +71,7 @@ func TestResult2Oscal(t *testing.T) { c2pcrParsed, err := c2pcrParser.Parse(c2pcrSpec) assert.NoError(t, err, "Should not happen") - reporter := NewResultToOscal(c2pcrParsed) + reporter := NewResultToOscal(c2pcrParsed, policyResultsDir) arRoot, err := reporter.Generate() assert.NoError(t, err, "Should not happen") From 3eb64bf84542e8101c8f04753212c9b495fdd43f Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Tue, 5 Dec 2023 21:03:45 +0900 Subject: [PATCH 09/13] Add version command Signed-off-by: Takumi Yanagawa --- cmd/c2pcli/main.go | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/cmd/c2pcli/main.go b/cmd/c2pcli/main.go index 01d00d5..ed58863 100644 --- a/cmd/c2pcli/main.go +++ b/cmd/c2pcli/main.go @@ -17,13 +17,36 @@ limitations under the License. package main import ( + "fmt" "os" "github.com/IBM/compliance-to-policy/cmd/c2pcli/cmd" + "github.com/spf13/cobra" ) +var ( + version = "none" + commit = "none" + date = "unknown" +) + +func newVersionSubCommand() *cobra.Command { + command := &cobra.Command{ + Use: "version", + Short: "Display version", + RunE: func(cmd *cobra.Command, args []string) error { + message := fmt.Sprintf("version: %s, commit: %s, date: %s", version, commit, date) + fmt.Fprintln(os.Stdout, message) + return nil + }, + } + return command +} + func main() { - err := cmd.New().Execute() + command := cmd.New() + command.AddCommand(newVersionSubCommand()) + err := command.Execute() if err != nil { os.Exit(1) } From bf1349767f4ac86819bbc50bb4310a9b3ccd57c5 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Wed, 6 Dec 2023 15:07:10 +0900 Subject: [PATCH 10/13] Add end-to-end use case in .md Signed-off-by: Takumi Yanagawa --- docs/kyverno/kyverno-workflow.drawio | 219 + .../oscal-vs-kyverno-result-mapping.csv | 14 + docs/{ocm.md => ocm/README.md} | 80 +- docs/ocm/c2p-config.yaml | 16 + .../ocm/final-outputs/assessment-results.json | 284 + docs/ocm/final-outputs/compliance-posture.md | 401 + .../ConfigMap.c2p.c2p-parameters.yaml | 8 + ...ment.c2p.placement-managed-kubernetes.yaml | 14 + .../PlacementBinding.c2p.policy-set.yaml | 13 + .../Policy.c2p.policy-deployment.yaml | 53 + .../Policy.c2p.policy-high-scan.yaml | 100 + ...policy-install-kyverno-from-manifests.yaml | 32668 ++++++++++++++++ ...icy.c2p.policy-kyverno-require-labels.yaml | 73 + .../PolicySet.c2p.managed-kubernetes.yaml | 14 + .../oscal-ar-vs-ocm-status-mapping.csv} | 0 docs/ocm/oscal/component-definition.csv | 6 + docs/ocm/oscal/component-definition.json | 201 + docs/ocm/oscal/profile.json | 75 + .../kustomization.yaml | 2 + .../policy-generator.yaml | 17 + .../ClusterRole.kyverno.yaml | 18 + ...terRole.kyverno:admin-generaterequest.yaml | 27 + .../ClusterRole.kyverno:admin-policies.yaml | 28 + ...lusterRole.kyverno:admin-policyreport.yaml | 28 + .../ClusterRole.kyverno:admin-reports.yaml | 30 + ...usterRole.kyverno:admin-updaterequest.yaml | 27 + .../ClusterRole.kyverno:events.yaml | 23 + .../ClusterRole.kyverno:generate.yaml | 48 + .../ClusterRole.kyverno:policies.yaml | 54 + .../ClusterRole.kyverno:userinfo.yaml | 24 + .../ClusterRole.kyverno:view.yaml | 22 + .../ClusterRole.kyverno:webhook.yaml | 27 + .../ClusterRoleBinding.kyverno.yaml | 21 + .../ConfigMap.kyverno-metrics.yaml | 16 + .../ConfigMap.kyverno.yaml | 17 + ...efinition.admissionreports.kyverno.io.yaml | 348 + ...tion.backgroundscanreports.kyverno.io.yaml | 308 + ...on.clusteradmissionreports.kyverno.io.yaml | 349 + ...usterbackgroundscanreports.kyverno.io.yaml | 308 + ...Definition.clusterpolicies.kyverno.io.yaml | 11930 ++++++ ...n.clusterpolicyreports.wgpolicyk8s.io.yaml | 370 + ...efinition.generaterequests.kyverno.io.yaml | 191 + ...esourceDefinition.policies.kyverno.io.yaml | 11934 ++++++ ...finition.policyreports.wgpolicyk8s.io.yaml | 369 + ...eDefinition.updaterequests.kyverno.io.yaml | 394 + .../Deployment.kyverno.yaml | 172 + .../Namespace.kyverno.yaml | 13 + .../Role.kyverno:leaderelection.yaml | 35 + .../RoleBinding.kyverno:leaderelection.yaml | 22 + .../Service.kyverno-svc-metrics.yaml | 25 + .../Service.kyverno-svc.yaml | 25 + .../ServiceAccount.kyverno.yaml | 14 + .../check-kyverno-reports/require-lables.yaml | 5 + .../kustomization.yaml | 2 + .../policy-generator.yaml | 23 + .../ClusterPolicy.require-labels.0.yaml | 18 + 56 files changed, 61513 insertions(+), 10 deletions(-) create mode 100644 docs/kyverno/kyverno-workflow.drawio create mode 100644 docs/kyverno/oscal-vs-kyverno-result-mapping.csv rename docs/{ocm.md => ocm/README.md} (65%) create mode 100644 docs/ocm/c2p-config.yaml create mode 100755 docs/ocm/final-outputs/assessment-results.json create mode 100755 docs/ocm/final-outputs/compliance-posture.md create mode 100755 docs/ocm/final-outputs/ocm-policies/ConfigMap.c2p.c2p-parameters.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/Placement.c2p.placement-managed-kubernetes.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/PlacementBinding.c2p.policy-set.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-deployment.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-high-scan.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-install-kyverno-from-manifests.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-kyverno-require-labels.yaml create mode 100755 docs/ocm/final-outputs/ocm-policies/PolicySet.c2p.managed-kubernetes.yaml rename docs/{oscal-vs-ocm-status-mapping.csv => ocm/oscal-ar-vs-ocm-status-mapping.csv} (100%) create mode 100644 docs/ocm/oscal/component-definition.csv create mode 100644 docs/ocm/oscal/component-definition.json create mode 100644 docs/ocm/oscal/profile.json create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/kustomization.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-generator.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-generaterequest.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policies.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policyreport.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-reports.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-updaterequest.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:events.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:generate.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:policies.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:userinfo.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:view.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:webhook.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRoleBinding.kyverno.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno-metrics.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.admissionreports.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.backgroundscanreports.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusteradmissionreports.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterbackgroundscanreports.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicies.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicyreports.wgpolicyk8s.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.generaterequests.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policies.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policyreports.wgpolicyk8s.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.updaterequests.kyverno.io.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Deployment.kyverno.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Namespace.kyverno.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Role.kyverno:leaderelection.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/RoleBinding.kyverno:leaderelection.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc-metrics.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc.yaml create mode 100755 pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ServiceAccount.kyverno.yaml create mode 100644 pkg/testdata/ocm/policies/policy-kyverno-require-labels/check-kyverno-reports/require-lables.yaml create mode 100755 pkg/testdata/ocm/policies/policy-kyverno-require-labels/kustomization.yaml create mode 100755 pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-generator.yaml create mode 100755 pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-kyverno-require-labels/ClusterPolicy.require-labels.0.yaml diff --git a/docs/kyverno/kyverno-workflow.drawio b/docs/kyverno/kyverno-workflow.drawio new file mode 100644 index 0000000..84cf800 --- /dev/null +++ b/docs/kyverno/kyverno-workflow.drawio @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/kyverno/oscal-vs-kyverno-result-mapping.csv b/docs/kyverno/oscal-vs-kyverno-result-mapping.csv new file mode 100644 index 0000000..b5c2dfa --- /dev/null +++ b/docs/kyverno/oscal-vs-kyverno-result-mapping.csv @@ -0,0 +1,14 @@ +Field of OSCAL Assessment Result,How is Auditree check_results.json mapped,Field of Auditree check_results.json +local-definitions.inventory-items[],Per check_result,check_results[] +local-definitions.inventory-items[].props[].check_path,check_result key name,check_results[].$key +local-definitions.inventory-items[].props[].accreditations,accreditations in check_result,check_results[].accreditations +observations[],Per rule, +observations[].subjects[],"Per check (filter(check_id in rule, check_results.$key.checks))","filter(lambda check: check in rule, check_results[].checks)" +observations[].subjects[].subject_uuid,Inventory item id of the check,local-definitions.inventory-items[].uuid +observations[].subjects[].props[].result,Status of check (pass/fail),check.status +observations[].subjects[].props[].reason,Reason of the status,str(check.successes/failures/warnings) +observations[].subjects[].props[].resource-id,Fully qualified check name ,f‘{check_result.$key}.{check.$key}’ +observations[].subjects[].props[].evaluate-on,Evaluation timestamp,check.timestamp_formatted +observations[].relevant_references[].description,Evidence description,check_result.evidence[].description +observations[].relevant_references[].href,Evidence urls,locker_url + check_result.evidence[].path +observations[].links[].href,Report urls,locker_url + check_result.reports[] \ No newline at end of file diff --git a/docs/ocm.md b/docs/ocm/README.md similarity index 65% rename from docs/ocm.md rename to docs/ocm/README.md index 039fb1d..a48945e 100644 --- a/docs/ocm.md +++ b/docs/ocm/README.md @@ -1,32 +1,92 @@ ## C2P for OCM +### Usage +``` +$ c2pcli ocm -h +C2P CLI OCM plugin + +Usage: + c2pcli ocm [command] + +Available Commands: + oscal2policy Compose deliverable OCM Policies from OSCAL + oscal2posture Generate Compliance Posture from OSCAL artifacts + result2oscal Generate OSCAL Assessment Results from OCM Policy statuses + +Flags: + -h, --help help for ocm + +Use "c2pcli ocm [command] --help" for more information about a command. +``` + ### Prerequisites 1. Install [Policy Generator Plugin](https://github.com/open-cluster-management-io/policy-generator-plugin#as-a-kustomize-plugin) ### Manual end-to-end use case + +1. Prerequisites + 1. OCM is configured to manage two k8s clusters (cluster1 and cluster2) and installed Policy Governance Framework. + 1. Namespace `c2p` is created in OCM Hub + 1. The managed clusters are labeled `my-cluster=true` and bound to `c2p` namespace + ``` + $ clusteradm get clustersets + + + └── + │ ├── + │ ├── 2 ManagedClusters selected + │ ├── [cluster1 cluster2] + └── + │ ├── + │ ├── 2 ManagedClusters selected + │ ├── [cluster1 cluster2] + └── + └── c2p + └── 2 ManagedClusters selected + └── [cluster1 cluster2] + ``` 1. Run oscal2policy ``` - c2pcli ocm oscal2policy -c c2p-config.yaml -o ./ocm-policies + c2pcli ocm oscal2policy -c ./docs/ocm/c2p-config.yaml -o /tmp/ocm-policies ``` + - The generated ocm-policies directory looks like [./final-outputs/ocm-policies](./final-outputs/ocm-policies) 1. Deploy generated OCM Policies to OCM Hub ``` - kubectl create -f ./ocm-policies + kubectl create -f /tmp/ocm-policies + ``` +1. Wait for policies to be delivered + ``` + $ kubectl get policy -A + NAMESPACE NAME REMEDIATION ACTION COMPLIANCE STATE AGE + c2p policy-deployment inform NonCompliant 5m15s + c2p policy-high-scan inform NonCompliant 5m15s + c2p policy-install-kyverno-from-manifests enforce Compliant 5m14s + c2p policy-kyverno-require-labels NonCompliant 5m14s + cluster1 c2p.policy-deployment inform NonCompliant 2m15s + cluster1 c2p.policy-high-scan inform NonCompliant 2m15s + cluster1 c2p.policy-install-kyverno-from-manifests enforce Compliant 2m14s + cluster1 c2p.policy-kyverno-require-labels NonCompliant 2m11s + cluster2 c2p.policy-deployment inform NonCompliant 2m15s + cluster2 c2p.policy-high-scan inform NonCompliant 2m15s + cluster2 c2p.policy-install-kyverno-from-manifests enforce Compliant 2m14s + cluster2 c2p.policy-kyverno-require-labels NonCompliant 2m11s ``` -1. Get OCM Policies from OCM Hub +1. Get OCM Policy Results (Policy, PolicySet, PlacementDecision) from OCM Hub ``` - mkdir results - kubectl get policies.policy.open-cluster-management.io -A -o yaml > ./results/policies.policy.open-cluster-management.io.yaml - kubectl get policies.policy.open-cluster-management.io -A -o yaml > ./results/policies.policy.open-cluster-management.io.yaml - kubectl get policysets.policy.open-cluster-management.io -A -o yaml > ./results/policysets.policy.open-cluster-management.io.yaml + mkdir /tmp/results + kubectl get policies.policy.open-cluster-management.io -A -o yaml > /tmp/results/policies.policy.open-cluster-management.io.yaml + kubectl get policysets.policy.open-cluster-management.io -A -o yaml > /tmp/results/policysets.policy.open-cluster-management.io.yaml + kubectl get placementdecisions.cluster.open-cluster-management.io -A -o yaml > /tmp/results/placementdecisions.cluster.open-cluster-management.io.yaml ``` 1. Run result2oscal ``` - c2pcli ocm result2oscal -c c2p-config.yaml --results ./results -o ./assessment-results.json + c2pcli ocm result2oscal -c ./docs/ocm/c2p-config.yaml --results /tmp/results -o /tmp/assessment-results.json ``` -1. (Optional) Prettify OSCAL Assessment Results in .md format +1. Prettify OSCAL Assessment Results in .md format ``` - c2pcli ocm oscal2posture -c c2p-config.yaml --assessment-results ./assessment-results.json -o compliance-posture.md + c2pcli ocm oscal2posture -c ./docs/ocm/c2p-config.yaml --assessment-results /tmp/assessment-results.json -o /tmp/compliance-posture.md ``` + - You can view the compliance posture like [./final-outputs/compliance-posture.md](./final-outputs/compliance-posture.md) ### C2P Decomposer Decompose OCM poicy collection to kubernetes resources composing each OCM policy (we call it policy resource). diff --git a/docs/ocm/c2p-config.yaml b/docs/ocm/c2p-config.yaml new file mode 100644 index 0000000..4ac0a1f --- /dev/null +++ b/docs/ocm/c2p-config.yaml @@ -0,0 +1,16 @@ +compliance: + name: Demo Compliance + catalog: + url: https://raw.githubusercontent.com/usnistgov/oscal-content/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_catalog.json + profile: + url: ./docs/ocm/oscal/profile.json + componentDefinition: + url: ./docs/ocm/oscal/component-definition.json +policyResources: + url: ./pkg/testdata/ocm/policies # example policy resources +clusterGroups: + - name: myclusters + matchLabels: + my-cluster: 'true' +target: + namespace: c2p \ No newline at end of file diff --git a/docs/ocm/final-outputs/assessment-results.json b/docs/ocm/final-outputs/assessment-results.json new file mode 100755 index 0000000..012f242 --- /dev/null +++ b/docs/ocm/final-outputs/assessment-results.json @@ -0,0 +1,284 @@ +{ + "assessment-results": { + "uuid": "6fae0aac-93fc-11ee-a02a-62f79297f1b7", + "metadata": { + "title": "OSCAL Assessment Results", + "last-modified": "2023-12-06T14:58:10.97827+09:00", + "version": "0.0.1", + "oscal-version": "1.0.4" + }, + "import-ap": { + "href": "http://..." + }, + "results": [ + { + "uuid": "6fae0aac-93fc-11ee-a02b-62f79297f1b7", + "title": "Assessment Results by OCM", + "description": "Assessment Results by OCM...", + "start": "2023-12-06T14:58:10.97827+09:00", + "local-definitions": { + "inventory-items": [ + { + "uuid": "6fade0d6-93fc-11ee-a029-62f79297f1b7", + "description": "", + "props": [ + { + "name": "cluster-name", + "value": "cluster1" + } + ] + }, + { + "uuid": "6fade374-93fc-11ee-a029-62f79297f1b7", + "description": "", + "props": [ + { + "name": "cluster-name", + "value": "cluster2" + } + ] + } + ] + }, + "observations": [ + { + "uuid": "6fade810-93fc-11ee-a029-62f79297f1b7", + "description": "Observation of policy policy-high-scan", + "props": [ + { + "name": "assessment-rule-id", + "value": "test_configuration_check" + }, + { + "name": "policy-id", + "value": "policy-high-scan" + }, + { + "name": "control-id", + "value": "cm-6" + }, + { + "name": "result", + "value": "fail" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "6fade0d6-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster1", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-high-scan.179e2849d01e8567\n lastTimestamp: \"2023-12-06T05:53:26Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.179e2848595f9ba9\n lastTimestamp: \"2023-12-06T05:53:20Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.179e284a97812778\n lastTimestamp: \"2023-12-06T05:53:30Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult,\n please check if you have CRD deployed\n" + } + ] + }, + { + "subject-uuid": "6fade374-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-high-scan.179e284863bfbfab\n lastTimestamp: \"2023-12-06T05:53:20Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.179e284a53812e10\n lastTimestamp: \"2023-12-06T05:53:28Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite,\n please check if you have CRD deployed\n- eventName: c2p.policy-high-scan.179e2849950d51e5\n lastTimestamp: \"2023-12-06T05:53:25Z\"\n message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult,\n please check if you have CRD deployed\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + }, + { + "uuid": "6fae067e-93fc-11ee-a029-62f79297f1b7", + "description": "Observation of policy policy-install-kyverno-from-manifests", + "props": [ + { + "name": "assessment-rule-id", + "value": "install_kyverno" + }, + { + "name": "policy-id", + "value": "policy-install-kyverno-from-manifests" + }, + { + "name": "control-id", + "value": "cm-6" + }, + { + "name": "result", + "value": "pass" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "6fade0d6-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster1", + "props": [ + { + "name": "result", + "value": "pass" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-install-kyverno-from-manifests.179e284be703d42d\n lastTimestamp: \"2023-12-06T05:53:35Z\"\n message: Compliant; notification - clusterroles [kyverno] found as specified, therefore\n this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284c7ace2ebf\n lastTimestamp: \"2023-12-06T05:53:38Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-generaterequest]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284c9f4c379e\n lastTimestamp: \"2023-12-06T05:53:38Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-policies] found as\n specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e28504ffc7000\n lastTimestamp: \"2023-12-06T05:53:54Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-policyreport] found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284befa43976\n lastTimestamp: \"2023-12-06T05:53:35Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-reports] found as\n specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284e6ff55461\n lastTimestamp: \"2023-12-06T05:53:46Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-updaterequest] found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285349215bae\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - clusterroles [kyverno:events] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284d380ed6df\n lastTimestamp: \"2023-12-06T05:53:41Z\"\n message: Compliant; notification - clusterroles [kyverno:generate] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2853548333b1\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - clusterroles [kyverno:policies] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284f80c03d5d\n lastTimestamp: \"2023-12-06T05:53:51Z\"\n message: Compliant; notification - clusterroles [kyverno:userinfo] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284ba3c9f6ea\n lastTimestamp: \"2023-12-06T05:53:34Z\"\n message: Compliant; notification - clusterroles [kyverno:view] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e28535e612839\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - clusterroles [kyverno:webhook] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284fcb71f4df\n lastTimestamp: \"2023-12-06T05:53:52Z\"\n message: Compliant; notification - clusterrolebindings [kyverno] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285680fe6ac8\n lastTimestamp: \"2023-12-06T05:54:21Z\"\n message: Compliant; notification - configmaps [kyverno-metrics] in namespace kyverno\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e28524f386c75\n lastTimestamp: \"2023-12-06T05:54:03Z\"\n message: Compliant; notification - configmaps [kyverno] in namespace kyverno found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284bf8f4b48b\n lastTimestamp: \"2023-12-06T05:53:35Z\"\n message: Compliant; notification - customresourcedefinitions [admissionreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284bba53764a\n lastTimestamp: \"2023-12-06T05:53:34Z\"\n message: Compliant; notification - customresourcedefinitions [backgroundscanreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284fd5dac2d0\n lastTimestamp: \"2023-12-06T05:53:52Z\"\n message: Compliant; notification - customresourcedefinitions [clusteradmissionreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284f91c7ac2d\n lastTimestamp: \"2023-12-06T05:53:51Z\"\n message: Compliant; notification - customresourcedefinitions [clusterbackgroundscanreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2853336f0121\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - customresourcedefinitions [clusterpolicies.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2853ae517829\n lastTimestamp: \"2023-12-06T05:54:09Z\"\n message: Compliant; notification - customresourcedefinitions [clusterpolicyreports.wgpolicyk8s.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2853bb96886f\n lastTimestamp: \"2023-12-06T05:54:09Z\"\n message: Compliant; notification - customresourcedefinitions [generaterequests.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e28567b4ab101\n lastTimestamp: \"2023-12-06T05:54:21Z\"\n message: Compliant; notification - customresourcedefinitions [policies.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285155b5a7dc\n lastTimestamp: \"2023-12-06T05:53:58Z\"\n message: Compliant; notification - customresourcedefinitions [policyreports.wgpolicyk8s.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285258c5e5f7\n lastTimestamp: \"2023-12-06T05:54:03Z\"\n message: Compliant; notification - customresourcedefinitions [updaterequests.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2856c0192717\n lastTimestamp: \"2023-12-06T05:54:22Z\"\n message: Compliant; notification - deployments [kyverno] in namespace kyverno found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851d0ebe5d4\n lastTimestamp: \"2023-12-06T05:54:01Z\"\n message: Compliant; notification - namespaces [kyverno] found as specified, therefore\n this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851d422c597\n lastTimestamp: \"2023-12-06T05:54:01Z\"\n message: Compliant; notification - roles [kyverno:leaderelection] in namespace kyverno\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e28526cb03284\n lastTimestamp: \"2023-12-06T05:54:03Z\"\n message: Compliant; notification - rolebindings [kyverno:leaderelection] in namespace\n kyverno found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285684956927\n lastTimestamp: \"2023-12-06T05:54:21Z\"\n message: Compliant; notification - services [kyverno-svc-metrics] in namespace kyverno\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285277e643d2\n lastTimestamp: \"2023-12-06T05:54:03Z\"\n message: Compliant; notification - services [kyverno-svc] in namespace kyverno found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2855b441709c\n lastTimestamp: \"2023-12-06T05:54:17Z\"\n message: Compliant; notification - serviceaccounts [kyverno] in namespace kyverno\n found as specified, therefore this Object template is compliant\n" + } + ] + }, + { + "subject-uuid": "6fade374-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "pass" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-install-kyverno-from-manifests.179e284c9a97c784\n lastTimestamp: \"2023-12-06T05:53:38Z\"\n message: Compliant; notification - clusterroles [kyverno] found as specified, therefore\n this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284b35375584\n lastTimestamp: \"2023-12-06T05:53:32Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-generaterequest]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284ef4862c6a\n lastTimestamp: \"2023-12-06T05:53:48Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-policies] found as\n specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284dfd646310\n lastTimestamp: \"2023-12-06T05:53:44Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-policyreport] found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284dc9cf5a21\n lastTimestamp: \"2023-12-06T05:53:43Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-reports] found as\n specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284b3482ad78\n lastTimestamp: \"2023-12-06T05:53:32Z\"\n message: Compliant; notification - clusterroles [kyverno:admin-updaterequest] found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284f07938a0b\n lastTimestamp: \"2023-12-06T05:53:49Z\"\n message: Compliant; notification - clusterroles [kyverno:events] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284f17ff00f6\n lastTimestamp: \"2023-12-06T05:53:49Z\"\n message: Compliant; notification - clusterroles [kyverno:generate] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284ca95ae428\n lastTimestamp: \"2023-12-06T05:53:38Z\"\n message: Compliant; notification - clusterroles [kyverno:policies] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284e30919d74\n lastTimestamp: \"2023-12-06T05:53:45Z\"\n message: Compliant; notification - clusterroles [kyverno:userinfo] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284e4527ba38\n lastTimestamp: \"2023-12-06T05:53:45Z\"\n message: Compliant; notification - clusterroles [kyverno:view] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284c5820f7b0\n lastTimestamp: \"2023-12-06T05:53:37Z\"\n message: Compliant; notification - clusterroles [kyverno:webhook] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284dccc3cae5\n lastTimestamp: \"2023-12-06T05:53:43Z\"\n message: Compliant; notification - clusterrolebindings [kyverno] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285889d4069c\n lastTimestamp: \"2023-12-06T05:54:29Z\"\n message: Compliant; notification - configmaps [kyverno-metrics] in namespace kyverno\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2853e3c830c7\n lastTimestamp: \"2023-12-06T05:54:09Z\"\n message: Compliant; notification - configmaps [kyverno] in namespace kyverno found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851c8b54cb1\n lastTimestamp: \"2023-12-06T05:54:00Z\"\n message: Compliant; notification - customresourcedefinitions [admissionreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284dda99ee7e\n lastTimestamp: \"2023-12-06T05:53:44Z\"\n message: Compliant; notification - customresourcedefinitions [backgroundscanreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e284cbfda9c70\n lastTimestamp: \"2023-12-06T05:53:39Z\"\n message: Compliant; notification - customresourcedefinitions [clusteradmissionreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2854d3f7806a\n lastTimestamp: \"2023-12-06T05:54:13Z\"\n message: Compliant; notification - customresourcedefinitions [clusterbackgroundscanreports.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2856e1ae7593\n lastTimestamp: \"2023-12-06T05:54:22Z\"\n message: Compliant; notification - customresourcedefinitions [clusterpolicies.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851eb3a6bea\n lastTimestamp: \"2023-12-06T05:54:01Z\"\n message: Compliant; notification - customresourcedefinitions [clusterpolicyreports.wgpolicyk8s.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851282fb972\n lastTimestamp: \"2023-12-06T05:53:58Z\"\n message: Compliant; notification - customresourcedefinitions [generaterequests.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851fa561a0e\n lastTimestamp: \"2023-12-06T05:54:01Z\"\n message: Compliant; notification - customresourcedefinitions [policies.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2854e6af9e7a\n lastTimestamp: \"2023-12-06T05:54:14Z\"\n message: Compliant; notification - customresourcedefinitions [policyreports.wgpolicyk8s.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285334bd6234\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - customresourcedefinitions [updaterequests.kyverno.io]\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e28588a2bd302\n lastTimestamp: \"2023-12-06T05:54:29Z\"\n message: Compliant; notification - deployments [kyverno] in namespace kyverno found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2851d0e23da9\n lastTimestamp: \"2023-12-06T05:54:01Z\"\n message: Compliant; notification - namespaces [kyverno] found as specified, therefore\n this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2853398624f1\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - roles [kyverno:leaderelection] in namespace kyverno\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2858b1db4b8e\n lastTimestamp: \"2023-12-06T05:54:30Z\"\n message: Compliant; notification - rolebindings [kyverno:leaderelection] in namespace\n kyverno found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2857bc2aa4bd\n lastTimestamp: \"2023-12-06T05:54:26Z\"\n message: Compliant; notification - services [kyverno-svc-metrics] in namespace kyverno\n found as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e285346ad8e3c\n lastTimestamp: \"2023-12-06T05:54:07Z\"\n message: Compliant; notification - services [kyverno-svc] in namespace kyverno found\n as specified, therefore this Object template is compliant\n- eventName: c2p.policy-install-kyverno-from-manifests.179e2857c388cf77\n lastTimestamp: \"2023-12-06T05:54:26Z\"\n message: Compliant; notification - serviceaccounts [kyverno] in namespace kyverno\n found as specified, therefore this Object template is compliant\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + }, + { + "uuid": "6fae08e0-93fc-11ee-a029-62f79297f1b7", + "description": "Observation of policy policy-kyverno-require-labels", + "props": [ + { + "name": "assessment-rule-id", + "value": "test_required_label" + }, + { + "name": "policy-id", + "value": "policy-kyverno-require-labels" + }, + { + "name": "control-id", + "value": "cm-6" + }, + { + "name": "result", + "value": "fail" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "6fade0d6-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster1", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-kyverno-require-labels.179e2851c11fe04c\n lastTimestamp: \"2023-12-06T05:54:00Z\"\n message: Compliant; notification - clusterpolicies [require-labels] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-kyverno-require-labels.179e2862688eaee7\n lastTimestamp: \"2023-12-06T05:55:12Z\"\n message: 'NonCompliant; violation - policyreports found: [cpol-require-labels] in\n namespace local-path-storage'\n" + } + ] + }, + { + "subject-uuid": "6fade374-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-kyverno-require-labels.179e2855f5ab92dd\n lastTimestamp: \"2023-12-06T05:54:18Z\"\n message: Compliant; notification - clusterpolicies [require-labels] found as specified,\n therefore this Object template is compliant\n- eventName: c2p.policy-kyverno-require-labels.179e2862e1802d28\n lastTimestamp: \"2023-12-06T05:55:14Z\"\n message: 'NonCompliant; violation - policyreports found: [cpol-require-labels] in\n namespace local-path-storage'\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + }, + { + "uuid": "6fae0aac-93fc-11ee-a029-62f79297f1b7", + "description": "Observation of policy policy-deployment", + "props": [ + { + "name": "assessment-rule-id", + "value": "test_proxy_check" + }, + { + "name": "policy-id", + "value": "policy-deployment" + }, + { + "name": "control-id", + "value": "cm-2" + }, + { + "name": "result", + "value": "fail" + } + ], + "methods": [ + "TEST-AUTOMATED" + ], + "subjects": [ + { + "subject-uuid": "6fade0d6-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster1", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-deployment.179e284f776397b3\n lastTimestamp: \"2023-12-06T05:53:50Z\"\n message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in\n namespace cluster1 missing; [nginx-deployment] in namespace default missing; [nginx-deployment]\n in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public\n missing; [nginx-deployment] in namespace kyverno missing; [nginx-deployment] in\n namespace local-path-storage missing'\n" + } + ] + }, + { + "subject-uuid": "6fade374-93fc-11ee-a029-62f79297f1b7", + "type": "resource", + "title": "Cluster Name: cluster2", + "props": [ + { + "name": "result", + "value": "fail" + }, + { + "name": "reason", + "value": "- eventName: c2p.policy-deployment.179e2854bed6d22e\n lastTimestamp: \"2023-12-06T05:54:13Z\"\n message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in\n namespace cluster2 missing; [nginx-deployment] in namespace default missing; [nginx-deployment]\n in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public\n missing; [nginx-deployment] in namespace kyverno missing; [nginx-deployment] in\n namespace local-path-storage missing'\n" + } + ] + } + ], + "collected": "0001-01-01T00:00:00Z", + "expires": "0001-01-01T00:00:00Z" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/docs/ocm/final-outputs/compliance-posture.md b/docs/ocm/final-outputs/compliance-posture.md new file mode 100755 index 0000000..f8d4366 --- /dev/null +++ b/docs/ocm/final-outputs/compliance-posture.md @@ -0,0 +1,401 @@ +## Catalog +Electronic Version of NIST SP 800-53 Rev 5.1.1 Controls and SP 800-53A Rev 5.1.1 Assessment Procedures +## Component: Managed Kubernetes +#### Result of control: cm-6 + +Rule ID: test_configuration_check +
Details + + - Subject UUID: 6fade0d6-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster1 + - Result: fail + - Reason: + ``` + - eventName: c2p.policy-high-scan.179e2849d01e8567 + lastTimestamp: "2023-12-06T05:53:26Z" + message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, + please check if you have CRD deployed + - eventName: c2p.policy-high-scan.179e2848595f9ba9 + lastTimestamp: "2023-12-06T05:53:20Z" + message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, + please check if you have CRD deployed + - eventName: c2p.policy-high-scan.179e284a97812778 + lastTimestamp: "2023-12-06T05:53:30Z" + message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, + please check if you have CRD deployed + + ``` + + - Subject UUID: 6fade374-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster2 + - Result: fail + - Reason: + ``` + - eventName: c2p.policy-high-scan.179e284863bfbfab + lastTimestamp: "2023-12-06T05:53:20Z" + message: NonCompliant; violation - couldn't find mapping resource with kind ScanSettingBinding, + please check if you have CRD deployed + - eventName: c2p.policy-high-scan.179e284a53812e10 + lastTimestamp: "2023-12-06T05:53:28Z" + message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceSuite, + please check if you have CRD deployed + - eventName: c2p.policy-high-scan.179e2849950d51e5 + lastTimestamp: "2023-12-06T05:53:25Z" + message: NonCompliant; violation - couldn't find mapping resource with kind ComplianceCheckResult, + please check if you have CRD deployed + + ``` +
+ + +Rule ID: install_kyverno +
Details + + - Subject UUID: 6fade0d6-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster1 + - Result: pass + - Reason: + ``` + - eventName: c2p.policy-install-kyverno-from-manifests.179e284be703d42d + lastTimestamp: "2023-12-06T05:53:35Z" + message: Compliant; notification - clusterroles [kyverno] found as specified, therefore + this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284c7ace2ebf + lastTimestamp: "2023-12-06T05:53:38Z" + message: Compliant; notification - clusterroles [kyverno:admin-generaterequest] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284c9f4c379e + lastTimestamp: "2023-12-06T05:53:38Z" + message: Compliant; notification - clusterroles [kyverno:admin-policies] found as + specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e28504ffc7000 + lastTimestamp: "2023-12-06T05:53:54Z" + message: Compliant; notification - clusterroles [kyverno:admin-policyreport] found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284befa43976 + lastTimestamp: "2023-12-06T05:53:35Z" + message: Compliant; notification - clusterroles [kyverno:admin-reports] found as + specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284e6ff55461 + lastTimestamp: "2023-12-06T05:53:46Z" + message: Compliant; notification - clusterroles [kyverno:admin-updaterequest] found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285349215bae + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - clusterroles [kyverno:events] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284d380ed6df + lastTimestamp: "2023-12-06T05:53:41Z" + message: Compliant; notification - clusterroles [kyverno:generate] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2853548333b1 + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - clusterroles [kyverno:policies] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284f80c03d5d + lastTimestamp: "2023-12-06T05:53:51Z" + message: Compliant; notification - clusterroles [kyverno:userinfo] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284ba3c9f6ea + lastTimestamp: "2023-12-06T05:53:34Z" + message: Compliant; notification - clusterroles [kyverno:view] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e28535e612839 + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - clusterroles [kyverno:webhook] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284fcb71f4df + lastTimestamp: "2023-12-06T05:53:52Z" + message: Compliant; notification - clusterrolebindings [kyverno] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285680fe6ac8 + lastTimestamp: "2023-12-06T05:54:21Z" + message: Compliant; notification - configmaps [kyverno-metrics] in namespace kyverno + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e28524f386c75 + lastTimestamp: "2023-12-06T05:54:03Z" + message: Compliant; notification - configmaps [kyverno] in namespace kyverno found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284bf8f4b48b + lastTimestamp: "2023-12-06T05:53:35Z" + message: Compliant; notification - customresourcedefinitions [admissionreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284bba53764a + lastTimestamp: "2023-12-06T05:53:34Z" + message: Compliant; notification - customresourcedefinitions [backgroundscanreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284fd5dac2d0 + lastTimestamp: "2023-12-06T05:53:52Z" + message: Compliant; notification - customresourcedefinitions [clusteradmissionreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284f91c7ac2d + lastTimestamp: "2023-12-06T05:53:51Z" + message: Compliant; notification - customresourcedefinitions [clusterbackgroundscanreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2853336f0121 + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - customresourcedefinitions [clusterpolicies.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2853ae517829 + lastTimestamp: "2023-12-06T05:54:09Z" + message: Compliant; notification - customresourcedefinitions [clusterpolicyreports.wgpolicyk8s.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2853bb96886f + lastTimestamp: "2023-12-06T05:54:09Z" + message: Compliant; notification - customresourcedefinitions [generaterequests.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e28567b4ab101 + lastTimestamp: "2023-12-06T05:54:21Z" + message: Compliant; notification - customresourcedefinitions [policies.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285155b5a7dc + lastTimestamp: "2023-12-06T05:53:58Z" + message: Compliant; notification - customresourcedefinitions [policyreports.wgpolicyk8s.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285258c5e5f7 + lastTimestamp: "2023-12-06T05:54:03Z" + message: Compliant; notification - customresourcedefinitions [updaterequests.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2856c0192717 + lastTimestamp: "2023-12-06T05:54:22Z" + message: Compliant; notification - deployments [kyverno] in namespace kyverno found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851d0ebe5d4 + lastTimestamp: "2023-12-06T05:54:01Z" + message: Compliant; notification - namespaces [kyverno] found as specified, therefore + this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851d422c597 + lastTimestamp: "2023-12-06T05:54:01Z" + message: Compliant; notification - roles [kyverno:leaderelection] in namespace kyverno + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e28526cb03284 + lastTimestamp: "2023-12-06T05:54:03Z" + message: Compliant; notification - rolebindings [kyverno:leaderelection] in namespace + kyverno found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285684956927 + lastTimestamp: "2023-12-06T05:54:21Z" + message: Compliant; notification - services [kyverno-svc-metrics] in namespace kyverno + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285277e643d2 + lastTimestamp: "2023-12-06T05:54:03Z" + message: Compliant; notification - services [kyverno-svc] in namespace kyverno found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2855b441709c + lastTimestamp: "2023-12-06T05:54:17Z" + message: Compliant; notification - serviceaccounts [kyverno] in namespace kyverno + found as specified, therefore this Object template is compliant + + ``` + + - Subject UUID: 6fade374-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster2 + - Result: pass + - Reason: + ``` + - eventName: c2p.policy-install-kyverno-from-manifests.179e284c9a97c784 + lastTimestamp: "2023-12-06T05:53:38Z" + message: Compliant; notification - clusterroles [kyverno] found as specified, therefore + this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284b35375584 + lastTimestamp: "2023-12-06T05:53:32Z" + message: Compliant; notification - clusterroles [kyverno:admin-generaterequest] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284ef4862c6a + lastTimestamp: "2023-12-06T05:53:48Z" + message: Compliant; notification - clusterroles [kyverno:admin-policies] found as + specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284dfd646310 + lastTimestamp: "2023-12-06T05:53:44Z" + message: Compliant; notification - clusterroles [kyverno:admin-policyreport] found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284dc9cf5a21 + lastTimestamp: "2023-12-06T05:53:43Z" + message: Compliant; notification - clusterroles [kyverno:admin-reports] found as + specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284b3482ad78 + lastTimestamp: "2023-12-06T05:53:32Z" + message: Compliant; notification - clusterroles [kyverno:admin-updaterequest] found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284f07938a0b + lastTimestamp: "2023-12-06T05:53:49Z" + message: Compliant; notification - clusterroles [kyverno:events] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284f17ff00f6 + lastTimestamp: "2023-12-06T05:53:49Z" + message: Compliant; notification - clusterroles [kyverno:generate] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284ca95ae428 + lastTimestamp: "2023-12-06T05:53:38Z" + message: Compliant; notification - clusterroles [kyverno:policies] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284e30919d74 + lastTimestamp: "2023-12-06T05:53:45Z" + message: Compliant; notification - clusterroles [kyverno:userinfo] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284e4527ba38 + lastTimestamp: "2023-12-06T05:53:45Z" + message: Compliant; notification - clusterroles [kyverno:view] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284c5820f7b0 + lastTimestamp: "2023-12-06T05:53:37Z" + message: Compliant; notification - clusterroles [kyverno:webhook] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284dccc3cae5 + lastTimestamp: "2023-12-06T05:53:43Z" + message: Compliant; notification - clusterrolebindings [kyverno] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285889d4069c + lastTimestamp: "2023-12-06T05:54:29Z" + message: Compliant; notification - configmaps [kyverno-metrics] in namespace kyverno + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2853e3c830c7 + lastTimestamp: "2023-12-06T05:54:09Z" + message: Compliant; notification - configmaps [kyverno] in namespace kyverno found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851c8b54cb1 + lastTimestamp: "2023-12-06T05:54:00Z" + message: Compliant; notification - customresourcedefinitions [admissionreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284dda99ee7e + lastTimestamp: "2023-12-06T05:53:44Z" + message: Compliant; notification - customresourcedefinitions [backgroundscanreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e284cbfda9c70 + lastTimestamp: "2023-12-06T05:53:39Z" + message: Compliant; notification - customresourcedefinitions [clusteradmissionreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2854d3f7806a + lastTimestamp: "2023-12-06T05:54:13Z" + message: Compliant; notification - customresourcedefinitions [clusterbackgroundscanreports.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2856e1ae7593 + lastTimestamp: "2023-12-06T05:54:22Z" + message: Compliant; notification - customresourcedefinitions [clusterpolicies.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851eb3a6bea + lastTimestamp: "2023-12-06T05:54:01Z" + message: Compliant; notification - customresourcedefinitions [clusterpolicyreports.wgpolicyk8s.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851282fb972 + lastTimestamp: "2023-12-06T05:53:58Z" + message: Compliant; notification - customresourcedefinitions [generaterequests.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851fa561a0e + lastTimestamp: "2023-12-06T05:54:01Z" + message: Compliant; notification - customresourcedefinitions [policies.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2854e6af9e7a + lastTimestamp: "2023-12-06T05:54:14Z" + message: Compliant; notification - customresourcedefinitions [policyreports.wgpolicyk8s.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285334bd6234 + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - customresourcedefinitions [updaterequests.kyverno.io] + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e28588a2bd302 + lastTimestamp: "2023-12-06T05:54:29Z" + message: Compliant; notification - deployments [kyverno] in namespace kyverno found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2851d0e23da9 + lastTimestamp: "2023-12-06T05:54:01Z" + message: Compliant; notification - namespaces [kyverno] found as specified, therefore + this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2853398624f1 + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - roles [kyverno:leaderelection] in namespace kyverno + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2858b1db4b8e + lastTimestamp: "2023-12-06T05:54:30Z" + message: Compliant; notification - rolebindings [kyverno:leaderelection] in namespace + kyverno found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2857bc2aa4bd + lastTimestamp: "2023-12-06T05:54:26Z" + message: Compliant; notification - services [kyverno-svc-metrics] in namespace kyverno + found as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e285346ad8e3c + lastTimestamp: "2023-12-06T05:54:07Z" + message: Compliant; notification - services [kyverno-svc] in namespace kyverno found + as specified, therefore this Object template is compliant + - eventName: c2p.policy-install-kyverno-from-manifests.179e2857c388cf77 + lastTimestamp: "2023-12-06T05:54:26Z" + message: Compliant; notification - serviceaccounts [kyverno] in namespace kyverno + found as specified, therefore this Object template is compliant + + ``` +
+ + +Rule ID: test_required_label +
Details + + - Subject UUID: 6fade0d6-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster1 + - Result: fail + - Reason: + ``` + - eventName: c2p.policy-kyverno-require-labels.179e2851c11fe04c + lastTimestamp: "2023-12-06T05:54:00Z" + message: Compliant; notification - clusterpolicies [require-labels] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-kyverno-require-labels.179e2862688eaee7 + lastTimestamp: "2023-12-06T05:55:12Z" + message: 'NonCompliant; violation - policyreports found: [cpol-require-labels] in + namespace local-path-storage' + + ``` + + - Subject UUID: 6fade374-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster2 + - Result: fail + - Reason: + ``` + - eventName: c2p.policy-kyverno-require-labels.179e2855f5ab92dd + lastTimestamp: "2023-12-06T05:54:18Z" + message: Compliant; notification - clusterpolicies [require-labels] found as specified, + therefore this Object template is compliant + - eventName: c2p.policy-kyverno-require-labels.179e2862e1802d28 + lastTimestamp: "2023-12-06T05:55:14Z" + message: 'NonCompliant; violation - policyreports found: [cpol-require-labels] in + namespace local-path-storage' + + ``` +
+ +--- +#### Result of control: cm-2 + +Rule ID: test_proxy_check +
Details + + - Subject UUID: 6fade0d6-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster1 + - Result: fail + - Reason: + ``` + - eventName: c2p.policy-deployment.179e284f776397b3 + lastTimestamp: "2023-12-06T05:53:50Z" + message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in + namespace cluster1 missing; [nginx-deployment] in namespace default missing; [nginx-deployment] + in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public + missing; [nginx-deployment] in namespace kyverno missing; [nginx-deployment] in + namespace local-path-storage missing' + + ``` + + - Subject UUID: 6fade374-93fc-11ee-a029-62f79297f1b7 + - Title: Cluster Name: cluster2 + - Result: fail + - Reason: + ``` + - eventName: c2p.policy-deployment.179e2854bed6d22e + lastTimestamp: "2023-12-06T05:54:13Z" + message: 'NonCompliant; violation - deployments not found: [nginx-deployment] in + namespace cluster2 missing; [nginx-deployment] in namespace default missing; [nginx-deployment] + in namespace kube-node-lease missing; [nginx-deployment] in namespace kube-public + missing; [nginx-deployment] in namespace kyverno missing; [nginx-deployment] in + namespace local-path-storage missing' + + ``` +
+ +--- diff --git a/docs/ocm/final-outputs/ocm-policies/ConfigMap.c2p.c2p-parameters.yaml b/docs/ocm/final-outputs/ocm-policies/ConfigMap.c2p.c2p-parameters.yaml new file mode 100755 index 0000000..fe7cae6 --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/ConfigMap.c2p.c2p-parameters.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +data: + minimum_nginx_deployment_replicas: "3" +kind: ConfigMap +metadata: + creationTimestamp: null + name: c2p-parameters + namespace: c2p diff --git a/docs/ocm/final-outputs/ocm-policies/Placement.c2p.placement-managed-kubernetes.yaml b/docs/ocm/final-outputs/ocm-policies/Placement.c2p.placement-managed-kubernetes.yaml new file mode 100755 index 0000000..98cc439 --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/Placement.c2p.placement-managed-kubernetes.yaml @@ -0,0 +1,14 @@ +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement +metadata: + name: placement-managed-kubernetes + namespace: c2p +spec: + predicates: + - requiredClusterSelector: + labelSelector: + matchExpressions: + - key: my-cluster + operator: In + values: + - "true" diff --git a/docs/ocm/final-outputs/ocm-policies/PlacementBinding.c2p.policy-set.yaml b/docs/ocm/final-outputs/ocm-policies/PlacementBinding.c2p.policy-set.yaml new file mode 100755 index 0000000..b9de447 --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/PlacementBinding.c2p.policy-set.yaml @@ -0,0 +1,13 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: PlacementBinding +metadata: + name: policy-set + namespace: c2p +placementRef: + apiGroup: cluster.open-cluster-management.io + kind: Placement + name: placement-managed-kubernetes +subjects: +- apiGroup: policy.open-cluster-management.io + kind: PolicySet + name: managed-kubernetes diff --git a/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-deployment.yaml b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-deployment.yaml new file mode 100755 index 0000000..a8c458e --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-deployment.yaml @@ -0,0 +1,53 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: Policy +metadata: + annotations: + policy.open-cluster-management.io/categories: "" + policy.open-cluster-management.io/controls: cm-2 + policy.open-cluster-management.io/standards: "" + name: policy-deployment + namespace: c2p +spec: + disabled: false + policy-templates: + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-deployment + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: nginx + name: nginx-deployment + spec: + replicas: 3 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - image: nginx:1.21.4 + name: nginx + ports: + - containerPort: 80 + remediationAction: inform + severity: low + remediationAction: inform diff --git a/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-high-scan.yaml b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-high-scan.yaml new file mode 100755 index 0000000..390b861 --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-high-scan.yaml @@ -0,0 +1,100 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: Policy +metadata: + annotations: + policy.open-cluster-management.io/categories: "" + policy.open-cluster-management.io/controls: cm-6 + policy.open-cluster-management.io/standards: "" + name: policy-high-scan + namespace: c2p +spec: + disabled: false + policy-templates: + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-high-scan + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: compliance.openshift.io/v1alpha1 + kind: ScanSettingBinding + metadata: + name: high + namespace: openshift-compliance + profiles: + - apiGroup: compliance.openshift.io/v1alpha1 + kind: Profile + name: ocp4-high + - apiGroup: compliance.openshift.io/v1alpha1 + kind: Profile + name: ocp4-high-node + settingsRef: + apiGroup: compliance.openshift.io/v1alpha1 + kind: ScanSetting + name: default + remediationAction: inform + severity: high + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-high-scan2 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: compliance.openshift.io/v1alpha1 + kind: ComplianceSuite + metadata: + name: high + namespace: openshift-compliance + status: + phase: DONE + remediationAction: inform + severity: high + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-high-scan3 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: mustnothave + objectDefinition: + apiVersion: compliance.openshift.io/v1alpha1 + kind: ComplianceCheckResult + metadata: + labels: + compliance.openshift.io/check-status: FAIL + compliance.openshift.io/suite: high + namespace: openshift-compliance + remediationAction: inform + severity: high + remediationAction: inform diff --git a/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-install-kyverno-from-manifests.yaml b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-install-kyverno-from-manifests.yaml new file mode 100755 index 0000000..04db4e2 --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-install-kyverno-from-manifests.yaml @@ -0,0 +1,32668 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: Policy +metadata: + annotations: + policy.open-cluster-management.io/categories: "" + policy.open-cluster-management.io/controls: cm-6 + policy.open-cluster-management.io/standards: "" + name: policy-install-kyverno-from-manifests + namespace: c2p +spec: + disabled: false + policy-templates: + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests2 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-generaterequest + rules: + - apiGroups: + - kyverno.io + resources: + - generaterequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests3 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-policies + rules: + - apiGroups: + - kyverno.io + resources: + - policies + - clusterpolicies + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests4 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-policyreport + rules: + - apiGroups: + - wgpolicyk8s.io + resources: + - policyreports + - clusterpolicyreports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests5 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-reports + rules: + - apiGroups: + - kyverno.io + resources: + - admissionreports + - clusteradmissionreports + - backgroundscanreports + - clusterbackgroundscanreports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests6 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-updaterequest + rules: + - apiGroups: + - kyverno.io + resources: + - updaterequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests7 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:events + rules: + - apiGroups: + - '*' + resources: + - events + verbs: + - create + - update + - patch + - delete + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests8 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:generate + rules: + - apiGroups: + - networking.k8s.io + resources: + - ingresses + - ingressclasses + - networkpolicies + verbs: + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - namespaces + - configmaps + - secrets + - resourcequotas + - limitranges + verbs: + - create + - update + - patch + - delete + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - create + - update + - patch + - delete + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests9 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:policies + rules: + - apiGroups: + - kyverno.io + resources: + - policies + - policies/status + - clusterpolicies + - clusterpolicies/status + - generaterequests + - generaterequests/status + - updaterequests + - updaterequests/status + - admissionreports + - clusteradmissionreports + - backgroundscanreports + - clusterbackgroundscanreports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - deletecollection + - apiGroups: + - wgpolicyk8s.io + resources: + - policyreports + - policyreports/status + - clusterpolicyreports + - clusterpolicyreports/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - deletecollection + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests10 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:userinfo + rules: + - apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + - clusterroles + - rolebindings + - clusterrolebindings + verbs: + - watch + - list + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests11 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:view + rules: + - apiGroups: + - '*' + resources: + - '*' + verbs: + - get + - list + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests12 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:webhook + rules: + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests13 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kyverno + subjects: + - kind: ServiceAccount + name: kyverno + namespace: kyverno + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests14 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: v1 + data: + namespaces: '{"exclude":[],"include":[]}' + kind: ConfigMap + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno-metrics + namespace: kyverno + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests15 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: v1 + data: + resourceFilters: '[*,kyverno,*][Event,*,*][*,kube-system,*][*,kube-public,*][*,kube-node-lease,*][Node,*,*][APIService,*,*][TokenReview,*,*][SubjectAccessReview,*,*][SelfSubjectAccessReview,*,*][Binding,*,*][ReplicaSet,*,*][AdmissionReport,*,*][ClusterAdmissionReport,*,*][BackgroundScanReport,*,*][ClusterBackgroundScanReport,*,*][ClusterRole,*,kyverno:*][ClusterRoleBinding,*,kyverno:*][ServiceAccount,kyverno,kyverno][ConfigMap,kyverno,kyverno][ConfigMap,kyverno,kyverno-metrics][Deployment,kyverno,kyverno][Job,kyverno,kyverno-hook-pre-delete][NetworkPolicy,kyverno,kyverno][PodDisruptionBudget,kyverno,kyverno][Role,kyverno,kyverno:*][RoleBinding,kyverno,kyverno:*][Secret,kyverno,kyverno-svc.kyverno.svc.*][Service,kyverno,kyverno-svc][Service,kyverno,kyverno-svc-metrics][ServiceMonitor,kyverno,kyverno-svc-service-monitor][Pod,kyverno,kyverno-test]' + webhooks: '[{"namespaceSelector": {"matchExpressions": [{"key":"kubernetes.io/metadata.name","operator":"NotIn","values":["kyverno"]}]}}]' + kind: ConfigMap + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + namespace: kyverno + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests16 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "1" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "1" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: admissionreports.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + kind: AdmissionReport + listKind: AdmissionReportList + plural: admissionreports + shortNames: + - admr + singular: admissionreport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + - jsonPath: .metadata.labels['audit\.kyverno\.io/report\.aggregate'] + name: AGGREGATE + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: AdmissionReport is the Schema for the AdmissionReports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + owner: + description: Owner is a reference to the report owner + (e.g. a Deployment, Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from + the key-value store until this reference is removed. + See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this + field and enforces the foreground deletion. Defaults + to false. To set this field, a user needs "delete" + permission of the owner, otherwise 422 (Unprocessable + Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the + managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result + for an individual policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly + message for the policy rule + type: string + policy: + description: Policy is the name or identifier of + the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information + for the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label + selector for checked Kubernetes resources. For + example, a policy result may apply to all pods + that match a label. Either a Subject or a SubjectSelector + can be specified. If neither are provided, the + result is assumed to be for the policy report + scope. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to + the checked Kubernetes resources + items: + description: "ObjectReference contains enough + information to let you inspect or modify the + referred object. --- New uses of this type are + discouraged because of difficulty describing + its usage when embedded in APIs. 1. Ignored + fields. It includes many fields which are not + generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in + actual usage. 2. Invalid usage help. It is + impossible to add specific help for individual + usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types + A and B\" or \"UID not honored\" or \"name must + be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because + the usages are different, the validation rules + are different by usage, which makes it hard + for users to predict what will happen. 4. The + fields are both imprecise and overly precise. + \ Kind is not a precise mapping to a URL. This + can produce ambiguity during interpretation + and require a REST mapping. In most cases, + the dependency is on the group,resource tuple + and the version of the actual struct is irrelevant. + 5. We cannot easily change it. Because this + type is embedded in many locations, updates + to this type will affect numerous schemas. Don't + make new APIs embed an underspecified API type + they do not control. \n Instead of using this + type, create a locally provided and used type + that is well-focused on your reference. For + example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an + object instead of an entire object, this + string should contain a valid JSON/Go field + access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is + to a container within a pod, this would + take on a value like: "spec.containers{name}" + (where "name" refers to the name of the + container that triggered the event) or if + no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This + syntax is chosen only to have some well-defined + way of referencing a part of an object. + TODO: this design is not final and this + field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to + which this reference is made, if any. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the + policy rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the + rule within the policy + type: string + scored: + description: Scored indicates if this result is + scored + type: boolean + severity: + description: Severity indicates policy check result + criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy + engine that manages this report + type: string + timestamp: + description: Timestamp indicates the time the result + was found + properties: + nanos: + description: Non-negative fractions of a second + at nanosecond resolution. Negative second + values with fractions must still have non-negative + nanos values that count forward in time. Must + be from 0 to 999,999,999 inclusive. This field + may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time + since Unix epoch 1970-01-01T00:00:00Z. Must + be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z + inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of + results + properties: + error: + description: Error provides the count of policies + that could not be evaluated + type: integer + fail: + description: Fail provides the count of policies whose + requirements were not met + type: integer + pass: + description: Pass provides the count of policies whose + requirements were met + type: integer + skip: + description: Skip indicates the count of policies + that were not selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored + policies whose requirements were not met + type: integer + type: object + required: + - owner + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests17 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "2" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "2" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: backgroundscanreports.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + kind: BackgroundScanReport + listKind: BackgroundScanReportList + plural: backgroundscanreports + shortNames: + - bgscanr + singular: backgroundscanreport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: BackgroundScanReport is the Schema for the BackgroundScanReports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result + for an individual policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly + message for the policy rule + type: string + policy: + description: Policy is the name or identifier of + the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information + for the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label + selector for checked Kubernetes resources. For + example, a policy result may apply to all pods + that match a label. Either a Subject or a SubjectSelector + can be specified. If neither are provided, the + result is assumed to be for the policy report + scope. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to + the checked Kubernetes resources + items: + description: "ObjectReference contains enough + information to let you inspect or modify the + referred object. --- New uses of this type are + discouraged because of difficulty describing + its usage when embedded in APIs. 1. Ignored + fields. It includes many fields which are not + generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in + actual usage. 2. Invalid usage help. It is + impossible to add specific help for individual + usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types + A and B\" or \"UID not honored\" or \"name must + be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because + the usages are different, the validation rules + are different by usage, which makes it hard + for users to predict what will happen. 4. The + fields are both imprecise and overly precise. + \ Kind is not a precise mapping to a URL. This + can produce ambiguity during interpretation + and require a REST mapping. In most cases, + the dependency is on the group,resource tuple + and the version of the actual struct is irrelevant. + 5. We cannot easily change it. Because this + type is embedded in many locations, updates + to this type will affect numerous schemas. Don't + make new APIs embed an underspecified API type + they do not control. \n Instead of using this + type, create a locally provided and used type + that is well-focused on your reference. For + example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an + object instead of an entire object, this + string should contain a valid JSON/Go field + access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is + to a container within a pod, this would + take on a value like: "spec.containers{name}" + (where "name" refers to the name of the + container that triggered the event) or if + no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This + syntax is chosen only to have some well-defined + way of referencing a part of an object. + TODO: this design is not final and this + field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to + which this reference is made, if any. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the + policy rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the + rule within the policy + type: string + scored: + description: Scored indicates if this result is + scored + type: boolean + severity: + description: Severity indicates policy check result + criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy + engine that manages this report + type: string + timestamp: + description: Timestamp indicates the time the result + was found + properties: + nanos: + description: Non-negative fractions of a second + at nanosecond resolution. Negative second + values with fractions must still have non-negative + nanos values that count forward in time. Must + be from 0 to 999,999,999 inclusive. This field + may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time + since Unix epoch 1970-01-01T00:00:00Z. Must + be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z + inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of + results + properties: + error: + description: Error provides the count of policies + that could not be evaluated + type: integer + fail: + description: Fail provides the count of policies whose + requirements were not met + type: integer + pass: + description: Pass provides the count of policies whose + requirements were met + type: integer + skip: + description: Skip indicates the count of policies + that were not selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored + policies whose requirements were not met + type: integer + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests18 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "3" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "3" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusteradmissionreports.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + kind: ClusterAdmissionReport + listKind: ClusterAdmissionReportList + plural: clusteradmissionreports + shortNames: + - cadmr + singular: clusteradmissionreport + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + - jsonPath: .metadata.labels['audit\.kyverno\.io/report\.aggregate'] + name: AGGREGATE + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: ClusterAdmissionReport is the Schema for the ClusterAdmissionReports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + owner: + description: Owner is a reference to the report owner + (e.g. a Deployment, Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from + the key-value store until this reference is removed. + See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this + field and enforces the foreground deletion. Defaults + to false. To set this field, a user needs "delete" + permission of the owner, otherwise 422 (Unprocessable + Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the + managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result + for an individual policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly + message for the policy rule + type: string + policy: + description: Policy is the name or identifier of + the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information + for the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label + selector for checked Kubernetes resources. For + example, a policy result may apply to all pods + that match a label. Either a Subject or a SubjectSelector + can be specified. If neither are provided, the + result is assumed to be for the policy report + scope. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to + the checked Kubernetes resources + items: + description: "ObjectReference contains enough + information to let you inspect or modify the + referred object. --- New uses of this type are + discouraged because of difficulty describing + its usage when embedded in APIs. 1. Ignored + fields. It includes many fields which are not + generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in + actual usage. 2. Invalid usage help. It is + impossible to add specific help for individual + usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types + A and B\" or \"UID not honored\" or \"name must + be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because + the usages are different, the validation rules + are different by usage, which makes it hard + for users to predict what will happen. 4. The + fields are both imprecise and overly precise. + \ Kind is not a precise mapping to a URL. This + can produce ambiguity during interpretation + and require a REST mapping. In most cases, + the dependency is on the group,resource tuple + and the version of the actual struct is irrelevant. + 5. We cannot easily change it. Because this + type is embedded in many locations, updates + to this type will affect numerous schemas. Don't + make new APIs embed an underspecified API type + they do not control. \n Instead of using this + type, create a locally provided and used type + that is well-focused on your reference. For + example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an + object instead of an entire object, this + string should contain a valid JSON/Go field + access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is + to a container within a pod, this would + take on a value like: "spec.containers{name}" + (where "name" refers to the name of the + container that triggered the event) or if + no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This + syntax is chosen only to have some well-defined + way of referencing a part of an object. + TODO: this design is not final and this + field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to + which this reference is made, if any. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the + policy rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the + rule within the policy + type: string + scored: + description: Scored indicates if this result is + scored + type: boolean + severity: + description: Severity indicates policy check result + criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy + engine that manages this report + type: string + timestamp: + description: Timestamp indicates the time the result + was found + properties: + nanos: + description: Non-negative fractions of a second + at nanosecond resolution. Negative second + values with fractions must still have non-negative + nanos values that count forward in time. Must + be from 0 to 999,999,999 inclusive. This field + may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time + since Unix epoch 1970-01-01T00:00:00Z. Must + be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z + inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of + results + properties: + error: + description: Error provides the count of policies + that could not be evaluated + type: integer + fail: + description: Fail provides the count of policies whose + requirements were not met + type: integer + pass: + description: Pass provides the count of policies whose + requirements were met + type: integer + skip: + description: Skip indicates the count of policies + that were not selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored + policies whose requirements were not met + type: integer + type: object + required: + - owner + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests19 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "4" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "4" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusterbackgroundscanreports.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + kind: ClusterBackgroundScanReport + listKind: ClusterBackgroundScanReportList + plural: clusterbackgroundscanreports + shortNames: + - cbgscanr + singular: clusterbackgroundscanreport + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: ClusterBackgroundScanReport is the Schema for the + ClusterBackgroundScanReports API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result + for an individual policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly + message for the policy rule + type: string + policy: + description: Policy is the name or identifier of + the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information + for the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label + selector for checked Kubernetes resources. For + example, a policy result may apply to all pods + that match a label. Either a Subject or a SubjectSelector + can be specified. If neither are provided, the + result is assumed to be for the policy report + scope. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to + the checked Kubernetes resources + items: + description: "ObjectReference contains enough + information to let you inspect or modify the + referred object. --- New uses of this type are + discouraged because of difficulty describing + its usage when embedded in APIs. 1. Ignored + fields. It includes many fields which are not + generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in + actual usage. 2. Invalid usage help. It is + impossible to add specific help for individual + usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types + A and B\" or \"UID not honored\" or \"name must + be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because + the usages are different, the validation rules + are different by usage, which makes it hard + for users to predict what will happen. 4. The + fields are both imprecise and overly precise. + \ Kind is not a precise mapping to a URL. This + can produce ambiguity during interpretation + and require a REST mapping. In most cases, + the dependency is on the group,resource tuple + and the version of the actual struct is irrelevant. + 5. We cannot easily change it. Because this + type is embedded in many locations, updates + to this type will affect numerous schemas. Don't + make new APIs embed an underspecified API type + they do not control. \n Instead of using this + type, create a locally provided and used type + that is well-focused on your reference. For + example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an + object instead of an entire object, this + string should contain a valid JSON/Go field + access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is + to a container within a pod, this would + take on a value like: "spec.containers{name}" + (where "name" refers to the name of the + container that triggered the event) or if + no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This + syntax is chosen only to have some well-defined + way of referencing a part of an object. + TODO: this design is not final and this + field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to + which this reference is made, if any. More + info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the + policy rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the + rule within the policy + type: string + scored: + description: Scored indicates if this result is + scored + type: boolean + severity: + description: Severity indicates policy check result + criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy + engine that manages this report + type: string + timestamp: + description: Timestamp indicates the time the result + was found + properties: + nanos: + description: Non-negative fractions of a second + at nanosecond resolution. Negative second + values with fractions must still have non-negative + nanos values that count forward in time. Must + be from 0 to 999,999,999 inclusive. This field + may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time + since Unix epoch 1970-01-01T00:00:00Z. Must + be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z + inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of + results + properties: + error: + description: Error provides the count of policies + that could not be evaluated + type: integer + fail: + description: Fail provides the count of policies whose + requirements were not met + type: integer + pass: + description: Pass provides the count of policies whose + requirements were met + type: integer + skip: + description: Skip indicates the count of policies + that were not selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored + policies whose requirements were not met + type: integer + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests20 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "5" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "5" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusterpolicies.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + kind: ClusterPolicy + listKind: ClusterPolicyList + plural: clusterpolicies + shortNames: + - cpol + singular: clusterpolicy + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: ClusterPolicy declares validation, mutation, and + generation behaviors for matching resources. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec declares policy behaviors. + properties: + applyRules: + description: ApplyRules controls how rules in a policy + are applied. Rule are processed in the order of declaration. + When set to `One` processing stops after a rule has + been applied i.e. the rule matches and results in a + pass, fail, or error. When set to `All` all rules in + the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied + to existing resources during a background scan. Optional. + Default value is "true". The value must be set to "false" + if the policy rule uses variables that are only available + in the admission review request (e.g. user name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy + errors and webhook response timeout errors are handled. + Rules within the same policy share the same failure + behavior. Allowed values are Ignore or Fail. Defaults + to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether + to trigger generate rule in existing resources If is + set to "true" generate rule will be triggered and applied + to existing matched resources. Defaults to "false" if + not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if + a mutateExisting policy is applied on policy events. + Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy + contains multiple rules and each rule can validate, + mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or + generation control for matching resources. Each rules + contains a match declaration to select resources, + and an optional exclude declaration to specify which + resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the JSON response returned + from the API server. For example a JMESPath + of "items | length(@)" applied to the + API server response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the ImageData struct returned + as a result of processing the image + reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be defined + inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON + form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information (e.g. + kind, name, namespace, labels) and admission review + request information like the name or role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + Requires at least one tag to be specified + when under MatchResources. Specifying ResourceDescription + directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). NOTE: + "Name" is being deprecated in favor of + "Names".' + type: string + names: + description: Names are the names of the + resources. Each name supports wildcard + characters "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` (matches + zero or many characters) and `?` (matches + one character). Wildcards allows writing + label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches + any key and value but does not match an + empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either hold + a direct API object reference, or a value + for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults + to "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are + "User", "Group", and "ServiceAccount". + If the Authorizer does not recognized + the kind value, the Authorizer should + report an error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource + used to populate each generated resource. + At most one of Data or Clone can be specified. + If neither are provided, the generated resource + will be created with default data only. + properties: + name: + description: Name specifies name of the + resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of + source resource used to populate each generated + resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. + At most one of Data or Clone must be specified. + If neither are provided, the generated resource + will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with their + source resource. If Synchronize is set to + "true" changes to generated resources will + be overwritten with resource data from Data + or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of + the field within 'path' that will be used + to uniquely identify an image. Note - + this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not defined, + image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object + containing the image field in a custom + resource. It should be slash-separated. + Each slash-separated key must be a valid + YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of + the field within 'path' that points to + the image URI. This is useful when a custom + 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from + kinds to ImageExtractorConfigs. This config is + only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this policy + rule should be applied. The match criteria can + include resource information (e.g. kind, name, + namespace, labels) and admission review request + information like the user name or role. At least + one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + Requires at least one tag to be specified + when under MatchResources. Specifying ResourceDescription + directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). NOTE: + "Name" is being deprecated in favor of + "Names".' + type: string + names: + description: Names are the names of the + resources. Each name supports wildcard + characters "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` (matches + zero or many characters) and `?` (matches + one character). Wildcards allows writing + label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches + any key and value but does not match an + empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either hold + a direct API object reference, or a value + for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults + to "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are + "User", "Group", and "ServiceAccount". + If the Authorizer does not recognized + the kind value, the Authorizer should + report an error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies mutation rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a + strategic merge patch used to modify + resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list + of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See + https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources + to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, + It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct list + of conditions (without `any` or `all` statements + is supported for backwards compatibility but will + be deprecated in the next major release. See: + https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching + resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to + pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be + declared under an `any` or `all` statement. + A direct list of conditions (without `any` + or `all` statements) is also supported + for backwards compatibility but will be + deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies validate rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + anyPattern: + description: AnyPattern specifies list + of validation patterns. At least one + of the patterns must be satisfied for + the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` or + `all` statement. A direct list of + conditions (without `any` or `all` + statements) is also supported for + backwards compatibility but will + be deprecated in the next major + release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether + to use the current list element as the + scope for validation. Defaults to "true" + if not specified. When set to "false", + "request.object" is used as the validation + scope within the foreach block to allow + referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for + manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and signature. + Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must + be less than or equal to the size + of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. The + payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked + and a root certificate + chain is expected instead. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an + optional set of PEM encoded + trusted root certificates. + If not provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a + variable reference to + a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and + attestations that match this + rule. If specified Repository + will override other OCI image + repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle + reference. The repository can be overridden + per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message + to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission by specifying + exclusions for Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls to + be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security Standard + control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the image + name consisting of the registry + address, repository, image, and + tag. Empty list matches no containers, + PSS checks are applied at the pod + level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security + Standard versions that Kubernetes supports. + Allowed values are v1.19, v1.20, v1.21, + v1.22, v1.23, v1.24, v1.25, latest. Defaults + to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image + signatures and mutate them to add a digest + items: + description: ImageVerification validates that + images that match the specified pattern are + signed with the supplied public key. Once the + image is verified it is mutated to include the + SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other key-value + pairs. Deprecated. Use annotations per Attestor + instead. + type: object + attestations: + description: Attestations are optional checks + for signed in-toto Statements used to verify + the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into a + list of Statement declarations. + items: + description: Attestation are checks for + signed in-toto Statements that are used + to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into + a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to + verify attributes within a Predicate. + If no Conditions are specified the + attestation check is satisfied as + long there are predicates that match + the predicate type. + items: + description: AnyAllConditions consists + of conditions wrapped denoting a + logical criteria to be fulfilled. + AnyConditions get fulfilled when + at least one of its sub-conditions + passes. AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the + type of Predicate contained within + the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must be + less than or equal to the size of + entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a variable + reference to a key specified + in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as + a separate staticKey entry + (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting + of the registry address, repository, image, + and tag. Wildcards (''*'' and ''?'') are + allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of + matching image reference patterns. At least + one pattern in the list must match the image + for the rule to apply. Each image reference + consists of a registry address (defaults + to docker.io), repository, image, and tag + (defaults to latest). Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer + used for keyless signing. Deprecated. Use + KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public + key that the image or attestation is signed + with. Deprecated. Use StaticKeyAttestor + instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults to + true. + type: boolean + repository: + description: Repository is an optional alternate + OCI repository to use for image signatures + and attestations that match this rule. If + specified Repository will override the default + OCI image repository configured for the + installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed a + signature or attestation check. + type: boolean + roots: + description: Roots is the PEM encoded Root + certificate chain used for keyless signing + Deprecated. Use KeylessAttestor instead. + type: string + subject: + description: Subject is the identity used + for keyless signing, for example an email + address Deprecated. Use KeylessAttestor + instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images + have a digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks + for policies as well as patched resources. Optional. + The default value is set to "true", it must be set to + "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation + policy rule violation should block the admission review + request (enforce), or allow (audit) the admission review + request and report an error in a policy report. Optional. + Allowed values are audit or enforce. The default value + is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster + Policy attribute that specifies ValidationFailureAction + namespace-wise. It overrides ValidationFailureAction + for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the + policy validation failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum + time in seconds allowed to apply this policy. After + the configured time expires, the admission request may + fail, or may simply ignore the policy results, based + on the failure policy. The default timeout is 10s, the + value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime data. + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It + contains auto generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, + or generation control for matching resources. + Each rules contains a match declaration to select + resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a + ConfigMap reference or a APILookup must + be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same + format used by the `kubectl get + --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData + struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be + used to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information + (e.g. kind, name, namespace, labels) and admission + review request information like the name or + role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new + resources. + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + clone: + description: Clone specifies the source + resource used to populate each generated + resource. At most one of Data or Clone + can be specified. If neither are provided, + the generated resource will be created + with default data only. + properties: + name: + description: Name specifies name of + the resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list + of source resource used to populate each + generated resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource + declaration used to populate each generated + resource. At most one of Data or Clone + must be specified. If neither are provided, + the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with + their source resource. If Synchronize + is set to "true" changes to generated + resources will be overwritten with resource + data from Data or the resource specified + in the Clone declaration. Optional. Defaults + to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name + of the field within 'path' that will + be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not + defined, image entries will appear + under 'images.custom'. + type: string + path: + description: Path is the path to the + object containing the image field + in a custom resource. It should be + slash-separated. Each slash-separated + key must be a valid YAML key or a + wildcard '*'. Wildcard keys are expanded + in case of arrays or objects. + type: string + value: + description: Value is an optional name + of the field within 'path' that points + to the image URI. This is useful when + a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping + from kinds to ImageExtractorConfigs. This + config is only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this + policy rule should be applied. The match criteria + can include resource information (e.g. kind, + name, namespace, labels) and admission review + request information like the user name or + role. At least one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies mutation + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is + a strategic merge patch used to + modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a + list of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. + See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of + RFC 6902 JSON Patch declarations used + to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target + resources to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies + resource apiVersion. + type: string + kind: + description: Kind specifies resource + kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the + rule, It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct + list of conditions (without `any` or `all` + statements is supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate + matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of + validation patterns. At least one of the + patterns must be satisfied for the validation + rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can + be declared under an `any` or `all` + statement. A direct list of conditions + (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next + major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies validate + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies + list of validation patterns. At + least one of the patterns must be + satisfied for the validation rule + to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions + used to pass or fail a validation + rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` + or `all` statement. A direct + list of conditions (without + `any` or `all` statements) is + also supported for backwards + compatibility but will be deprecated + in the next major release. See: + https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies + whether to use the current list + element as the scope for validation. + Defaults to "true" if not specified. + When set to "false", "request.object" + is used as the validation scope + within the foreach block to allow + referencing other elements in the + subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + pattern: + description: Pattern specifies an + overlay-style pattern used to check + resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions + for manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and + signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional + alternate OCI repository to use for + resource bundle reference. The repository + can be overridden per Attestor or + Attestation. + type: string + type: object + message: + description: Message specifies a custom + message to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission + by specifying exclusions for Pod Security + Standards controls. + properties: + exclude: + description: Exclude specifies the Pod + Security Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls + to be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security + Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the + image name consisting of the + registry address, repository, + image, and tag. Empty list matches + no containers, PSS checks are + applied at the pod level only. + Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod + Security Standard versions that Kubernetes + supports. Allowed values are v1.19, + v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify + image signatures and mutate them to add a + digest + items: + description: ImageVerification validates that + images that match the specified pattern + are signed with the supplied public key. + Once the image is verified it is mutated + to include the SHA digest retrieved during + the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. Deprecated. + Use annotations per Attestor instead. + type: object + attestations: + description: Attestations are optional + checks for signed in-toto Statements + used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes them + into a list of Statement declarations. + items: + description: Attestation are checks + for signed in-toto Statements that + are used to verify the image. See + https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies + the required number of entries + that must match. If the + count is null, all entries + must match (a logical AND). + If the count is 1, at least + one entry must match (a + logical OR). If the count + contains a value N, then + N must be less than or equal + to the size of entries, + and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. + An attestor can be a static + key, attributes for keyless + verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image + verification. Every + specified key-value + pair must exist and + match in the verified + payload. The payload + may contain other + key-value pairs. + type: object + attestor: + description: Attestor + is a nested AttestorSet + used to specify a + more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional + PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional + PEM encoded set + of certificates + used to verify + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless + is a set of attribute + used to verify a Sigstore + keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless + signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for + keyless signing. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked + and a root certificate + chain is expected + instead. If an + empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots + is an optional + set of PEM encoded + trusted root certificates. + If not provided, + the system roots + are used. + type: string + subject: + description: Subject + is the verified + identity used + for keyless signing, + for example the + email address + type: string + type: object + keys: + description: Keys specifies + one or more public + keys + properties: + publicKeys: + description: Keys + is a set of X.509 + public keys used + to verify image + signatures. The + keys can be directly + specified or can + be a variable + reference to a + key specified + in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple + keys are specified + each key is processed + as a separate + staticKey entry + (.attestors[*].entries.keys) + within the set + of attestors and + the count is applied + across the keys. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to + use for signatures + and attestations that + match this rule. If + specified Repository + will override other + OCI image repository + locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used + to verify attributes within a + Predicate. If no Conditions are + specified the attestation check + is satisfied as long there are + predicates that match the predicate + type. + items: + description: AnyAllConditions + consists of conditions wrapped + denoting a logical criteria + to be fulfilled. AnyConditions + get fulfilled when at least + one of its sub-conditions passes. + AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, all of the + conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, at least + one of the conditions need + to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines + the type of Predicate contained + within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is null, + all entries must match (a logical + AND). If the count is 1, at least + one entry must match (a logical + OR). If the count contains a value + N, then N must be less than or + equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a + nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a + set of attribute used to + verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is + the certificate issuer + used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked and a root certificate + chain is expected instead. + If an empty object is + provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of PEM + encoded trusted root + certificates. If not + provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a + set of X.509 public + keys used to verify + image signatures. The + keys can be directly + specified or can be + a variable reference + to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is + an optional alternate OCI + repository to use for signatures + and attestations that match + this rule. If specified + Repository will override + other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name + consisting of the registry address, + repository, image, and tag. Wildcards + (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list + of matching image reference patterns. + At least one pattern in the list must + match the image for the rule to apply. + Each image reference consists of a registry + address (defaults to docker.io), repository, + image, and tag (defaults to latest). + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate + issuer used for keyless signing. Deprecated. + Use KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public + key that the image or attestation is + signed with. Deprecated. Use StaticKeyAttestor + instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults + to true. + type: boolean + repository: + description: Repository is an optional + alternate OCI repository to use for + image signatures and attestations that + match this rule. If specified Repository + will override the default OCI image + repository configured for the installation. + The repository can also be overridden + per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed + a signature or attestation check. + type: boolean + roots: + description: Roots is the PEM encoded + Root certificate chain used for keyless + signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used + for keyless signing, for example an + email address Deprecated. Use KeylessAttestor + instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that + images have a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply + to the policy + items: + description: "Condition contains details for one aspect + of the current state of this API Resource. --- This + struct is intended for direct use as an array at the + field path .status.conditions. For example, \n type + FooStatus struct{ // Represents the observations of + a foo's current state. // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" + // +patchMergeKey=type // +patchStrategy=merge // + +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" + patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time + the condition transitioned from one status to + another. This should be when the underlying condition + changed. If that is not known, then using the + time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message + indicating details about the transition. This + may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the + .status.conditions[x].observedGeneration is 9, + the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last + transition. Producers of specific condition types + may define expected values and meanings for this + field, and whether the values are considered a + guaranteed API. The value should be a CamelCase + string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. --- Many .condition.type + values are consistent across resources like Available, + but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to + deconflict is important. The regex it matches + is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to + serve the admission request. Deprecated in favor of + Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v2beta1 + schema: + openAPIV3Schema: + description: ClusterPolicy declares validation, mutation, and + generation behaviors for matching resources. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec declares policy behaviors. + properties: + applyRules: + description: ApplyRules controls how rules in a policy + are applied. Rule are processed in the order of declaration. + When set to `One` processing stops after a rule has + been applied i.e. the rule matches and results in a + pass, fail, or error. When set to `All` all rules in + the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied + to existing resources during a background scan. Optional. + Default value is "true". The value must be set to "false" + if the policy rule uses variables that are only available + in the admission review request (e.g. user name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy + errors and webhook response timeout errors are handled. + Rules within the same policy share the same failure + behavior. Allowed values are Ignore or Fail. Defaults + to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether + to trigger generate rule in existing resources If is + set to "true" generate rule will be triggered and applied + to existing matched resources. Defaults to "false" if + not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if + a mutateExisting policy is applied on policy events. + Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy + contains multiple rules and each rule can validate, + mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or + generation control for matching resources. Each rules + contains a match declaration to select resources, + and an optional exclude declaration to specify which + resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the JSON response returned + from the API server. For example a JMESPath + of "items | length(@)" applied to the + API server response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the ImageData struct returned + as a result of processing the image + reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be defined + inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON + form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information (e.g. + kind, name, namespace, labels) and admission review + request information like the name or role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource + used to populate each generated resource. + At most one of Data or Clone can be specified. + If neither are provided, the generated resource + will be created with default data only. + properties: + name: + description: Name specifies name of the + resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of + source resource used to populate each generated + resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. + At most one of Data or Clone must be specified. + If neither are provided, the generated resource + will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with their + source resource. If Synchronize is set to + "true" changes to generated resources will + be overwritten with resource data from Data + or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of + the field within 'path' that will be used + to uniquely identify an image. Note - + this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not defined, + image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object + containing the image field in a custom + resource. It should be slash-separated. + Each slash-separated key must be a valid + YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of + the field within 'path' that points to + the image URI. This is useful when a custom + 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from + kinds to ImageExtractorConfigs. This config is + only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this policy + rule should be applied. The match criteria can + include resource information (e.g. kind, name, + namespace, labels) and admission review request + information like the user name or role. At least + one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies mutation rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a + strategic merge patch used to modify + resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list + of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See + https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources + to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, + It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct list + of conditions (without `any` or `all` statements + is supported for backwards compatibility but See: + https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of the + conditions need to pass + items: + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + validate: + description: Validation is used to validate matching + resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to + pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be + declared under an `any` or `all` statement. + A direct list of conditions (without `any` + or `all` statements) is also supported + for backwards compatibility See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, all of the conditions need to + pass + items: + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or can + be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, at least one of the conditions + need to pass + items: + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or can + be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies validate rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + anyPattern: + description: AnyPattern specifies list + of validation patterns. At least one + of the patterns must be satisfied for + the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` or + `all` statement. A direct list of + conditions (without `any` or `all` + statements) is also supported for + backwards compatibility but will + be deprecated in the next major + release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether + to use the current list element as the + scope for validation. Defaults to "true" + if not specified. When set to "false", + "request.object" is used as the validation + scope within the foreach block to allow + referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for + manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and signature. + Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must + be less than or equal to the size + of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. The + payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked + and a root certificate + chain is expected instead. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an + optional set of PEM encoded + trusted root certificates. + If not provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a + variable reference to + a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and + attestations that match this + rule. If specified Repository + will override other OCI image + repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle + reference. The repository can be overridden + per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message + to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission by specifying + exclusions for Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls to + be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security Standard + control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the image + name consisting of the registry + address, repository, image, and + tag. Empty list matches no containers, + PSS checks are applied at the pod + level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security + Standard versions that Kubernetes supports. + Allowed values are v1.19, v1.20, v1.21, + v1.22, v1.23, v1.24, v1.25, latest. Defaults + to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image + signatures and mutate them to add a digest + items: + description: ImageVerification validates that + images that match the specified pattern are + signed with the supplied public key. Once the + image is verified it is mutated to include the + SHA digest retrieved during the registration. + properties: + attestations: + description: Attestations are optional checks + for signed in-toto Statements used to verify + the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into a + list of Statement declarations. + items: + description: Attestation are checks for + signed in-toto Statements that are used + to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into + a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to + verify attributes within a Predicate. + If no Conditions are specified the + attestation check is satisfied as + long there are predicates that match + the predicate type. + items: + description: AnyAllConditions consists + of conditions wrapped denoting a + logical criteria to be fulfilled. + AnyConditions get fulfilled when + at least one of its sub-conditions + passes. AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the + type of Predicate contained within + the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must be + less than or equal to the size of + entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a variable + reference to a key specified + in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as + a separate staticKey entry + (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + imageReferences: + description: 'ImageReferences is a list of + matching image reference patterns. At least + one pattern in the list must match the image + for the rule to apply. Each image reference + consists of a registry address (defaults + to docker.io), repository, image, and tag + (defaults to latest). Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults to + true. + type: boolean + repository: + description: Repository is an optional alternate + OCI repository to use for image signatures + and attestations that match this rule. If + specified Repository will override the default + OCI image repository configured for the + installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed a + signature or attestation check. + type: boolean + verifyDigest: + default: true + description: VerifyDigest validates that images + have a digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks + for policies as well as patched resources. Optional. + The default value is set to "true", it must be set to + "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation + policy rule violation should block the admission review + request (enforce), or allow (audit) the admission review + request and report an error in a policy report. Optional. + Allowed values are audit or enforce. The default value + is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster + Policy attribute that specifies ValidationFailureAction + namespace-wise. It overrides ValidationFailureAction + for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the + policy validation failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum + time in seconds allowed to apply this policy. After + the configured time expires, the admission request may + fail, or may simply ignore the policy results, based + on the failure policy. The default timeout is 10s, the + value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime data. + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It + contains auto generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, + or generation control for matching resources. + Each rules contains a match declaration to select + resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a + ConfigMap reference or a APILookup must + be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same + format used by the `kubectl get + --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData + struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be + used to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information + (e.g. kind, name, namespace, labels) and admission + review request information like the name or + role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new + resources. + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + clone: + description: Clone specifies the source + resource used to populate each generated + resource. At most one of Data or Clone + can be specified. If neither are provided, + the generated resource will be created + with default data only. + properties: + name: + description: Name specifies name of + the resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list + of source resource used to populate each + generated resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource + declaration used to populate each generated + resource. At most one of Data or Clone + must be specified. If neither are provided, + the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with + their source resource. If Synchronize + is set to "true" changes to generated + resources will be overwritten with resource + data from Data or the resource specified + in the Clone declaration. Optional. Defaults + to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name + of the field within 'path' that will + be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not + defined, image entries will appear + under 'images.custom'. + type: string + path: + description: Path is the path to the + object containing the image field + in a custom resource. It should be + slash-separated. Each slash-separated + key must be a valid YAML key or a + wildcard '*'. Wildcard keys are expanded + in case of arrays or objects. + type: string + value: + description: Value is an optional name + of the field within 'path' that points + to the image URI. This is useful when + a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping + from kinds to ImageExtractorConfigs. This + config is only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this + policy rule should be applied. The match criteria + can include resource information (e.g. kind, + name, namespace, labels) and admission review + request information like the user name or + role. At least one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies mutation + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is + a strategic merge patch used to + modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a + list of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. + See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of + RFC 6902 JSON Patch declarations used + to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target + resources to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies + resource apiVersion. + type: string + kind: + description: Kind specifies resource + kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the + rule, It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct + list of conditions (without `any` or `all` + statements is supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate + matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of + validation patterns. At least one of the + patterns must be satisfied for the validation + rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can + be declared under an `any` or `all` + statement. A direct list of conditions + (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next + major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies validate + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies + list of validation patterns. At + least one of the patterns must be + satisfied for the validation rule + to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions + used to pass or fail a validation + rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` + or `all` statement. A direct + list of conditions (without + `any` or `all` statements) is + also supported for backwards + compatibility but will be deprecated + in the next major release. See: + https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies + whether to use the current list + element as the scope for validation. + Defaults to "true" if not specified. + When set to "false", "request.object" + is used as the validation scope + within the foreach block to allow + referencing other elements in the + subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + pattern: + description: Pattern specifies an + overlay-style pattern used to check + resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions + for manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and + signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional + alternate OCI repository to use for + resource bundle reference. The repository + can be overridden per Attestor or + Attestation. + type: string + type: object + message: + description: Message specifies a custom + message to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission + by specifying exclusions for Pod Security + Standards controls. + properties: + exclude: + description: Exclude specifies the Pod + Security Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls + to be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security + Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the + image name consisting of the + registry address, repository, + image, and tag. Empty list matches + no containers, PSS checks are + applied at the pod level only. + Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod + Security Standard versions that Kubernetes + supports. Allowed values are v1.19, + v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify + image signatures and mutate them to add a + digest + items: + description: ImageVerification validates that + images that match the specified pattern + are signed with the supplied public key. + Once the image is verified it is mutated + to include the SHA digest retrieved during + the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. Deprecated. + Use annotations per Attestor instead. + type: object + attestations: + description: Attestations are optional + checks for signed in-toto Statements + used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes them + into a list of Statement declarations. + items: + description: Attestation are checks + for signed in-toto Statements that + are used to verify the image. See + https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies + the required number of entries + that must match. If the + count is null, all entries + must match (a logical AND). + If the count is 1, at least + one entry must match (a + logical OR). If the count + contains a value N, then + N must be less than or equal + to the size of entries, + and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. + An attestor can be a static + key, attributes for keyless + verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image + verification. Every + specified key-value + pair must exist and + match in the verified + payload. The payload + may contain other + key-value pairs. + type: object + attestor: + description: Attestor + is a nested AttestorSet + used to specify a + more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional + PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional + PEM encoded set + of certificates + used to verify + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless + is a set of attribute + used to verify a Sigstore + keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless + signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for + keyless signing. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked + and a root certificate + chain is expected + instead. If an + empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots + is an optional + set of PEM encoded + trusted root certificates. + If not provided, + the system roots + are used. + type: string + subject: + description: Subject + is the verified + identity used + for keyless signing, + for example the + email address + type: string + type: object + keys: + description: Keys specifies + one or more public + keys + properties: + publicKeys: + description: Keys + is a set of X.509 + public keys used + to verify image + signatures. The + keys can be directly + specified or can + be a variable + reference to a + key specified + in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple + keys are specified + each key is processed + as a separate + staticKey entry + (.attestors[*].entries.keys) + within the set + of attestors and + the count is applied + across the keys. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to + use for signatures + and attestations that + match this rule. If + specified Repository + will override other + OCI image repository + locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used + to verify attributes within a + Predicate. If no Conditions are + specified the attestation check + is satisfied as long there are + predicates that match the predicate + type. + items: + description: AnyAllConditions + consists of conditions wrapped + denoting a logical criteria + to be fulfilled. AnyConditions + get fulfilled when at least + one of its sub-conditions passes. + AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, all of the + conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, at least + one of the conditions need + to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines + the type of Predicate contained + within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is null, + all entries must match (a logical + AND). If the count is 1, at least + one entry must match (a logical + OR). If the count contains a value + N, then N must be less than or + equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a + nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a + set of attribute used to + verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is + the certificate issuer + used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked and a root certificate + chain is expected instead. + If an empty object is + provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of PEM + encoded trusted root + certificates. If not + provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a + set of X.509 public + keys used to verify + image signatures. The + keys can be directly + specified or can be + a variable reference + to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is + an optional alternate OCI + repository to use for signatures + and attestations that match + this rule. If specified + Repository will override + other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name + consisting of the registry address, + repository, image, and tag. Wildcards + (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list + of matching image reference patterns. + At least one pattern in the list must + match the image for the rule to apply. + Each image reference consists of a registry + address (defaults to docker.io), repository, + image, and tag (defaults to latest). + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate + issuer used for keyless signing. Deprecated. + Use KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public + key that the image or attestation is + signed with. Deprecated. Use StaticKeyAttestor + instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults + to true. + type: boolean + repository: + description: Repository is an optional + alternate OCI repository to use for + image signatures and attestations that + match this rule. If specified Repository + will override the default OCI image + repository configured for the installation. + The repository can also be overridden + per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed + a signature or attestation check. + type: boolean + roots: + description: Roots is the PEM encoded + Root certificate chain used for keyless + signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used + for keyless signing, for example an + email address Deprecated. Use KeylessAttestor + instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that + images have a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply + to the policy + items: + description: "Condition contains details for one aspect + of the current state of this API Resource. --- This + struct is intended for direct use as an array at the + field path .status.conditions. For example, \n type + FooStatus struct{ // Represents the observations of + a foo's current state. // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" + // +patchMergeKey=type // +patchStrategy=merge // + +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" + patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time + the condition transitioned from one status to + another. This should be when the underlying condition + changed. If that is not known, then using the + time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message + indicating details about the transition. This + may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the + .status.conditions[x].observedGeneration is 9, + the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last + transition. Producers of specific condition types + may define expected values and meanings for this + field, and whether the values are considered a + guaranteed API. The value should be a CamelCase + string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. --- Many .condition.type + values are consistent across resources like Available, + but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to + deconflict is important. The regex it matches + is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to + serve the admission request. Deprecated in favor of + Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests21 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "6" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "6" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusterpolicyreports.wgpolicyk8s.io + spec: + group: wgpolicyk8s.io + names: + kind: ClusterPolicyReport + listKind: ClusterPolicyReportList + plural: clusterpolicyreports + shortNames: + - cpolr + singular: clusterpolicyreport + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .scope.kind + name: Kind + priority: 1 + type: string + - jsonPath: .scope.name + name: Name + priority: 1 + type: string + - jsonPath: .summary.pass + name: Pass + type: integer + - jsonPath: .summary.fail + name: Fail + type: integer + - jsonPath: .summary.warn + name: Warn + type: integer + - jsonPath: .summary.error + name: Error + type: integer + - jsonPath: .summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: ClusterPolicyReport is the Schema for the clusterpolicyreports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for + an individual policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message + for the policy rule + type: string + policy: + description: Policy is the name or identifier of the + policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information + for the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector + for checked Kubernetes resources. For example, a policy + result may apply to all pods that match a label. Either + a Subject or a SubjectSelector can be specified. If + neither are provided, the result is assumed to be + for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the + checked Kubernetes resources + items: + description: "ObjectReference contains enough information + to let you inspect or modify the referred object. + --- New uses of this type are discouraged because + of difficulty describing its usage when embedded + in APIs. 1. Ignored fields. It includes many fields + which are not generally honored. For instance, + ResourceVersion and FieldPath are both very rarely + valid in actual usage. 2. Invalid usage help. It + is impossible to add specific help for individual + usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types A + and B\" or \"UID not honored\" or \"name must be + restricted\". Those cannot be well described when + embedded. 3. Inconsistent validation. Because the + usages are different, the validation rules are different + by usage, which makes it hard for users to predict + what will happen. 4. The fields are both imprecise + and overly precise. Kind is not a precise mapping + to a URL. This can produce ambiguity during interpretation + and require a REST mapping. In most cases, the + dependency is on the group,resource tuple and the + version of the actual struct is irrelevant. 5. We + cannot easily change it. Because this type is embedded + in many locations, updates to this type will affect + numerous schemas. Don't make new APIs embed an + underspecified API type they do not control. \n + Instead of using this type, create a locally provided + and used type that is well-focused on your reference. + For example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. + For example, if the object reference is to a + container within a pod, this would take on a + value like: "spec.containers{name}" (where "name" + refers to the name of the container that triggered + the event) or if no container name is specified + "spec.containers[2]" (container with index 2 + in this pod). This syntax is chosen only to + have some well-defined way of referencing a + part of an object. TODO: this design is not + final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which + this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy + rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule + within the policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result + criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy + engine that manages this report + type: string + timestamp: + description: Timestamp indicates the time the result + was found + properties: + nanos: + description: Non-negative fractions of a second + at nanosecond resolution. Negative second values + with fractions must still have non-negative nanos + values that count forward in time. Must be from + 0 to 999,999,999 inclusive. This field may be + limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since + Unix epoch 1970-01-01T00:00:00Z. Must be from + 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + scope: + description: Scope is an optional reference to the report + scope (e.g. a Deployment, Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + scopeSelector: + description: ScopeSelector is an optional selector for multiple + scopes (e.g. Pods). Either one of, or none of, but not both + of, Scope or ScopeSelector should be specified. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that + could not be evaluated + type: integer + fail: + description: Fail provides the count of policies whose + requirements were not met + type: integer + pass: + description: Pass provides the count of policies whose + requirements were met + type: integer + skip: + description: Skip indicates the count of policies that + were not selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies + whose requirements were not met + type: integer + type: object + type: object + served: true + storage: true + subresources: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests22 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "7" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "7" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: generaterequests.kyverno.io + spec: + group: kyverno.io + names: + kind: GenerateRequest + listKind: GenerateRequestList + plural: generaterequests + shortNames: + - gr + singular: generaterequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.policy + name: Policy + type: string + - jsonPath: .spec.resource.kind + name: ResourceKind + type: string + - jsonPath: .spec.resource.name + name: ResourceName + type: string + - jsonPath: .spec.resource.namespace + name: ResourceNamespace + type: string + - jsonPath: .status.state + name: status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: GenerateRequest is a request to process generate + rule. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the information to identify the generate + request. + properties: + context: + description: Context ... + properties: + admissionRequestInfo: + description: AdmissionRequestInfoObject stores the + admission request and operation details + properties: + admissionRequest: + type: string + operation: + description: Operation is the type of resource + operation being checked for admission control + type: string + type: object + userInfo: + description: RequestInfo contains permission info + carried in an admission request. + properties: + clusterRoles: + description: ClusterRoles is a list of possible + clusterRoles send the request. + items: + type: string + nullable: true + type: array + roles: + description: Roles is a list of possible role + send the request. + items: + type: string + nullable: true + type: array + userInfo: + description: UserInfo is the userInfo carried + in the admission request. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value + so protobuf can generate + items: + type: string + type: array + description: Any additional information provided + by the authenticator. + type: object + groups: + description: The names of groups this user + is a part of. + items: + type: string + type: array + uid: + description: A unique value that identifies + this user across time. If this user is deleted + and another user by the same name is added, + they will have different UIDs. + type: string + username: + description: The name that uniquely identifies + this user among all active users. + type: string + type: object + type: object + type: object + policy: + description: Specifies the name of the policy. + type: string + resource: + description: ResourceSpec is the information to identify + the generate request. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + required: + - context + - policy + - resource + type: object + status: + description: Status contains statistics related to generate + request. + properties: + generatedResources: + description: This will track the resources that are generated + by the generate Policy. Will be used during clean up + resources. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + message: + description: Specifies request status message. + type: string + state: + description: State represents state of the generate request. + type: string + required: + - state + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests23 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "8" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "8" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: policies.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + - all + kind: Policy + listKind: PolicyList + plural: policies + shortNames: + - pol + singular: policy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: 'Policy declares validation, mutation, and generation + behaviors for matching resources. See: https://kyverno.io/docs/writing-policies/ + for more information.' + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines policy behaviors and contains one + or more rules. + properties: + applyRules: + description: ApplyRules controls how rules in a policy + are applied. Rule are processed in the order of declaration. + When set to `One` processing stops after a rule has + been applied i.e. the rule matches and results in a + pass, fail, or error. When set to `All` all rules in + the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied + to existing resources during a background scan. Optional. + Default value is "true". The value must be set to "false" + if the policy rule uses variables that are only available + in the admission review request (e.g. user name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy + errors and webhook response timeout errors are handled. + Rules within the same policy share the same failure + behavior. Allowed values are Ignore or Fail. Defaults + to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether + to trigger generate rule in existing resources If is + set to "true" generate rule will be triggered and applied + to existing matched resources. Defaults to "false" if + not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if + a mutateExisting policy is applied on policy events. + Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy + contains multiple rules and each rule can validate, + mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or + generation control for matching resources. Each rules + contains a match declaration to select resources, + and an optional exclude declaration to specify which + resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the JSON response returned + from the API server. For example a JMESPath + of "items | length(@)" applied to the + API server response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the ImageData struct returned + as a result of processing the image + reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be defined + inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON + form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information (e.g. + kind, name, namespace, labels) and admission review + request information like the name or role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + Requires at least one tag to be specified + when under MatchResources. Specifying ResourceDescription + directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). NOTE: + "Name" is being deprecated in favor of + "Names".' + type: string + names: + description: Names are the names of the + resources. Each name supports wildcard + characters "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` (matches + zero or many characters) and `?` (matches + one character). Wildcards allows writing + label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches + any key and value but does not match an + empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either hold + a direct API object reference, or a value + for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults + to "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are + "User", "Group", and "ServiceAccount". + If the Authorizer does not recognized + the kind value, the Authorizer should + report an error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource + used to populate each generated resource. + At most one of Data or Clone can be specified. + If neither are provided, the generated resource + will be created with default data only. + properties: + name: + description: Name specifies name of the + resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of + source resource used to populate each generated + resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. + At most one of Data or Clone must be specified. + If neither are provided, the generated resource + will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with their + source resource. If Synchronize is set to + "true" changes to generated resources will + be overwritten with resource data from Data + or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of + the field within 'path' that will be used + to uniquely identify an image. Note - + this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not defined, + image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object + containing the image field in a custom + resource. It should be slash-separated. + Each slash-separated key must be a valid + YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of + the field within 'path' that points to + the image URI. This is useful when a custom + 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from + kinds to ImageExtractorConfigs. This config is + only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this policy + rule should be applied. The match criteria can + include resource information (e.g. kind, name, + namespace, labels) and admission review request + information like the user name or role. At least + one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + Requires at least one tag to be specified + when under MatchResources. Specifying ResourceDescription + directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). NOTE: + "Name" is being deprecated in favor of + "Names".' + type: string + names: + description: Names are the names of the + resources. Each name supports wildcard + characters "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` (matches + zero or many characters) and `?` (matches + one character). Wildcards allows writing + label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches + any key and value but does not match an + empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either hold + a direct API object reference, or a value + for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults + to "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are + "User", "Group", and "ServiceAccount". + If the Authorizer does not recognized + the kind value, the Authorizer should + report an error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies mutation rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a + strategic merge patch used to modify + resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list + of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See + https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources + to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, + It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct list + of conditions (without `any` or `all` statements + is supported for backwards compatibility but will + be deprecated in the next major release. See: + https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching + resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to + pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be + declared under an `any` or `all` statement. + A direct list of conditions (without `any` + or `all` statements) is also supported + for backwards compatibility but will be + deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies validate rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + anyPattern: + description: AnyPattern specifies list + of validation patterns. At least one + of the patterns must be satisfied for + the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` or + `all` statement. A direct list of + conditions (without `any` or `all` + statements) is also supported for + backwards compatibility but will + be deprecated in the next major + release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether + to use the current list element as the + scope for validation. Defaults to "true" + if not specified. When set to "false", + "request.object" is used as the validation + scope within the foreach block to allow + referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for + manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and signature. + Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must + be less than or equal to the size + of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. The + payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked + and a root certificate + chain is expected instead. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an + optional set of PEM encoded + trusted root certificates. + If not provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a + variable reference to + a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and + attestations that match this + rule. If specified Repository + will override other OCI image + repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle + reference. The repository can be overridden + per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message + to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission by specifying + exclusions for Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls to + be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security Standard + control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the image + name consisting of the registry + address, repository, image, and + tag. Empty list matches no containers, + PSS checks are applied at the pod + level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security + Standard versions that Kubernetes supports. + Allowed values are v1.19, v1.20, v1.21, + v1.22, v1.23, v1.24, v1.25, latest. Defaults + to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image + signatures and mutate them to add a digest + items: + description: ImageVerification validates that + images that match the specified pattern are + signed with the supplied public key. Once the + image is verified it is mutated to include the + SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other key-value + pairs. Deprecated. Use annotations per Attestor + instead. + type: object + attestations: + description: Attestations are optional checks + for signed in-toto Statements used to verify + the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into a + list of Statement declarations. + items: + description: Attestation are checks for + signed in-toto Statements that are used + to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into + a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to + verify attributes within a Predicate. + If no Conditions are specified the + attestation check is satisfied as + long there are predicates that match + the predicate type. + items: + description: AnyAllConditions consists + of conditions wrapped denoting a + logical criteria to be fulfilled. + AnyConditions get fulfilled when + at least one of its sub-conditions + passes. AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the + type of Predicate contained within + the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must be + less than or equal to the size of + entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a variable + reference to a key specified + in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as + a separate staticKey entry + (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting + of the registry address, repository, image, + and tag. Wildcards (''*'' and ''?'') are + allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of + matching image reference patterns. At least + one pattern in the list must match the image + for the rule to apply. Each image reference + consists of a registry address (defaults + to docker.io), repository, image, and tag + (defaults to latest). Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer + used for keyless signing. Deprecated. Use + KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public + key that the image or attestation is signed + with. Deprecated. Use StaticKeyAttestor + instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults to + true. + type: boolean + repository: + description: Repository is an optional alternate + OCI repository to use for image signatures + and attestations that match this rule. If + specified Repository will override the default + OCI image repository configured for the + installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed a + signature or attestation check. + type: boolean + roots: + description: Roots is the PEM encoded Root + certificate chain used for keyless signing + Deprecated. Use KeylessAttestor instead. + type: string + subject: + description: Subject is the identity used + for keyless signing, for example an email + address Deprecated. Use KeylessAttestor + instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images + have a digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks + for policies as well as patched resources. Optional. + The default value is set to "true", it must be set to + "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation + policy rule violation should block the admission review + request (enforce), or allow (audit) the admission review + request and report an error in a policy report. Optional. + Allowed values are audit or enforce. The default value + is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster + Policy attribute that specifies ValidationFailureAction + namespace-wise. It overrides ValidationFailureAction + for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the + policy validation failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum + time in seconds allowed to apply this policy. After + the configured time expires, the admission request may + fail, or may simply ignore the policy results, based + on the failure policy. The default timeout is 10s, the + value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime information. Deprecated. + Policy metrics are available via the metrics endpoint + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It + contains auto generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, + or generation control for matching resources. + Each rules contains a match declaration to select + resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a + ConfigMap reference or a APILookup must + be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same + format used by the `kubectl get + --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData + struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be + used to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information + (e.g. kind, name, namespace, labels) and admission + review request information like the name or + role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new + resources. + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + clone: + description: Clone specifies the source + resource used to populate each generated + resource. At most one of Data or Clone + can be specified. If neither are provided, + the generated resource will be created + with default data only. + properties: + name: + description: Name specifies name of + the resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list + of source resource used to populate each + generated resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource + declaration used to populate each generated + resource. At most one of Data or Clone + must be specified. If neither are provided, + the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with + their source resource. If Synchronize + is set to "true" changes to generated + resources will be overwritten with resource + data from Data or the resource specified + in the Clone declaration. Optional. Defaults + to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name + of the field within 'path' that will + be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not + defined, image entries will appear + under 'images.custom'. + type: string + path: + description: Path is the path to the + object containing the image field + in a custom resource. It should be + slash-separated. Each slash-separated + key must be a valid YAML key or a + wildcard '*'. Wildcard keys are expanded + in case of arrays or objects. + type: string + value: + description: Value is an optional name + of the field within 'path' that points + to the image URI. This is useful when + a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping + from kinds to ImageExtractorConfigs. This + config is only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this + policy rule should be applied. The match criteria + can include resource information (e.g. kind, + name, namespace, labels) and admission review + request information like the user name or + role. At least one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies mutation + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is + a strategic merge patch used to + modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a + list of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. + See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of + RFC 6902 JSON Patch declarations used + to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target + resources to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies + resource apiVersion. + type: string + kind: + description: Kind specifies resource + kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the + rule, It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct + list of conditions (without `any` or `all` + statements is supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate + matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of + validation patterns. At least one of the + patterns must be satisfied for the validation + rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can + be declared under an `any` or `all` + statement. A direct list of conditions + (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next + major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies validate + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies + list of validation patterns. At + least one of the patterns must be + satisfied for the validation rule + to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions + used to pass or fail a validation + rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` + or `all` statement. A direct + list of conditions (without + `any` or `all` statements) is + also supported for backwards + compatibility but will be deprecated + in the next major release. See: + https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies + whether to use the current list + element as the scope for validation. + Defaults to "true" if not specified. + When set to "false", "request.object" + is used as the validation scope + within the foreach block to allow + referencing other elements in the + subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + pattern: + description: Pattern specifies an + overlay-style pattern used to check + resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions + for manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and + signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional + alternate OCI repository to use for + resource bundle reference. The repository + can be overridden per Attestor or + Attestation. + type: string + type: object + message: + description: Message specifies a custom + message to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission + by specifying exclusions for Pod Security + Standards controls. + properties: + exclude: + description: Exclude specifies the Pod + Security Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls + to be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security + Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the + image name consisting of the + registry address, repository, + image, and tag. Empty list matches + no containers, PSS checks are + applied at the pod level only. + Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod + Security Standard versions that Kubernetes + supports. Allowed values are v1.19, + v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify + image signatures and mutate them to add a + digest + items: + description: ImageVerification validates that + images that match the specified pattern + are signed with the supplied public key. + Once the image is verified it is mutated + to include the SHA digest retrieved during + the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. Deprecated. + Use annotations per Attestor instead. + type: object + attestations: + description: Attestations are optional + checks for signed in-toto Statements + used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes them + into a list of Statement declarations. + items: + description: Attestation are checks + for signed in-toto Statements that + are used to verify the image. See + https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies + the required number of entries + that must match. If the + count is null, all entries + must match (a logical AND). + If the count is 1, at least + one entry must match (a + logical OR). If the count + contains a value N, then + N must be less than or equal + to the size of entries, + and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. + An attestor can be a static + key, attributes for keyless + verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image + verification. Every + specified key-value + pair must exist and + match in the verified + payload. The payload + may contain other + key-value pairs. + type: object + attestor: + description: Attestor + is a nested AttestorSet + used to specify a + more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional + PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional + PEM encoded set + of certificates + used to verify + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless + is a set of attribute + used to verify a Sigstore + keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless + signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for + keyless signing. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked + and a root certificate + chain is expected + instead. If an + empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots + is an optional + set of PEM encoded + trusted root certificates. + If not provided, + the system roots + are used. + type: string + subject: + description: Subject + is the verified + identity used + for keyless signing, + for example the + email address + type: string + type: object + keys: + description: Keys specifies + one or more public + keys + properties: + publicKeys: + description: Keys + is a set of X.509 + public keys used + to verify image + signatures. The + keys can be directly + specified or can + be a variable + reference to a + key specified + in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple + keys are specified + each key is processed + as a separate + staticKey entry + (.attestors[*].entries.keys) + within the set + of attestors and + the count is applied + across the keys. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to + use for signatures + and attestations that + match this rule. If + specified Repository + will override other + OCI image repository + locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used + to verify attributes within a + Predicate. If no Conditions are + specified the attestation check + is satisfied as long there are + predicates that match the predicate + type. + items: + description: AnyAllConditions + consists of conditions wrapped + denoting a logical criteria + to be fulfilled. AnyConditions + get fulfilled when at least + one of its sub-conditions passes. + AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, all of the + conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, at least + one of the conditions need + to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines + the type of Predicate contained + within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is null, + all entries must match (a logical + AND). If the count is 1, at least + one entry must match (a logical + OR). If the count contains a value + N, then N must be less than or + equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a + nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a + set of attribute used to + verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is + the certificate issuer + used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked and a root certificate + chain is expected instead. + If an empty object is + provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of PEM + encoded trusted root + certificates. If not + provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a + set of X.509 public + keys used to verify + image signatures. The + keys can be directly + specified or can be + a variable reference + to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is + an optional alternate OCI + repository to use for signatures + and attestations that match + this rule. If specified + Repository will override + other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name + consisting of the registry address, + repository, image, and tag. Wildcards + (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list + of matching image reference patterns. + At least one pattern in the list must + match the image for the rule to apply. + Each image reference consists of a registry + address (defaults to docker.io), repository, + image, and tag (defaults to latest). + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate + issuer used for keyless signing. Deprecated. + Use KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public + key that the image or attestation is + signed with. Deprecated. Use StaticKeyAttestor + instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults + to true. + type: boolean + repository: + description: Repository is an optional + alternate OCI repository to use for + image signatures and attestations that + match this rule. If specified Repository + will override the default OCI image + repository configured for the installation. + The repository can also be overridden + per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed + a signature or attestation check. + type: boolean + roots: + description: Roots is the PEM encoded + Root certificate chain used for keyless + signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used + for keyless signing, for example an + email address Deprecated. Use KeylessAttestor + instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that + images have a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply + to the policy + items: + description: "Condition contains details for one aspect + of the current state of this API Resource. --- This + struct is intended for direct use as an array at the + field path .status.conditions. For example, \n type + FooStatus struct{ // Represents the observations of + a foo's current state. // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" + // +patchMergeKey=type // +patchStrategy=merge // + +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" + patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time + the condition transitioned from one status to + another. This should be when the underlying condition + changed. If that is not known, then using the + time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message + indicating details about the transition. This + may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the + .status.conditions[x].observedGeneration is 9, + the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last + transition. Producers of specific condition types + may define expected values and meanings for this + field, and whether the values are considered a + guaranteed API. The value should be a CamelCase + string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. --- Many .condition.type + values are consistent across resources like Available, + but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to + deconflict is important. The regex it matches + is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to + serve the admission request. Deprecated in favor of + Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v2beta1 + schema: + openAPIV3Schema: + description: 'Policy declares validation, mutation, and generation + behaviors for matching resources. See: https://kyverno.io/docs/writing-policies/ + for more information.' + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines policy behaviors and contains one + or more rules. + properties: + applyRules: + description: ApplyRules controls how rules in a policy + are applied. Rule are processed in the order of declaration. + When set to `One` processing stops after a rule has + been applied i.e. the rule matches and results in a + pass, fail, or error. When set to `All` all rules in + the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied + to existing resources during a background scan. Optional. + Default value is "true". The value must be set to "false" + if the policy rule uses variables that are only available + in the admission review request (e.g. user name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy + errors and webhook response timeout errors are handled. + Rules within the same policy share the same failure + behavior. Allowed values are Ignore or Fail. Defaults + to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether + to trigger generate rule in existing resources If is + set to "true" generate rule will be triggered and applied + to existing matched resources. Defaults to "false" if + not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if + a mutateExisting policy is applied on policy events. + Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy + contains multiple rules and each rule can validate, + mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or + generation control for matching resources. Each rules + contains a match declaration to select resources, + and an optional exclude declaration to specify which + resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the JSON response returned + from the API server. For example a JMESPath + of "items | length(@)" applied to the + API server response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to + transform the ImageData struct returned + as a result of processing the image + reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be defined + inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON + form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information (e.g. + kind, name, namespace, labels) and admission review + request information like the name or role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource + used to populate each generated resource. + At most one of Data or Clone can be specified. + If neither are provided, the generated resource + will be created with default data only. + properties: + name: + description: Name specifies name of the + resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of + source resource used to populate each generated + resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of + {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. + At most one of Data or Clone must be specified. + If neither are provided, the generated resource + will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with their + source resource. If Synchronize is set to + "true" changes to generated resources will + be overwritten with resource data from Data + or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of + the field within 'path' that will be used + to uniquely identify an image. Note - + this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not defined, + image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object + containing the image field in a custom + resource. It should be slash-separated. + Each slash-separated key must be a valid + YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of + the field within 'path' that points to + the image URI. This is useful when a custom + 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from + kinds to ImageExtractorConfigs. This config is + only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this policy + rule should be applied. The match criteria can + include resource information (e.g. kind, name, + namespace, labels) and admission review request + information like the user name or role. At least + one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users to + "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation keys + and values support the wildcard + characters "*" (matches zero or + many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of + the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). NOTE: + "Name" is being deprecated in favor + of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is + a label selector for the resource + namespace. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character).Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name supports + wildcard characters "*" (matches + zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the wildcard + characters `*` (matches zero or + many characters) and `?` (matches + one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] + matches any key and value but does + not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a + role binding applies to. This can + either hold a direct API object reference, + or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the + API group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by + this API group are "User", "Group", + and "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is + non-namespace, such as "User" + or "Group", and this value is + not empty the Authorizer should + report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies mutation rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a + strategic merge patch used to modify + resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list + of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See + https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources + to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, + It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct list + of conditions (without `any` or `all` statements + is supported for backwards compatibility but See: + https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of the + conditions need to pass + items: + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + validate: + description: Validation is used to validate matching + resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to + pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be + declared under an `any` or `all` statement. + A direct list of conditions (without `any` + or `all` statements) is also supported + for backwards compatibility See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, all of the conditions need to + pass + items: + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or can + be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, at least one of the conditions + need to pass + items: + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or can + be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating a context + for each entry in the list and looping over + it to apply the specified logic. + items: + description: ForEach applies validate rules + to a list of sub-elements by creating a + context for each entry in the list and looping + over it to apply the specified logic. + properties: + anyPattern: + description: AnyPattern specifies list + of validation patterns. At least one + of the patterns must be satisfied for + the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used during + rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an + HTTP request to the Kubernetes + API server. The JSON data retrieved + is stored in the context. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the JSON response returned + from the API server. For example + a JMESPath of "items | length(@)" + applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count + of deployments across all + namespaces. + type: string + urlPath: + description: URLPath is the + URL path to be used in the + HTTP GET request to the Kubernetes + API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is the + same format used by the `kubectl + get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the + ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker V2 registry + to fetch image details. + properties: + jmesPath: + description: JMESPath is an + optional JSON Match Expression + that can be used to transform + the ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image + reference to a container image + in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines an + arbitrary JMESPath context variable + that can be defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that + the variable may take if the + JMESPath expression evaluates + to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an + optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` or + `all` statement. A direct list of + conditions (without `any` or `all` + statements) is also supported for + backwards compatibility but will + be deprecated in the next major + release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether + to use the current list element as the + scope for validation. Defaults to "true" + if not specified. When set to "false", + "request.object" is used as the validation + scope within the foreach block to allow + referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or more + elements to which the validation logic + is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used + to determine if a policy rule should + be applied by evaluating a set of conditions. + The declaration can contain nested `any` + or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + all of the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for finer + control of when an rule is applied. + A condition can reference object + data using JMESPath notation. Here, + at least one of the conditions need + to pass + items: + description: Condition defines variable-based + conditional criteria for rule + execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the + conditional operation to perform. + Valid operators are: Equals, + NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The + values can be fixed set or + can be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for + manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and signature. + Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must + be less than or equal to the size + of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. The + payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked + and a root certificate + chain is expected instead. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an + optional set of PEM encoded + trusted root certificates. + If not provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a + variable reference to + a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not checked. + If an empty object is + provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and + attestations that match this + rule. If specified Repository + will override other OCI image + repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle + reference. The repository can be overridden + per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message + to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission by specifying + exclusions for Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls to + be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security Standard + control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the image + name consisting of the registry + address, repository, image, and + tag. Empty list matches no containers, + PSS checks are applied at the pod + level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security + Standard versions that Kubernetes supports. + Allowed values are v1.19, v1.20, v1.21, + v1.22, v1.23, v1.24, v1.25, latest. Defaults + to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image + signatures and mutate them to add a digest + items: + description: ImageVerification validates that + images that match the specified pattern are + signed with the supplied public key. Once the + image is verified it is mutated to include the + SHA digest retrieved during the registration. + properties: + attestations: + description: Attestations are optional checks + for signed in-toto Statements used to verify + the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into a + list of Statement declarations. + items: + description: Attestation are checks for + signed in-toto Statements that are used + to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from + the OCI registry and decodes them into + a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to + verify attributes within a Predicate. + If no Conditions are specified the + attestation check is satisfied as + long there are predicates that match + the predicate type. + items: + description: AnyAllConditions consists + of conditions wrapped denoting a + logical criteria to be fulfilled. + AnyConditions get fulfilled when + at least one of its sub-conditions + passes. AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the + type of Predicate contained within + the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. + If the count is null, all entries + must match (a logical AND). If the + count is 1, at least one entry must + match (a logical OR). If the count + contains a value N, then N must be + less than or equal to the size of + entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify + a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used + to verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set + of attribute used to verify + a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the + certificate issuer used + for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set + of X.509 public keys used + to verify image signatures. + The keys can be directly + specified or can be a variable + reference to a key specified + in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as + a separate staticKey entry + (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an + optional alternate OCI repository + to use for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + imageReferences: + description: 'ImageReferences is a list of + matching image reference patterns. At least + one pattern in the list must match the image + for the rule to apply. Each image reference + consists of a registry address (defaults + to docker.io), repository, image, and tag + (defaults to latest). Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults to + true. + type: boolean + repository: + description: Repository is an optional alternate + OCI repository to use for image signatures + and attestations that match this rule. If + specified Repository will override the default + OCI image repository configured for the + installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed a + signature or attestation check. + type: boolean + verifyDigest: + default: true + description: VerifyDigest validates that images + have a digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks + for policies as well as patched resources. Optional. + The default value is set to "true", it must be set to + "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation + policy rule violation should block the admission review + request (enforce), or allow (audit) the admission review + request and report an error in a policy report. Optional. + Allowed values are audit or enforce. The default value + is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster + Policy attribute that specifies ValidationFailureAction + namespace-wise. It overrides ValidationFailureAction + for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the + policy validation failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum + time in seconds allowed to apply this policy. After + the configured time expires, the admission request may + fail, or may simply ignore the policy results, based + on the failure policy. The default timeout is 10s, the + value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime data. + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It + contains auto generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, + or generation control for matching resources. + Each rules contains a match declaration to select + resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a + ConfigMap reference or a APILookup must + be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same + format used by the `kubectl get + --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap + name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData + struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be + used to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this + policy rule should not be applied. The exclude + criteria can include resource information + (e.g. kind, name, namespace, labels) and admission + review request information like the name or + role. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new + resources. + properties: + apiVersion: + description: APIVersion specifies resource + apiVersion. + type: string + clone: + description: Clone specifies the source + resource used to populate each generated + resource. At most one of Data or Clone + can be specified. If neither are provided, + the generated resource will be created + with default data only. + properties: + name: + description: Name specifies name of + the resource. + type: string + namespace: + description: Namespace specifies source + resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list + of source resource used to populate each + generated resource. + properties: + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source + resource namespace. + type: string + selector: + description: Selector is a label selector. + Label keys and values in `matchLabels`. + wildcard characters are not supported. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource + declaration used to populate each generated + resource. At most one of Data or Clone + must be specified. If neither are provided, + the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + synchronize: + description: Synchronize controls if generated + resources should be kept in-sync with + their source resource. If Synchronize + is set to "true" changes to generated + resources will be overwritten with resource + data from Data or the resource specified + in the Clone declaration. Optional. Defaults + to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name + of the field within 'path' that will + be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image + will be available under 'images.' + in the context. If this field is not + defined, image entries will appear + under 'images.custom'. + type: string + path: + description: Path is the path to the + object containing the image field + in a custom resource. It should be + slash-separated. Each slash-separated + key must be a valid YAML key or a + wildcard '*'. Wildcard keys are expanded + in case of arrays or objects. + type: string + value: + description: Value is an optional name + of the field within 'path' that points + to the image URI. This is useful when + a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping + from kinds to ImageExtractorConfigs. This + config is only valid for verifyImages rules. + type: object + match: + description: MatchResources defines when this + policy rule should be applied. The match criteria + can include resource information (e.g. kind, + name, namespace, labels) and admission review + request information like the user name or + role. At least one kind is required. + properties: + all: + description: All allows specifying resources + which will be ANDed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources + which will be ORed + items: + description: ResourceFilter allow users + to "AND" or "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list + of cluster-wide role names for the + user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being + created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map + of annotations (key-value pairs + of type string). Annotation + keys and values support the + wildcard characters "*" (matches + zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of + resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name + of the resource. The name supports + wildcard characters "*" (matches + zero or many characters) and + "?" (at least one character). + NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names + of the resources. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector + is a label selector for the + resource namespace. Label keys + and values in `matchLabels` + support the wildcard characters + `*` (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors + like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] + matches any key and value but + does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list + of namespaces names. Each name + supports wildcard characters + "*" (matches zero or many characters) + and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label + selector. Label keys and values + in `matchLabels` support the + wildcard characters `*` (matches + zero or many characters) and + `?` (matches one character). + Wildcards allows writing label + selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : + "*"] matches any key and value + but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, + a key, and an operator + that relates the key and + values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: + description: operator + represents a key's + relationship to a + set of values. Valid + operators are In, + NotIn, Exists and + DoesNotExist. + type: string + values: + description: values + is an array of string + values. If the operator + is In or NotIn, the + values array must + be non-empty. If the + operator is Exists + or DoesNotExist, the + values array must + be empty. This array + is replaced during + a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is + a map of {key,value} pairs. + A single {key,value} in + the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", + the operator is "In", and + the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of + namespaced role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list + of subject names like users, user + groups, and service accounts. + items: + description: Subject contains a + reference to the object or user + identities a role binding applies + to. This can either hold a direct + API object reference, or a value + for non-objects such as user and + group names. + properties: + apiGroup: + description: APIGroup holds + the API group of the referenced + subject. Defaults to "" for + ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object + being referenced. Values defined + by this API group are "User", + "Group", and "ServiceAccount". + If the Authorizer does not + recognized the kind value, + the Authorizer should report + an error. + type: string + name: + description: Name of the object + being referenced. + type: string + namespace: + description: Namespace of the + referenced object. If the + object kind is non-namespace, + such as "User" or "Group", + and this value is not empty + the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of + cluster-wide role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains + information about the resource being created + or modified. Requires at least one tag + to be specified when under MatchResources. + Specifying ResourceDescription directly + under match is being deprecated. Please + specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of + annotations (key-value pairs of type + string). Annotation keys and values + support the wildcard characters "*" + (matches zero or many characters) + and "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource + kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the + resource. The name supports wildcard + characters "*" (matches zero or many + characters) and "?" (at least one + character). NOTE: "Name" is being + deprecated in favor of "Names".' + type: string + names: + description: Names are the names of + the resources. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a + label selector for the resource namespace. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character).Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of + namespaces names. Each name supports + wildcard characters "*" (matches zero + or many characters) and "?" (at least + one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` + support the wildcard characters `*` + (matches zero or many characters) + and `?` (matches one character). Wildcards + allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that + using ["*" : "*"] matches any key + and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector + requirement is a selector that + contains values, a key, and + an operator that relates the + key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In or + NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be + empty. This array is replaced + during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single + {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator is + "In", and the values array contains + only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced + role names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject + names like users, user groups, and service + accounts. + items: + description: Subject contains a reference + to the object or user identities a role + binding applies to. This can either + hold a direct API object reference, + or a value for non-objects such as user + and group names. + properties: + apiGroup: + description: APIGroup holds the API + group of the referenced subject. + Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being + referenced. Values defined by this + API group are "User", "Group", and + "ServiceAccount". If the Authorizer + does not recognized the kind value, + the Authorizer should report an + error. + type: string + name: + description: Name of the object being + referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this + value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching + resources. + properties: + foreach: + description: ForEach applies mutation rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies mutation + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is + a strategic merge patch used to + modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a + list of RFC 6902 JSON Patch declarations + used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. + See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of + RFC 6902 JSON Patch declarations used + to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target + resources to be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies + resource apiVersion. + type: string + kind: + description: Kind specifies resource + kind. + type: string + name: + description: Name specifies the resource + name. + type: string + namespace: + description: Namespace specifies resource + namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the + rule, It must be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. A direct + list of conditions (without `any` or `all` + statements is supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate + matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of + validation patterns. At least one of the + patterns must be satisfied for the validation + rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used + to pass or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can + be declared under an `any` or `all` + statement. A direct list of conditions + (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next + major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules + to a list of sub-elements by creating + a context for each entry in the list and + looping over it to apply the specified + logic. + items: + description: ForEach applies validate + rules to a list of sub-elements by creating + a context for each entry in the list + and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies + list of validation patterns. At + least one of the patterns must be + satisfied for the validation rule + to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables + and data sources that can be used + during rule execution. + items: + description: ContextEntry adds variables + and data sources to a rule Context. + Either a ConfigMap reference or + a APILookup must be provided. + properties: + apiCall: + description: APICall defines + an HTTP request to the Kubernetes + API server. The JSON data + retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + JSON response returned + from the API server. For + example a JMESPath of + "items | length(@)" applied + to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total + count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is + the URL path to be used + in the HTTP GET request + to the Kubernetes API + server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). + The format required is + the same format used by + the `kubectl get --raw` + command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the + ConfigMap reference. + properties: + name: + description: Name is the + ConfigMap name. + type: string + namespace: + description: Namespace is + the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines + requests to an OCI/Docker + V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is + an optional JSON Match + Expression that can be + used to transform the + ImageData struct returned + as a result of processing + the image reference. + type: string + reference: + description: 'Reference + is image reference to + a container image in the + registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable + name. + type: string + variable: + description: Variable defines + an arbitrary JMESPath context + variable that can be defined + inline. + properties: + default: + description: Default is + an optional arbitrary + JSON object that the variable + may take if the JMESPath + expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is + an optional JMESPath Expression + that can be used to transform + the variable. + type: string + value: + description: Value is any + arbitrary JSON object + representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions + used to pass or fail a validation + rule. + properties: + conditions: + description: 'Multiple conditions + can be declared under an `any` + or `all` statement. A direct + list of conditions (without + `any` or `all` statements) is + also supported for backwards + compatibility but will be deprecated + in the next major release. See: + https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies + whether to use the current list + element as the scope for validation. + Defaults to "true" if not specified. + When set to "false", "request.object" + is used as the validation scope + within the foreach block to allow + referencing other elements in the + subtree. + type: boolean + list: + description: List specifies a JMESPath + expression that results in one or + more elements to which the validation + logic is applied. + type: string + pattern: + description: Pattern specifies an + overlay-style pattern used to check + resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are + used to determine if a policy rule + should be applied by evaluating + a set of conditions. The declaration + can contain nested `any` or `all` + statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, all + of the conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable + variable-based conditional rule + execution. This is useful for + finer control of when an rule + is applied. A condition can + reference object data using + JMESPath notation. Here, at + least one of the conditions + need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is the + context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is + the conditional operation + to perform. Valid operators + are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the + conditional value, or + set of values. The values + can be fixed set or can + be variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions + for manifest verification + properties: + annotationDomain: + description: AnnotationDomain is custom + domain of annotation for message and + signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is + null, all entries must match + (a logical AND). If the count + is 1, at least one entry must + match (a logical OR). If the + count contains a value N, then + N must be less than or equal + to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. An + attestor can be a static key, + attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is + a nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional PEM + encoded public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM + encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is + a set of attribute used + to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for keyless + signing. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked and + a root certificate + chain is expected + instead. If an empty + object is provided + the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of + PEM encoded trusted + root certificates. + If not provided, the + system roots are used. + type: string + subject: + description: Subject + is the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is + a set of X.509 public + keys used to verify + image signatures. + The keys can be directly + specified or can be + a variable reference + to a key specified + in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys + are specified each + key is processed as + a separate staticKey + entry (.attestors[*].entries.keys) + within the set of + attestors and the + count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for + the Rekor transparency + log service. If the + value is nil, Rekor + is not checked. If + an empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to use + for signatures and attestations + that match this rule. + If specified Repository + will override other OCI + image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored + while comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional + alternate OCI repository to use for + resource bundle reference. The repository + can be overridden per Attestor or + Attestation. + type: string + type: object + message: + description: Message specifies a custom + message to be displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions + for Kubernetes Pod Security admission + by specifying exclusions for Pod Security + Standards controls. + properties: + exclude: + description: Exclude specifies the Pod + Security Standard controls to be excluded. + items: + description: PodSecurityStandard specifies + the Pod Security Standard controls + to be excluded. + properties: + controlName: + description: 'ControlName specifies + the name of the Pod Security + Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching + containers and applies the container + level PSS. Each image is the + image name consisting of the + registry address, repository, + image, and tag. Empty list matches + no containers, PSS checks are + applied at the pod level only. + Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security + Standard level to be applied to workloads. + Allowed values are privileged, baseline, + and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod + Security Standard versions that Kubernetes + supports. Allowed values are v1.19, + v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify + image signatures and mutate them to add a + digest + items: + description: ImageVerification validates that + images that match the specified pattern + are signed with the supplied public key. + Once the image is verified it is mutated + to include the SHA digest retrieved during + the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. Deprecated. + Use annotations per Attestor instead. + type: object + attestations: + description: Attestations are optional + checks for signed in-toto Statements + used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes them + into a list of Statement declarations. + items: + description: Attestation are checks + for signed in-toto Statements that + are used to verify the image. See + https://github.com/in-toto/attestation. + Kyverno fetches signed attestations + from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the + required attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies + the required number of entries + that must match. If the + count is null, all entries + must match (a logical AND). + If the count is 1, at least + one entry must match (a + logical OR). If the count + contains a value N, then + N must be less than or equal + to the size of entries, + and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains + the available attestors. + An attestor can be a static + key, attributes for keyless + verification, or a nested + attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations + are used for image + verification. Every + specified key-value + pair must exist and + match in the verified + payload. The payload + may contain other + key-value pairs. + type: object + attestor: + description: Attestor + is a nested AttestorSet + used to specify a + more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more + certificates + properties: + cert: + description: Certificate + is an optional + PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional + PEM encoded set + of certificates + used to verify + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless + is a set of attribute + used to verify a Sigstore + keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless + signing. + type: object + issuer: + description: Issuer + is the certificate + issuer used for + keyless signing. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked + and a root certificate + chain is expected + instead. If an + empty object is + provided the public + instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots + is an optional + set of PEM encoded + trusted root certificates. + If not provided, + the system roots + are used. + type: string + subject: + description: Subject + is the verified + identity used + for keyless signing, + for example the + email address + type: string + type: object + keys: + description: Keys specifies + one or more public + keys + properties: + publicKeys: + description: Keys + is a set of X.509 + public keys used + to verify image + signatures. The + keys can be directly + specified or can + be a variable + reference to a + key specified + in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple + keys are specified + each key is processed + as a separate + staticKey entry + (.attestors[*].entries.keys) + within the set + of attestors and + the count is applied + across the keys. + type: string + rekor: + description: Rekor + provides configuration + for the Rekor + transparency log + service. If the + value is nil, + Rekor is not checked. + If an empty object + is provided the + public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL + is the address + of the transparency + log. Defaults + to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository + is an optional alternate + OCI repository to + use for signatures + and attestations that + match this rule. If + specified Repository + will override other + OCI image repository + locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used + to verify attributes within a + Predicate. If no Conditions are + specified the attestation check + is satisfied as long there are + predicates that match the predicate + type. + items: + description: AnyAllConditions + consists of conditions wrapped + denoting a logical criteria + to be fulfilled. AnyConditions + get fulfilled when at least + one of its sub-conditions passes. + AllConditions get fulfilled + only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, all of the + conditions need to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions + enable variable-based conditional + rule execution. This is + useful for finer control + of when an rule is applied. + A condition can reference + object data using JMESPath + notation. Here, at least + one of the conditions need + to pass + items: + description: Condition defines + variable-based conditional + criteria for rule execution. + properties: + key: + description: Key is + the context entry + (using JMESPath) for + conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator + is the conditional + operation to perform. + Valid operators are: + Equals, NotEquals, + In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, + LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, + DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is + the conditional value, + or set of values. + The values can be + fixed set or can be + variables declared + using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines + the type of Predicate contained + within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the + required number of entries that + must match. If the count is null, + all entries must match (a logical + AND). If the count is 1, at least + one entry must match (a logical + OR). If the count contains a value + N, then N must be less than or + equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the + available attestors. An attestor + can be a static key, attributes + for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are + used for image verification. + Every specified key-value + pair must exist and match + in the verified payload. + The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a + nested AttestorSet used + to specify a more complex + set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates + specifies one or more certificates + properties: + cert: + description: Certificate + is an optional PEM encoded + public certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates + used to verify + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a + set of attribute used to + verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is + the certificate issuer + used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked and a root certificate + chain is expected instead. + If an empty object is + provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is + an optional set of PEM + encoded trusted root + certificates. If not + provided, the system + roots are used. + type: string + subject: + description: Subject is + the verified identity + used for keyless signing, + for example the email + address + type: string + type: object + keys: + description: Keys specifies + one or more public keys + properties: + publicKeys: + description: Keys is a + set of X.509 public + keys used to verify + image signatures. The + keys can be directly + specified or can be + a variable reference + to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are + specified each key is + processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied + across the keys. + type: string + rekor: + description: Rekor provides + configuration for the + Rekor transparency log + service. If the value + is nil, Rekor is not + checked. If an empty + object is provided the + public instance of Rekor + (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is + the address of the + transparency log. + Defaults to the + public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is + an optional alternate OCI + repository to use for signatures + and attestations that match + this rule. If specified + Repository will override + other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name + consisting of the registry address, + repository, image, and tag. Wildcards + (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list + of matching image reference patterns. + At least one pattern in the list must + match the image for the rule to apply. + Each image reference consists of a registry + address (defaults to docker.io), repository, + image, and tag (defaults to latest). + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate + issuer used for keyless signing. Deprecated. + Use KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public + key that the image or attestation is + signed with. Deprecated. Use StaticKeyAttestor + instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement + of image tags with digests. Defaults + to true. + type: boolean + repository: + description: Repository is an optional + alternate OCI repository to use for + image signatures and attestations that + match this rule. If specified Repository + will override the default OCI image + repository configured for the installation. + The repository can also be overridden + per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images + are verified i.e. have matched passed + a signature or attestation check. + type: boolean + roots: + description: Roots is the PEM encoded + Root certificate chain used for keyless + signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used + for keyless signing, for example an + email address Deprecated. Use KeylessAttestor + instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that + images have a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply + to the policy + items: + description: "Condition contains details for one aspect + of the current state of this API Resource. --- This + struct is intended for direct use as an array at the + field path .status.conditions. For example, \n type + FooStatus struct{ // Represents the observations of + a foo's current state. // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\" + // +patchMergeKey=type // +patchStrategy=merge // + +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" + patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` + \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time + the condition transitioned from one status to + another. This should be when the underlying condition + changed. If that is not known, then using the + time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message + indicating details about the transition. This + may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the + .status.conditions[x].observedGeneration is 9, + the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last + transition. Producers of specific condition types + may define expected values and meanings for this + field, and whether the values are considered a + guaranteed API. The value should be a CamelCase + string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. --- Many .condition.type + values are consistent across resources like Available, + but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to + deconflict is important. The regex it matches + is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to + serve the admission request. Deprecated in favor of + Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests24 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "9" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "9" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: policyreports.wgpolicyk8s.io + spec: + group: wgpolicyk8s.io + names: + kind: PolicyReport + listKind: PolicyReportList + plural: policyreports + shortNames: + - polr + singular: policyreport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .scope.kind + name: Kind + priority: 1 + type: string + - jsonPath: .scope.name + name: Name + priority: 1 + type: string + - jsonPath: .summary.pass + name: Pass + type: integer + - jsonPath: .summary.fail + name: Fail + type: integer + - jsonPath: .summary.warn + name: Warn + type: integer + - jsonPath: .summary.error + name: Error + type: integer + - jsonPath: .summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: PolicyReport is the Schema for the policyreports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for + an individual policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message + for the policy rule + type: string + policy: + description: Policy is the name or identifier of the + policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information + for the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector + for checked Kubernetes resources. For example, a policy + result may apply to all pods that match a label. Either + a Subject or a SubjectSelector can be specified. If + neither are provided, the result is assumed to be + for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the + checked Kubernetes resources + items: + description: "ObjectReference contains enough information + to let you inspect or modify the referred object. + --- New uses of this type are discouraged because + of difficulty describing its usage when embedded + in APIs. 1. Ignored fields. It includes many fields + which are not generally honored. For instance, + ResourceVersion and FieldPath are both very rarely + valid in actual usage. 2. Invalid usage help. It + is impossible to add specific help for individual + usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types A + and B\" or \"UID not honored\" or \"name must be + restricted\". Those cannot be well described when + embedded. 3. Inconsistent validation. Because the + usages are different, the validation rules are different + by usage, which makes it hard for users to predict + what will happen. 4. The fields are both imprecise + and overly precise. Kind is not a precise mapping + to a URL. This can produce ambiguity during interpretation + and require a REST mapping. In most cases, the + dependency is on the group,resource tuple and the + version of the actual struct is irrelevant. 5. We + cannot easily change it. Because this type is embedded + in many locations, updates to this type will affect + numerous schemas. Don't make new APIs embed an + underspecified API type they do not control. \n + Instead of using this type, create a locally provided + and used type that is well-focused on your reference. + For example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. + For example, if the object reference is to a + container within a pod, this would take on a + value like: "spec.containers{name}" (where "name" + refers to the name of the container that triggered + the event) or if no container name is specified + "spec.containers[2]" (container with index 2 + in this pod). This syntax is chosen only to + have some well-defined way of referencing a + part of an object. TODO: this design is not + final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which + this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy + rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule + within the policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result + criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy + engine that manages this report + type: string + timestamp: + description: Timestamp indicates the time the result + was found + properties: + nanos: + description: Non-negative fractions of a second + at nanosecond resolution. Negative second values + with fractions must still have non-negative nanos + values that count forward in time. Must be from + 0 to 999,999,999 inclusive. This field may be + limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since + Unix epoch 1970-01-01T00:00:00Z. Must be from + 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + scope: + description: Scope is an optional reference to the report + scope (e.g. a Deployment, Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + scopeSelector: + description: ScopeSelector is an optional selector for multiple + scopes (e.g. Pods). Either one of, or none of, but not both + of, Scope or ScopeSelector should be specified. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that + could not be evaluated + type: integer + fail: + description: Fail provides the count of policies whose + requirements were not met + type: integer + pass: + description: Pass provides the count of policies whose + requirements were met + type: integer + skip: + description: Skip indicates the count of policies that + were not selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies + whose requirements were not met + type: integer + type: object + type: object + served: true + storage: true + subresources: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests25 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apiextensions.k8s.io/v1 + kind: CustomResourceDefinition + metadata: + annotations: + config.kubernetes.io/index: "10" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "10" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: updaterequests.kyverno.io + spec: + group: kyverno.io + names: + categories: + - kyverno + kind: UpdateRequest + listKind: UpdateRequestList + plural: updaterequests + shortNames: + - ur + singular: updaterequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.policy + name: Policy + type: string + - jsonPath: .spec.requestType + name: RuleType + type: string + - jsonPath: .spec.resource.kind + name: ResourceKind + type: string + - jsonPath: .spec.resource.name + name: ResourceName + type: string + - jsonPath: .spec.resource.namespace + name: ResourceNamespace + type: string + - jsonPath: .status.state + name: status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: UpdateRequest is a request to process mutate and + generate rules in background. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST + resource this object represents. Servers may infer this + from the endpoint the client submits requests to. Cannot + be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the information to identify the update + request. + properties: + context: + description: Context ... + properties: + admissionRequestInfo: + description: AdmissionRequestInfoObject stores the + admission request and operation details + properties: + admissionRequest: + description: AdmissionRequest describes the admission.Attributes + for the admission request. + properties: + dryRun: + description: DryRun indicates that modifications + will definitely not be persisted for this + request. Defaults to false. + type: boolean + kind: + description: Kind is the fully-qualified type + of object being submitted (for example, + v1.Pod or autoscaling.v1.Scale) + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + name: + description: Name is the name of the object + as presented in the request. On a CREATE + operation, the client may omit name and + rely on the server to generate the name. If + that is the case, this field will contain + an empty string. + type: string + namespace: + description: Namespace is the namespace associated + with the request (if any). + type: string + object: + description: Object is the object from the + incoming request. + type: object + x-kubernetes-preserve-unknown-fields: true + oldObject: + description: OldObject is the existing object. + Only populated for DELETE and UPDATE requests. + type: object + x-kubernetes-preserve-unknown-fields: true + operation: + description: Operation is the operation being + performed. This may be different than the + operation requested. e.g. a patch can result + in either a CREATE or UPDATE Operation. + type: string + options: + description: Options is the operation option + structure of the operation being performed. + e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. + This may be different than the options the + caller provided. e.g. for a patch request + the performed Operation might be a CREATE, + in which case the Options will a `meta.k8s.io/v1.CreateOptions` + even though the caller provided `meta.k8s.io/v1.PatchOptions`. + type: object + x-kubernetes-preserve-unknown-fields: true + requestKind: + description: "RequestKind is the fully-qualified + type of the original API request (for example, + v1.Pod or autoscaling.v1.Scale). If this + is specified and differs from the value + in \"kind\", an equivalent match and conversion + was performed. \n For example, if deployments + can be modified via apps/v1 and apps/v1beta1, + and a webhook registered a rule of `apiGroups:[\"apps\"], + apiVersions:[\"v1\"], resources: [\"deployments\"]` + and `matchPolicy: Equivalent`, an API request + to apps/v1beta1 deployments would be converted + and sent to the webhook with `kind: {group:\"apps\", + version:\"v1\", kind:\"Deployment\"}` (matching + the rule the webhook registered for), and + `requestKind: {group:\"apps\", version:\"v1beta1\", + kind:\"Deployment\"}` (indicating the kind + of the original API request). \n See documentation + for the \"matchPolicy\" field in the webhook + configuration type for more details." + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + requestResource: + description: "RequestResource is the fully-qualified + resource of the original API request (for + example, v1.pods). If this is specified + and differs from the value in \"resource\", + an equivalent match and conversion was performed. + \n For example, if deployments can be modified + via apps/v1 and apps/v1beta1, and a webhook + registered a rule of `apiGroups:[\"apps\"], + apiVersions:[\"v1\"], resources: [\"deployments\"]` + and `matchPolicy: Equivalent`, an API request + to apps/v1beta1 deployments would be converted + and sent to the webhook with `resource: + {group:\"apps\", version:\"v1\", resource:\"deployments\"}` + (matching the resource the webhook registered + for), and `requestResource: {group:\"apps\", + version:\"v1beta1\", resource:\"deployments\"}` + (indicating the resource of the original + API request). \n See documentation for the + \"matchPolicy\" field in the webhook configuration + type." + properties: + group: + type: string + resource: + type: string + version: + type: string + required: + - group + - resource + - version + type: object + requestSubResource: + description: RequestSubResource is the name + of the subresource of the original API request, + if any (for example, "status" or "scale") + If this is specified and differs from the + value in "subResource", an equivalent match + and conversion was performed. See documentation + for the "matchPolicy" field in the webhook + configuration type. + type: string + resource: + description: Resource is the fully-qualified + resource being requested (for example, v1.pods) + properties: + group: + type: string + resource: + type: string + version: + type: string + required: + - group + - resource + - version + type: object + subResource: + description: SubResource is the subresource + being requested, if any (for example, "status" + or "scale") + type: string + uid: + description: UID is an identifier for the + individual request/response. It allows us + to distinguish instances of requests which + are otherwise identical (parallel requests, + requests when earlier requests did not modify + etc) The UID is meant to track the round + trip (request/response) between the KAS + and the WebHook, not the user request. It + is suitable for correlating log entries + between the webhook and apiserver, for either + auditing or debugging. + type: string + userInfo: + description: UserInfo is information about + the requesting user + properties: + extra: + additionalProperties: + description: ExtraValue masks the value + so protobuf can generate + items: + type: string + type: array + description: Any additional information + provided by the authenticator. + type: object + groups: + description: The names of groups this + user is a part of. + items: + type: string + type: array + uid: + description: A unique value that identifies + this user across time. If this user + is deleted and another user by the same + name is added, they will have different + UIDs. + type: string + username: + description: The name that uniquely identifies + this user among all active users. + type: string + type: object + required: + - kind + - operation + - resource + - uid + - userInfo + type: object + operation: + description: Operation is the type of resource + operation being checked for admission control + type: string + type: object + userInfo: + description: RequestInfo contains permission info + carried in an admission request. + properties: + clusterRoles: + description: ClusterRoles is a list of possible + clusterRoles send the request. + items: + type: string + nullable: true + type: array + roles: + description: Roles is a list of possible role + send the request. + items: + type: string + nullable: true + type: array + userInfo: + description: UserInfo is the userInfo carried + in the admission request. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value + so protobuf can generate + items: + type: string + type: array + description: Any additional information provided + by the authenticator. + type: object + groups: + description: The names of groups this user + is a part of. + items: + type: string + type: array + uid: + description: A unique value that identifies + this user across time. If this user is deleted + and another user by the same name is added, + they will have different UIDs. + type: string + username: + description: The name that uniquely identifies + this user among all active users. + type: string + type: object + type: object + type: object + policy: + description: Specifies the name of the policy. + type: string + requestType: + description: Type represents request type for background + processing + enum: + - mutate + - generate + type: string + resource: + description: ResourceSpec is the information to identify + the update request. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + required: + - context + - policy + - resource + type: object + status: + description: Status contains statistics related to update + request. + properties: + generatedResources: + description: This will track the resources that are updated + by the generate Policy. Will be used during clean up + resources. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + handler: + description: Handler represents the instance ID that handles + the UR + type: string + message: + description: Specifies request status message. + type: string + state: + description: State represents state of the update request. + type: string + required: + - state + type: object + type: object + served: true + storage: true + subresources: + status: {} + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests26 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + namespace: kyverno + spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - kyverno + topologyKey: kubernetes.io/hostname + weight: 1 + containers: + - args: + - --autogenInternals=true + - --loggingFormat=text + env: + - name: INIT_CONFIG + value: kyverno + - name: METRICS_CONFIG + value: kyverno-metrics + - name: KYVERNO_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: KYVERNO_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: KYVERNO_SERVICEACCOUNT_NAME + value: kyverno + - name: KYVERNO_SVC + value: kyverno-svc + - name: TUF_ROOT + value: /.sigstore + - name: KYVERNO_DEPLOYMENT + value: kyverno + image: ghcr.io/kyverno/kyverno:v1.8.5 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 2 + httpGet: + path: /health/liveness + port: 9443 + scheme: HTTPS + initialDelaySeconds: 15 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 + name: kyverno + ports: + - containerPort: 9443 + name: https + protocol: TCP + - containerPort: 8000 + name: metrics-port + protocol: TCP + readinessProbe: + failureThreshold: 6 + httpGet: + path: /health/readiness + port: 9443 + scheme: HTTPS + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + limits: + memory: 384Mi + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + startupProbe: + failureThreshold: 20 + httpGet: + path: /health/liveness + port: 9443 + scheme: HTTPS + initialDelaySeconds: 2 + periodSeconds: 6 + volumeMounts: + - mountPath: /.sigstore + name: sigstore + dnsPolicy: ClusterFirst + initContainers: + - args: + - --loggingFormat=text + env: + - name: METRICS_CONFIG + value: kyverno-metrics + - name: KYVERNO_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: KYVERNO_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: KYVERNO_DEPLOYMENT + value: kyverno + image: ghcr.io/kyverno/kyvernopre:v1.8.5 + imagePullPolicy: IfNotPresent + name: kyverno-pre + resources: + limits: + cpu: 100m + memory: 256Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: kyverno + volumes: + - emptyDir: {} + name: sigstore + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests27 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: v1 + kind: Namespace + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests28 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:leaderelection + namespace: kyverno + rules: + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - delete + - get + - patch + - update + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - patch + - update + - watch + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests29 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:leaderelection + namespace: kyverno + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kyverno:leaderelection + subjects: + - kind: ServiceAccount + name: kyverno + namespace: kyverno + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests30 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: v1 + kind: Service + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno-svc-metrics + namespace: kyverno + spec: + ports: + - name: metrics-port + port: 8000 + protocol: TCP + targetPort: 8000 + selector: + app: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + type: ClusterIP + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests31 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: v1 + kind: Service + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno-svc + namespace: kyverno + spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: https + selector: + app: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + type: ClusterIP + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-install-kyverno-from-manifests32 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: v1 + kind: ServiceAccount + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + namespace: kyverno + remediationAction: enforce + severity: low + remediationAction: enforce diff --git a/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-kyverno-require-labels.yaml b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-kyverno-require-labels.yaml new file mode 100755 index 0000000..c143a46 --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/Policy.c2p.policy-kyverno-require-labels.yaml @@ -0,0 +1,73 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: Policy +metadata: + annotations: + policy.open-cluster-management.io/categories: "" + policy.open-cluster-management.io/controls: cm-6 + policy.open-cluster-management.io/standards: "" + name: policy-kyverno-require-labels + namespace: c2p +spec: + disabled: false + policy-templates: + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-kyverno-require-labels + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: musthave + objectDefinition: + apiVersion: kyverno.io/v1 + kind: ClusterPolicy + metadata: + name: require-labels + spec: + rules: + - match: + resources: + kinds: + - Pod + name: check-for-labels + validate: + message: label `app.kubernetes.io/name` is required + pattern: + metadata: + labels: + app.kubernetes.io/name: ?* + validationFailureAction: audit + remediationAction: enforce + severity: low + - objectDefinition: + apiVersion: policy.open-cluster-management.io/v1 + kind: ConfigurationPolicy + metadata: + name: policy-kyverno-require-labels2 + spec: + namespaceSelector: + exclude: + - kube-system + - open-cluster-management + - open-cluster-management-agent + - open-cluster-management-agent-addon + include: + - '*' + object-templates: + - complianceType: mustnothave + objectDefinition: + apiVersion: wgpolicyk8s.io/v1alpha2 + kind: PolicyReport + results: + - policy: require-labels + result: fail + remediationAction: inform + severity: low diff --git a/docs/ocm/final-outputs/ocm-policies/PolicySet.c2p.managed-kubernetes.yaml b/docs/ocm/final-outputs/ocm-policies/PolicySet.c2p.managed-kubernetes.yaml new file mode 100755 index 0000000..c1ee97e --- /dev/null +++ b/docs/ocm/final-outputs/ocm-policies/PolicySet.c2p.managed-kubernetes.yaml @@ -0,0 +1,14 @@ +apiVersion: policy.open-cluster-management.io/v1beta1 +kind: PolicySet +metadata: + annotations: + compliance-to-policy.component-title: Managed Kubernetes + name: managed-kubernetes + namespace: c2p +spec: + description: "" + policies: + - policy-deployment + - policy-high-scan + - policy-install-kyverno-from-manifests + - policy-kyverno-require-labels diff --git a/docs/oscal-vs-ocm-status-mapping.csv b/docs/ocm/oscal-ar-vs-ocm-status-mapping.csv similarity index 100% rename from docs/oscal-vs-ocm-status-mapping.csv rename to docs/ocm/oscal-ar-vs-ocm-status-mapping.csv diff --git a/docs/ocm/oscal/component-definition.csv b/docs/ocm/oscal/component-definition.csv new file mode 100644 index 0000000..8d0045f --- /dev/null +++ b/docs/ocm/oscal/component-definition.csv @@ -0,0 +1,6 @@ +$$Component_Title,$$Component_Description,$$Component_Type,$$Control_Id_List,$$Rule_Id,$$Rule_Description,$Policy_Id,$Parameter_Id,$Parameter_Description,$Parameter_Value_Alternatives,$Parameter_Value_Default,$$Profile_Source,$$Profile_Description,Rule_Actual_State_Data_Request_Evidence_Format_Reference_URL_list,Rule_Actual_State_TimeToLive,$Check_Id,$Check_Description,Fetcher_id,Fetcher_Description,Fix_id,Fix_Description,Rule_implementation_status,Rule_POAM_Reference_URL,$$Namespace +A human readable name for the component.,A description of the component including information about its function.,A category describing the purpose of the component. ALLOWED VALUES interconnection:software:hardware:service:physical:process-procedure:plan:guidance:standard:validation:,A list of textual labels that uniquely identify the controls or statements that the component implements.,A textual label that uniquely identifies a policy (desired state) that can be used to reference it elsewhere in this or other documents.,A description of the policy (desired state) including information about its purpose and scope.,Directory Name to identify Policy Resoure,A textual label that uniquely identifies the parameter associated with that policy (desired state) or controls implemented by the policy (desired state).,A description of the parameter including the purpose and use of the parameter.,ONLY for the policy (desired state) parameters: A value or set of values the parameter can take. The catalog parameters values are defined in the catalog. ,"A value recommended by Compliance Team in this profile for the parameter of the control or policy (desired state). If a CIS-benchmark exists, the default default could be the CIS-benchmark recommanded value.",A URL reference to the source catalog or profile for which this component is implementing controls for. A profile designates a selection and configuration of controls from one or more catalogs,A description of the profile.,A list of URL references that contain the Actual State Data Model (eg schema or swager API or procedure template or terraform schema). Needed by the fetcher developer. ,A TimeToLive value of the duration of time the actual state is valid before it becomes stale or obsolite or overriden. Needed by the fetcher developer. ,A textual label that uniquely identifies a check of the policy (desired state) that can be used to reference it elsewhere in this or other documents.,A description of the check of the policy (desired state) including the method (interview or examine or test) and procedure details.,A textual label that uniquely identifies a collector of the actual state (evidence) associated with the policy (desired state) that can be used to reference it elsewhere in this or other documents.,A description of the collector of the actual state (evidence) associated with the policy (desired state) including the method (interview or examine or API) and questionaire or API details.,A textual label that uniquely identifies the fix of the failed policy.,A description of the fix to remediate the failed policy.,Indicates the degree to which the a given policy is implemented. ALLOWED VALUES: IMPLEMENTED: The control is fully implemented. PARTIAL: The control is partially implemented. PLANNED: There is a plan for implementing the control as explained in the remarks. ALTERNATIVE: There is an alternative implementation for this control as explained in the remarks. NOT-APPLICABLE: This control does not apply to this system as justified in the remarks.,A URL reference to the Plan of Action and Milestones this component may be subjected to for remediation or deviation or mitigation in case of the policy (desired state) non compliance or error or failure. ,"A namespace qualifying the property's name. This allows different organizations to associate distinct semantics with the same name. Used in conjunction with ""class"" as the ontology concept. " +Managed Kubernetes,Managed Kubernetes cluster,Service,cm-6,test_configuration_check,Ensure deployment configuration is securely set up,policy-high-scan,,,,,https://github.com/usnistgov/oscal-content/blob/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json,NIST Special Publication 800-53 Revision 5 HIGH IMPACT BASELINE,,,test_configuration_check,,,,,,,,http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud +Managed Kubernetes,Managed Kubernetes cluster,Service,cm-2,test_proxy_check,Ensure Nginx is properly configured,policy-deployment,minimum_nginx_deployment_replicas,Minimum number of NGINX pod,3,3,https://github.com/usnistgov/oscal-content/blob/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json,NIST Special Publication 800-53 Revision 5 HIGH IMPACT BASELINE,,,test_proxy_check,,,,,,,,http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud +Managed Kubernetes,Managed Kubernetes cluster,Service,cm-6,install_kyverno,Install Kyverno,policy-install-kyverno-from-manifests,,,,,https://github.com/usnistgov/oscal-content/blob/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json,NIST Special Publication 800-53 Revision 5 HIGH IMPACT BASELINE,,,policy-install-kyverno-from-manifests,,,,,,,,http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud +Managed Kubernetes,Managed Kubernetes cluster,Service,cm-6,test_required_label,"By Kyverno, ensure required labels are set",policy-kyverno-require-labels,,,,,https://github.com/usnistgov/oscal-content/blob/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json,NIST Special Publication 800-53 Revision 5 HIGH IMPACT BASELINE,,,policy-kyverno-require-labels,,,,,,,,http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud \ No newline at end of file diff --git a/docs/ocm/oscal/component-definition.json b/docs/ocm/oscal/component-definition.json new file mode 100644 index 0000000..f40b04c --- /dev/null +++ b/docs/ocm/oscal/component-definition.json @@ -0,0 +1,201 @@ +{ + "component-definition": { + "uuid": "f0373e90-c75b-4400-bfb9-50056cd89a1a", + "metadata": { + "title": "OCM", + "last-modified": "2023-07-11T23:04:11+00:00", + "version": "20210826", + "oscal-version": "1.0.4" + }, + "components": [ + { + "uuid": "5bfee926-9a73-40ef-9c93-30bc53986976", + "type": "Service", + "title": "Managed Kubernetes", + "description": "Managed Kubernetes cluster", + "props": [ + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_configuration_check", + "class": "scc_class", + "remarks": "rule_set_0" + }, + { + "name": "Rule_Description", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "Ensure deployment configuration is securely set up", + "class": "scc_class", + "remarks": "rule_set_0" + }, + { + "name": "Check_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_configuration_check", + "remarks": "rule_set_0" + }, + { + "name": "Policy_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "policy-high-scan", + "remarks": "rule_set_0" + }, + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_proxy_check", + "class": "scc_class", + "remarks": "rule_set_1" + }, + { + "name": "Rule_Description", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "Ensure Nginx is properly configured", + "class": "scc_class", + "remarks": "rule_set_1" + }, + { + "name": "Parameter_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "minimum_nginx_deployment_replicas", + "class": "scc_class", + "remarks": "rule_set_1" + }, + { + "name": "Parameter_Description", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "Minimum number of NGINX pod", + "class": "scc_class", + "remarks": "rule_set_1" + }, + { + "name": "Parameter_Value_Alternatives", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "3", + "class": "scc_class", + "remarks": "rule_set_1" + }, + { + "name": "Check_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_proxy_check", + "remarks": "rule_set_1" + }, + { + "name": "Policy_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "policy-deployment", + "remarks": "rule_set_1" + }, + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "install_kyverno", + "class": "scc_class", + "remarks": "rule_set_2" + }, + { + "name": "Rule_Description", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "Install Kyverno", + "class": "scc_class", + "remarks": "rule_set_2" + }, + { + "name": "Check_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "policy-install-kyverno-from-manifests", + "remarks": "rule_set_2" + }, + { + "name": "Policy_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "policy-install-kyverno-from-manifests", + "remarks": "rule_set_2" + }, + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_required_label", + "class": "scc_class", + "remarks": "rule_set_3" + }, + { + "name": "Rule_Description", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "By Kyverno, ensure required labels are set", + "class": "scc_class", + "remarks": "rule_set_3" + }, + { + "name": "Check_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "policy-kyverno-require-labels", + "remarks": "rule_set_3" + }, + { + "name": "Policy_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "policy-kyverno-require-labels", + "remarks": "rule_set_3" + } + ], + "control-implementations": [ + { + "uuid": "d872a255-e447-46c6-9164-1419f016c953", + "source": "https://github.com/usnistgov/oscal-content/blob/main/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_HIGH-baseline_profile.json", + "description": "NIST Special Publication 800-53 Revision 5 HIGH IMPACT BASELINE", + "set-parameters": [ + { + "param-id": "minimum_nginx_deployment_replicas", + "values": [ + "3" + ] + } + ], + "implemented-requirements": [ + { + "uuid": "699e41bc-1f42-4893-abdc-7a77b42ac44c", + "control-id": "cm-6", + "description": "", + "props": [ + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_configuration_check", + "class": "scc_class" + }, + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "install_kyverno", + "class": "scc_class" + }, + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_required_label", + "class": "scc_class" + } + ] + }, + { + "uuid": "01de518e-4d49-4c88-8338-7c75826d7272", + "control-id": "cm-2", + "description": "", + "props": [ + { + "name": "Rule_Id", + "ns": "http://ibm.github.io/compliance-trestle/schemas/oscal/cd/ibmcloud", + "value": "test_proxy_check", + "class": "scc_class" + } + ] + } + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/docs/ocm/oscal/profile.json b/docs/ocm/oscal/profile.json new file mode 100644 index 0000000..ebac6c2 --- /dev/null +++ b/docs/ocm/oscal/profile.json @@ -0,0 +1,75 @@ +{ + "profile": { + "uuid": "beade175-48ad-47c0-ac38-e9c2514cba22", + "metadata": { + "title": "NIST Special Publication 800-53 Revision 5 Customized BASELINE", + "last-modified": "2021-06-08T13:57:33.585986-04:00", + "version": "Final", + "oscal-version": "1.0.0", + "roles": [ + { + "id": "creator", + "title": "Document Creator" + }, + { + "id": "contact", + "title": "Contact" + } + ], + "parties": [ + { + "uuid": "c748c806-1d77-4695-bb40-e117b2afa82e", + "type": "organization", + "name": "Joint Task Force, Transformation Initiative", + "email-addresses": [ + "sec-cert@nist.gov" + ], + "addresses": [ + { + "addr-lines": [ + "National Institute of Standards and Technology", + "Attn: Computer Security Division", + "Information Technology Laboratory", + "100 Bureau Drive (Mail Stop 8930)" + ], + "city": "Gaithersburg", + "state": "MD", + "postal-code": "20899-8930" + } + ] + } + ], + "responsible-parties": [ + { + "role-id": "creator", + "party-uuids": [ + "c748c806-1d77-4695-bb40-e117b2afa82e" + ] + }, + { + "role-id": "contact", + "party-uuids": [ + "c748c806-1d77-4695-bb40-e117b2afa82e" + ] + } + ] + }, + "imports": [ + { + "href": "./catalog.json", + "include-controls": [ + { + "with-ids": [ + "ac-6", + "cm-2", + "cm-6" + ] + } + ] + } + ], + "merge": { + "as-is": true + } + } +} \ No newline at end of file diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/kustomization.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/kustomization.yaml new file mode 100755 index 0000000..0573618 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/kustomization.yaml @@ -0,0 +1,2 @@ +generators: +- ./policy-generator.yaml diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-generator.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-generator.yaml new file mode 100755 index 0000000..6b557c2 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-generator.yaml @@ -0,0 +1,17 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: PolicyGenerator +metadata: + name: policy-generator +policyDefaults: + consolidateManifests: false + orderManifests: false + namespace: namespace +policies: + - consolidateManifests: false + orderManifests: false + name: policy-install-kyverno-from-manifests + manifests: + - remediationAction: enforce + severity: low + complianceType: musthave + path: ./policy-install-kyverno-from-manifests diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno.yaml new file mode 100755 index 0000000..b95c3a8 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno.yaml @@ -0,0 +1,18 @@ +aggregationRule: + clusterRoleSelectors: + - matchLabels: + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-generaterequest.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-generaterequest.yaml new file mode 100755 index 0000000..c7a24df --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-generaterequest.yaml @@ -0,0 +1,27 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-generaterequest +rules: +- apiGroups: + - kyverno.io + resources: + - generaterequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policies.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policies.yaml new file mode 100755 index 0000000..6536359 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policies.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-policies +rules: +- apiGroups: + - kyverno.io + resources: + - policies + - clusterpolicies + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policyreport.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policyreport.yaml new file mode 100755 index 0000000..83d5566 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-policyreport.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-policyreport +rules: +- apiGroups: + - wgpolicyk8s.io + resources: + - policyreports + - clusterpolicyreports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-reports.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-reports.yaml new file mode 100755 index 0000000..e6a17c6 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-reports.yaml @@ -0,0 +1,30 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-reports +rules: +- apiGroups: + - kyverno.io + resources: + - admissionreports + - clusteradmissionreports + - backgroundscanreports + - clusterbackgroundscanreports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-updaterequest.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-updaterequest.yaml new file mode 100755 index 0000000..135f9b9 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:admin-updaterequest.yaml @@ -0,0 +1,27 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + rbac.authorization.k8s.io/aggregate-to-admin: "true" + name: kyverno:admin-updaterequest +rules: +- apiGroups: + - kyverno.io + resources: + - updaterequests + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:events.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:events.yaml new file mode 100755 index 0000000..96d19f7 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:events.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:events +rules: +- apiGroups: + - '*' + resources: + - events + verbs: + - create + - update + - patch + - delete diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:generate.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:generate.yaml new file mode 100755 index 0000000..ccf48f7 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:generate.yaml @@ -0,0 +1,48 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:generate +rules: +- apiGroups: + - networking.k8s.io + resources: + - ingresses + - ingressclasses + - networkpolicies + verbs: + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - namespaces + - configmaps + - secrets + - resourcequotas + - limitranges + verbs: + - create + - update + - patch + - delete +- apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - create + - update + - patch + - delete diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:policies.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:policies.yaml new file mode 100755 index 0000000..20477d1 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:policies.yaml @@ -0,0 +1,54 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:policies +rules: +- apiGroups: + - kyverno.io + resources: + - policies + - policies/status + - clusterpolicies + - clusterpolicies/status + - generaterequests + - generaterequests/status + - updaterequests + - updaterequests/status + - admissionreports + - clusteradmissionreports + - backgroundscanreports + - clusterbackgroundscanreports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - deletecollection +- apiGroups: + - wgpolicyk8s.io + resources: + - policyreports + - policyreports/status + - clusterpolicyreports + - clusterpolicyreports/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - deletecollection diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:userinfo.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:userinfo.yaml new file mode 100755 index 0000000..e62b08b --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:userinfo.yaml @@ -0,0 +1,24 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:userinfo +rules: +- apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + - clusterroles + - rolebindings + - clusterrolebindings + verbs: + - watch + - list diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:view.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:view.yaml new file mode 100755 index 0000000..06c8cd9 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:view.yaml @@ -0,0 +1,22 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:view +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - get + - list + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:webhook.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:webhook.yaml new file mode 100755 index 0000000..bdb5b0b --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRole.kyverno:webhook.yaml @@ -0,0 +1,27 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:webhook +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRoleBinding.kyverno.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRoleBinding.kyverno.yaml new file mode 100755 index 0000000..b1709e7 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ClusterRoleBinding.kyverno.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kyverno +subjects: +- kind: ServiceAccount + name: kyverno + namespace: kyverno diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno-metrics.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno-metrics.yaml new file mode 100755 index 0000000..8d489d6 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno-metrics.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +data: + namespaces: '{"exclude":[],"include":[]}' +kind: ConfigMap +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno-metrics + namespace: kyverno diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno.yaml new file mode 100755 index 0000000..38cf2b6 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ConfigMap.kyverno.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + resourceFilters: '[*,kyverno,*][Event,*,*][*,kube-system,*][*,kube-public,*][*,kube-node-lease,*][Node,*,*][APIService,*,*][TokenReview,*,*][SubjectAccessReview,*,*][SelfSubjectAccessReview,*,*][Binding,*,*][ReplicaSet,*,*][AdmissionReport,*,*][ClusterAdmissionReport,*,*][BackgroundScanReport,*,*][ClusterBackgroundScanReport,*,*][ClusterRole,*,kyverno:*][ClusterRoleBinding,*,kyverno:*][ServiceAccount,kyverno,kyverno][ConfigMap,kyverno,kyverno][ConfigMap,kyverno,kyverno-metrics][Deployment,kyverno,kyverno][Job,kyverno,kyverno-hook-pre-delete][NetworkPolicy,kyverno,kyverno][PodDisruptionBudget,kyverno,kyverno][Role,kyverno,kyverno:*][RoleBinding,kyverno,kyverno:*][Secret,kyverno,kyverno-svc.kyverno.svc.*][Service,kyverno,kyverno-svc][Service,kyverno,kyverno-svc-metrics][ServiceMonitor,kyverno,kyverno-svc-service-monitor][Pod,kyverno,kyverno-test]' + webhooks: '[{"namespaceSelector": {"matchExpressions": [{"key":"kubernetes.io/metadata.name","operator":"NotIn","values":["kyverno"]}]}}]' +kind: ConfigMap +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + namespace: kyverno diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.admissionreports.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.admissionreports.kyverno.io.yaml new file mode 100755 index 0000000..f380fc5 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.admissionreports.kyverno.io.yaml @@ -0,0 +1,348 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "1" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "1" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: admissionreports.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + kind: AdmissionReport + listKind: AdmissionReportList + plural: admissionreports + shortNames: + - admr + singular: admissionreport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + - jsonPath: .metadata.labels['audit\.kyverno\.io/report\.aggregate'] + name: AGGREGATE + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: AdmissionReport is the Schema for the AdmissionReports API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + owner: + description: Owner is a reference to the report owner (e.g. a Deployment, + Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the key-value + store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this field and + enforces the foreground deletion. Defaults to false. To set + this field, a user needs "delete" permission of the owner, otherwise + 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for an individual + policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message for + the policy rule + type: string + policy: + description: Policy is the name or identifier of the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information for + the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector for + checked Kubernetes resources. For example, a policy result + may apply to all pods that match a label. Either a Subject + or a SubjectSelector can be specified. If neither are provided, + the result is assumed to be for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the checked + Kubernetes resources + items: + description: "ObjectReference contains enough information + to let you inspect or modify the referred object. --- New + uses of this type are discouraged because of difficulty + describing its usage when embedded in APIs. 1. Ignored fields. + \ It includes many fields which are not generally honored. + \ For instance, ResourceVersion and FieldPath are both very + rarely valid in actual usage. 2. Invalid usage help. It + is impossible to add specific help for individual usage. + \ In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not + honored\" or \"name must be restricted\". Those cannot be + well described when embedded. 3. Inconsistent validation. + \ Because the usages are different, the validation rules + are different by usage, which makes it hard for users to + predict what will happen. 4. The fields are both imprecise + and overly precise. Kind is not a precise mapping to a + URL. This can produce ambiguity during interpretation and + require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual + struct is irrelevant. 5. We cannot easily change it. Because + this type is embedded in many locations, updates to this + type will affect numerous schemas. Don't make new APIs + embed an underspecified API type they do not control. \n + Instead of using this type, create a locally provided and + used type that is well-focused on your reference. For example, + ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy rule + execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule within + the policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy engine that + manages this report + type: string + timestamp: + description: Timestamp indicates the time the result was found + properties: + nanos: + description: Non-negative fractions of a second at nanosecond + resolution. Negative second values with fractions must + still have non-negative nanos values that count forward + in time. Must be from 0 to 999,999,999 inclusive. This + field may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z + to 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that could not + be evaluated + type: integer + fail: + description: Fail provides the count of policies whose requirements + were not met + type: integer + pass: + description: Pass provides the count of policies whose requirements + were met + type: integer + skip: + description: Skip indicates the count of policies that were not + selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies whose + requirements were not met + type: integer + type: object + required: + - owner + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.backgroundscanreports.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.backgroundscanreports.kyverno.io.yaml new file mode 100755 index 0000000..cbb13b2 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.backgroundscanreports.kyverno.io.yaml @@ -0,0 +1,308 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "2" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "2" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: backgroundscanreports.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + kind: BackgroundScanReport + listKind: BackgroundScanReportList + plural: backgroundscanreports + shortNames: + - bgscanr + singular: backgroundscanreport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: BackgroundScanReport is the Schema for the BackgroundScanReports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for an individual + policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message for + the policy rule + type: string + policy: + description: Policy is the name or identifier of the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information for + the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector for + checked Kubernetes resources. For example, a policy result + may apply to all pods that match a label. Either a Subject + or a SubjectSelector can be specified. If neither are provided, + the result is assumed to be for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the checked + Kubernetes resources + items: + description: "ObjectReference contains enough information + to let you inspect or modify the referred object. --- New + uses of this type are discouraged because of difficulty + describing its usage when embedded in APIs. 1. Ignored fields. + \ It includes many fields which are not generally honored. + \ For instance, ResourceVersion and FieldPath are both very + rarely valid in actual usage. 2. Invalid usage help. It + is impossible to add specific help for individual usage. + \ In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not + honored\" or \"name must be restricted\". Those cannot be + well described when embedded. 3. Inconsistent validation. + \ Because the usages are different, the validation rules + are different by usage, which makes it hard for users to + predict what will happen. 4. The fields are both imprecise + and overly precise. Kind is not a precise mapping to a + URL. This can produce ambiguity during interpretation and + require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual + struct is irrelevant. 5. We cannot easily change it. Because + this type is embedded in many locations, updates to this + type will affect numerous schemas. Don't make new APIs + embed an underspecified API type they do not control. \n + Instead of using this type, create a locally provided and + used type that is well-focused on your reference. For example, + ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy rule + execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule within + the policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy engine that + manages this report + type: string + timestamp: + description: Timestamp indicates the time the result was found + properties: + nanos: + description: Non-negative fractions of a second at nanosecond + resolution. Negative second values with fractions must + still have non-negative nanos values that count forward + in time. Must be from 0 to 999,999,999 inclusive. This + field may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z + to 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that could not + be evaluated + type: integer + fail: + description: Fail provides the count of policies whose requirements + were not met + type: integer + pass: + description: Pass provides the count of policies whose requirements + were met + type: integer + skip: + description: Skip indicates the count of policies that were not + selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies whose + requirements were not met + type: integer + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusteradmissionreports.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusteradmissionreports.kyverno.io.yaml new file mode 100755 index 0000000..361f52e --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusteradmissionreports.kyverno.io.yaml @@ -0,0 +1,349 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "3" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "3" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusteradmissionreports.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + kind: ClusterAdmissionReport + listKind: ClusterAdmissionReportList + plural: clusteradmissionreports + shortNames: + - cadmr + singular: clusteradmissionreport + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + - jsonPath: .metadata.labels['audit\.kyverno\.io/report\.aggregate'] + name: AGGREGATE + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: ClusterAdmissionReport is the Schema for the ClusterAdmissionReports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + owner: + description: Owner is a reference to the report owner (e.g. a Deployment, + Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the key-value + store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this field and + enforces the foreground deletion. Defaults to false. To set + this field, a user needs "delete" permission of the owner, otherwise + 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + x-kubernetes-map-type: atomic + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for an individual + policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message for + the policy rule + type: string + policy: + description: Policy is the name or identifier of the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information for + the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector for + checked Kubernetes resources. For example, a policy result + may apply to all pods that match a label. Either a Subject + or a SubjectSelector can be specified. If neither are provided, + the result is assumed to be for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the checked + Kubernetes resources + items: + description: "ObjectReference contains enough information + to let you inspect or modify the referred object. --- New + uses of this type are discouraged because of difficulty + describing its usage when embedded in APIs. 1. Ignored fields. + \ It includes many fields which are not generally honored. + \ For instance, ResourceVersion and FieldPath are both very + rarely valid in actual usage. 2. Invalid usage help. It + is impossible to add specific help for individual usage. + \ In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not + honored\" or \"name must be restricted\". Those cannot be + well described when embedded. 3. Inconsistent validation. + \ Because the usages are different, the validation rules + are different by usage, which makes it hard for users to + predict what will happen. 4. The fields are both imprecise + and overly precise. Kind is not a precise mapping to a + URL. This can produce ambiguity during interpretation and + require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual + struct is irrelevant. 5. We cannot easily change it. Because + this type is embedded in many locations, updates to this + type will affect numerous schemas. Don't make new APIs + embed an underspecified API type they do not control. \n + Instead of using this type, create a locally provided and + used type that is well-focused on your reference. For example, + ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy rule + execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule within + the policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy engine that + manages this report + type: string + timestamp: + description: Timestamp indicates the time the result was found + properties: + nanos: + description: Non-negative fractions of a second at nanosecond + resolution. Negative second values with fractions must + still have non-negative nanos values that count forward + in time. Must be from 0 to 999,999,999 inclusive. This + field may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z + to 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that could not + be evaluated + type: integer + fail: + description: Fail provides the count of policies whose requirements + were not met + type: integer + pass: + description: Pass provides the count of policies whose requirements + were met + type: integer + skip: + description: Skip indicates the count of policies that were not + selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies whose + requirements were not met + type: integer + type: object + required: + - owner + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterbackgroundscanreports.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterbackgroundscanreports.kyverno.io.yaml new file mode 100755 index 0000000..8e24698 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterbackgroundscanreports.kyverno.io.yaml @@ -0,0 +1,308 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "4" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "4" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusterbackgroundscanreports.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + kind: ClusterBackgroundScanReport + listKind: ClusterBackgroundScanReportList + plural: clusterbackgroundscanreports + shortNames: + - cbgscanr + singular: clusterbackgroundscanreport + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[0].apiVersion + name: ApiVersion + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].kind + name: Kind + priority: 1 + type: string + - jsonPath: .metadata.ownerReferences[0].name + name: Subject + priority: 1 + type: string + - jsonPath: .spec.summary.pass + name: Pass + type: integer + - jsonPath: .spec.summary.fail + name: Fail + type: integer + - jsonPath: .spec.summary.warn + name: Warn + type: integer + - jsonPath: .spec.summary.error + name: Error + type: integer + - jsonPath: .spec.summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .metadata.labels['audit\.kyverno\.io/resource\.hash'] + name: Hash + priority: 1 + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: ClusterBackgroundScanReport is the Schema for the ClusterBackgroundScanReports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for an individual + policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message for + the policy rule + type: string + policy: + description: Policy is the name or identifier of the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information for + the policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector for + checked Kubernetes resources. For example, a policy result + may apply to all pods that match a label. Either a Subject + or a SubjectSelector can be specified. If neither are provided, + the result is assumed to be for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the checked + Kubernetes resources + items: + description: "ObjectReference contains enough information + to let you inspect or modify the referred object. --- New + uses of this type are discouraged because of difficulty + describing its usage when embedded in APIs. 1. Ignored fields. + \ It includes many fields which are not generally honored. + \ For instance, ResourceVersion and FieldPath are both very + rarely valid in actual usage. 2. Invalid usage help. It + is impossible to add specific help for individual usage. + \ In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not + honored\" or \"name must be restricted\". Those cannot be + well described when embedded. 3. Inconsistent validation. + \ Because the usages are different, the validation rules + are different by usage, which makes it hard for users to + predict what will happen. 4. The fields are both imprecise + and overly precise. Kind is not a precise mapping to a + URL. This can produce ambiguity during interpretation and + require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual + struct is irrelevant. 5. We cannot easily change it. Because + this type is embedded in many locations, updates to this + type will affect numerous schemas. Don't make new APIs + embed an underspecified API type they do not control. \n + Instead of using this type, create a locally provided and + used type that is well-focused on your reference. For example, + ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this + pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design + is not final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy rule + execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule within + the policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy engine that + manages this report + type: string + timestamp: + description: Timestamp indicates the time the result was found + properties: + nanos: + description: Non-negative fractions of a second at nanosecond + resolution. Negative second values with fractions must + still have non-negative nanos values that count forward + in time. Must be from 0 to 999,999,999 inclusive. This + field may be limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z + to 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that could not + be evaluated + type: integer + fail: + description: Fail provides the count of policies whose requirements + were not met + type: integer + pass: + description: Pass provides the count of policies whose requirements + were met + type: integer + skip: + description: Skip indicates the count of policies that were not + selected for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies whose + requirements were not met + type: integer + type: object + type: object + required: + - spec + type: object + served: true + storage: true + subresources: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicies.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicies.kyverno.io.yaml new file mode 100755 index 0000000..fa5f802 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicies.kyverno.io.yaml @@ -0,0 +1,11930 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "5" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "5" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusterpolicies.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + kind: ClusterPolicy + listKind: ClusterPolicyList + plural: clusterpolicies + shortNames: + - cpol + singular: clusterpolicy + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: ClusterPolicy declares validation, mutation, and generation behaviors + for matching resources. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec declares policy behaviors. + properties: + applyRules: + description: ApplyRules controls how rules in a policy are applied. + Rule are processed in the order of declaration. When set to `One` + processing stops after a rule has been applied i.e. the rule matches + and results in a pass, fail, or error. When set to `All` all rules + in the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied to existing + resources during a background scan. Optional. Default value is "true". + The value must be set to "false" if the policy rule uses variables + that are only available in the admission review request (e.g. user + name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy errors and + webhook response timeout errors are handled. Rules within the same + policy share the same failure behavior. Allowed values are Ignore + or Fail. Defaults to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether to trigger + generate rule in existing resources If is set to "true" generate + rule will be triggered and applied to existing matched resources. + Defaults to "false" if not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if a mutateExisting + policy is applied on policy events. Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy contains + multiple rules and each rule can validate, mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match declaration + to select resources, and an optional exclude declaration to specify + which resources to exclude. + properties: + context: + description: Context defines variables and data sources that + can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a APILookup + must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the Kubernetes + API server. The JSON data retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the JSON response + returned from the API server. For example a JMESPath + of "items | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used in + the HTTP GET request to the Kubernetes API server + (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used by the + `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an OCI/Docker + V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the ImageData struct + returned as a result of processing the image reference. + type: string + reference: + description: 'Reference is image reference to a container + image in the registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath context + variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary JSON + object that the variable may take if the JMESPath + expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath Expression + that can be used to transform the variable. + type: string + value: + description: Value is any arbitrary JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the name or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide role + names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information about + the resource being created or modified. Requires at least + one tag to be specified when under MatchResources. Specifying + ResourceDescription directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations (key-value + pairs of type string). Annotation keys and values + support the wildcard characters "*" (matches zero + or many characters) and "?" (matches at least one + character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. The + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. Each + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters `*` + (matches zero or many characters) and `?` (matches + one character).Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces names. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label keys + and values in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` (matches + one character). Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or a + value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the referenced + subject. Defaults to "" for ServiceAccount subjects. + Defaults to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. Values + defined by this API group are "User", "Group", and + "ServiceAccount". If the Authorizer does not recognized + the kind value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used to + populate each generated resource. At most one of Data + or Clone can be specified. If neither are provided, the + generated resource will be created with default data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source resource + used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource namespace. + type: string + selector: + description: Selector is a label selector. Label keys + and values in `matchLabels`. wildcard characters are + not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration used + to populate each generated resource. At most one of Data + or Clone must be specified. If neither are provided, the + generated resource will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. If + Synchronize is set to "true" changes to generated resources + will be overwritten with resource data from Data or the + resource specified in the Clone declaration. Optional. + Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field within + 'path' that will be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be available + under 'images.' in the context. If this field + is not defined, image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should be + slash-separated. Each slash-separated key must be + a valid YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This is + useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds to + ImageExtractorConfigs. This config is only valid for verifyImages + rules. + type: object + match: + description: MatchResources defines when this policy rule should + be applied. The match criteria can include resource information + (e.g. kind, name, namespace, labels) and admission review + request information like the user name or role. At least one + kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide role + names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information about + the resource being created or modified. Requires at least + one tag to be specified when under MatchResources. Specifying + ResourceDescription directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations (key-value + pairs of type string). Annotation keys and values + support the wildcard characters "*" (matches zero + or many characters) and "?" (matches at least one + character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. The + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. Each + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters `*` + (matches zero or many characters) and `?` (matches + one character).Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces names. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label keys + and values in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` (matches + one character). Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or a + value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the referenced + subject. Defaults to "" for ServiceAccount subjects. + Defaults to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. Values + defined by this API group are "User", "Group", and + "ServiceAccount". If the Authorizer does not recognized + the kind value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 + JSON Patch declarations used to modify resources. + See https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge patch + used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to be + mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must be + unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation patterns. + At least one of the patterns must be satisfied for the + validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or fail + a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared under + an `any` or `all` statement. A direct list of conditions + (without `any` or `all` statements) is also supported + for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to use + the current list element as the scope for validation. + Defaults to "true" if not specified. When set to + "false", "request.object" is used as the validation + scope within the foreach block to allow referencing + other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of annotation + for message and signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must match + (a logical OR). If the count contains a value + N, then N must be less than or equal to the + size of entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes + for keyless verification, or a nested attestor + declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty object + is provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots + are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image signatures. + The keys can be directly specified + or can be a variable reference to + a key specified in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) + within the set of attestors and the + count is applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If + specified Repository will override other + OCI image repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while comparing + manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate OCI + repository to use for resource bundle reference. The + repository can be overridden per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be displayed + on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for Pod + Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security Standard + controls to be excluded. + items: + description: PodSecurityStandard specifies the Pod + Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name of + the Pod Security Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each image + is the image name consisting of the registry + address, repository, image, and tag. Empty list + matches no containers, PSS checks are applied + at the pod level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values are + privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, + latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated to + include the SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image verification. + Every specified key-value pair must exist and match + in the verified payload. The payload may contain other + key-value pairs. Deprecated. Use annotations per Attestor + instead. + type: object + attestations: + description: Attestations are optional checks for signed + in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. See + https://github.com/in-toto/attestation. Kyverno fetches + signed attestations from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long there + are predicates that match the predicate type. + items: + description: AnyAllConditions consists of conditions + wrapped denoting a logical criteria to be fulfilled. + AnyConditions get fulfilled when at least one + of its sub-conditions passes. AllConditions + get fulfilled only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type of Predicate + contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is null, + all entries must match (a logical AND). If the + count is 1, at least one entry must match (a logical + OR). If the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes for + keyless verification, or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other key-value + pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one or + more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an optional + PEM encoded set of certificates used + to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked + and a root certificate chain is expected + instead. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots are + used. + type: string + subject: + description: Subject is the verified identity + used for keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one or more public + keys + properties: + publicKeys: + description: Keys is a set of X.509 public + keys used to verify image signatures. + The keys can be directly specified or + can be a variable reference to a key + specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) within + the set of attestors and the count is + applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If specified + Repository will override other OCI image + repository locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting of the + registry address, repository, image, and tag. Wildcards + (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of matching image + reference patterns. At least one pattern in the list + must match the image for the rule to apply. Each image + reference consists of a registry address (defaults to + docker.io), repository, image, and tag (defaults to + latest). Wildcards (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer used for + keyless signing. Deprecated. Use KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public key that the + image or attestation is signed with. Deprecated. Use + StaticKeyAttestor instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI repository + to use for image signatures and attestations that match + this rule. If specified Repository will override the + default OCI image repository configured for the installation. + The repository can also be overridden per Attestor or + Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + roots: + description: Roots is the PEM encoded Root certificate + chain used for keyless signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used for keyless + signing, for example an email address Deprecated. Use + KeylessAttestor instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images have a + digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks for policies + as well as patched resources. Optional. The default value is set + to "true", it must be set to "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation policy + rule violation should block the admission review request (enforce), + or allow (audit) the admission review request and report an error + in a policy report. Optional. Allowed values are audit or enforce. + The default value is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster Policy + attribute that specifies ValidationFailureAction namespace-wise. + It overrides ValidationFailureAction for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the policy validation + failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum time in seconds + allowed to apply this policy. After the configured time expires, + the admission request may fail, or may simply ignore the policy + results, based on the failure policy. The default timeout is 10s, + the value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime data. + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It contains auto + generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match + declaration to select resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the + Kubernetes API server. The JSON data retrieved is + stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + JSON response returned from the API server. + For example a JMESPath of "items | length(@)" + applied to the API server response to the URLPath + "/apis/apps/v1/deployments" will return the + total count of deployments across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used + in the HTTP GET request to the Kubernetes API + server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an + OCI/Docker V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + ImageData struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference to + a container image in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take if the + JMESPath expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform the + variable. + type: string + value: + description: Value is any arbitrary JSON object + representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include + resource information (e.g. kind, name, namespace, labels) + and admission review request information like the name + or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used + to populate each generated resource. At most one of + Data or Clone can be specified. If neither are provided, + the generated resource will be created with default + data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource + namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source + resource used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource + namespace. + type: string + selector: + description: Selector is a label selector. Label + keys and values in `matchLabels`. wildcard characters + are not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. At most + one of Data or Clone must be specified. If neither + are provided, the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. + If Synchronize is set to "true" changes to generated + resources will be overwritten with resource data from + Data or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field + within 'path' that will be used to uniquely identify + an image. Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be + available under 'images.' in the context. + If this field is not defined, image entries will + appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should + be slash-separated. Each slash-separated key must + be a valid YAML key or a wildcard '*'. Wildcard + keys are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This + is useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds + to ImageExtractorConfigs. This config is only valid for + verifyImages rules. + type: object + match: + description: MatchResources defines when this policy rule + should be applied. The match criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the user name or role. + At least one kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to + be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must + be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or + fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct list + of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` + statements) is also supported for backwards + compatibility but will be deprecated in + the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to + use the current list element as the scope for + validation. Defaults to "true" if not specified. + When set to "false", "request.object" is used + as the validation scope within the foreach block + to allow referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of + annotation for message and signature. Default + is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while + comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle reference. + The repository can be overridden per Attestor + or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be + displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for + Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies the + Pod Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name + of the Pod Security Standard control. See: + https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each + image is the image name consisting of the + registry address, repository, image, and + tag. Empty list matches no containers, PSS + checks are applied at the pod level only. + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values + are privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated + to include the SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image verification. + Every specified key-value pair must exist and match + in the verified payload. The payload may contain + other key-value pairs. Deprecated. Use annotations + per Attestor instead. + type: object + attestations: + description: Attestations are optional checks for + signed in-toto Statements used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If + the count is null, all entries must + match (a logical AND). If the count + is 1, at least one entry must match + (a logical OR). If the count contains + a value N, then N must be less than + or equal to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify a + more complex set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used to + verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of + attribute used to verify a Sigstore + keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set of + X.509 public keys used to + verify image signatures. The + keys can be directly specified + or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a + separate staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use + for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long + there are predicates that match the predicate + type. + items: + description: AnyAllConditions consists of + conditions wrapped denoting a logical criteria + to be fulfilled. AnyConditions get fulfilled + when at least one of its sub-conditions + passes. AllConditions get fulfilled only + when all of its sub-conditions pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type + of Predicate contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must + match (a logical OR). If the count contains + a value N, then N must be less than or equal + to the size of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty + object is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, the + system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository will + override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting of + the registry address, repository, image, and tag. + Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of matching + image reference patterns. At least one pattern in + the list must match the image for the rule to apply. + Each image reference consists of a registry address + (defaults to docker.io), repository, image, and + tag (defaults to latest). Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer used + for keyless signing. Deprecated. Use KeylessAttestor + instead. + type: string + key: + description: Key is the PEM encoded public key that + the image or attestation is signed with. Deprecated. + Use StaticKeyAttestor instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI + repository to use for image signatures and attestations + that match this rule. If specified Repository will + override the default OCI image repository configured + for the installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + roots: + description: Roots is the PEM encoded Root certificate + chain used for keyless signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used for keyless + signing, for example an email address Deprecated. + Use KeylessAttestor instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images have + a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply to the + policy + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to serve the admission + request. Deprecated in favor of Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v2beta1 + schema: + openAPIV3Schema: + description: ClusterPolicy declares validation, mutation, and generation behaviors + for matching resources. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec declares policy behaviors. + properties: + applyRules: + description: ApplyRules controls how rules in a policy are applied. + Rule are processed in the order of declaration. When set to `One` + processing stops after a rule has been applied i.e. the rule matches + and results in a pass, fail, or error. When set to `All` all rules + in the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied to existing + resources during a background scan. Optional. Default value is "true". + The value must be set to "false" if the policy rule uses variables + that are only available in the admission review request (e.g. user + name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy errors and + webhook response timeout errors are handled. Rules within the same + policy share the same failure behavior. Allowed values are Ignore + or Fail. Defaults to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether to trigger + generate rule in existing resources If is set to "true" generate + rule will be triggered and applied to existing matched resources. + Defaults to "false" if not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if a mutateExisting + policy is applied on policy events. Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy contains + multiple rules and each rule can validate, mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match declaration + to select resources, and an optional exclude declaration to specify + which resources to exclude. + properties: + context: + description: Context defines variables and data sources that + can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a APILookup + must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the Kubernetes + API server. The JSON data retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the JSON response + returned from the API server. For example a JMESPath + of "items | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used in + the HTTP GET request to the Kubernetes API server + (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used by the + `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an OCI/Docker + V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the ImageData struct + returned as a result of processing the image reference. + type: string + reference: + description: 'Reference is image reference to a container + image in the registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath context + variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary JSON + object that the variable may take if the JMESPath + expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath Expression + that can be used to transform the variable. + type: string + value: + description: Value is any arbitrary JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the name or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used to + populate each generated resource. At most one of Data + or Clone can be specified. If neither are provided, the + generated resource will be created with default data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source resource + used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource namespace. + type: string + selector: + description: Selector is a label selector. Label keys + and values in `matchLabels`. wildcard characters are + not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration used + to populate each generated resource. At most one of Data + or Clone must be specified. If neither are provided, the + generated resource will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. If + Synchronize is set to "true" changes to generated resources + will be overwritten with resource data from Data or the + resource specified in the Clone declaration. Optional. + Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field within + 'path' that will be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be available + under 'images.' in the context. If this field + is not defined, image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should be + slash-separated. Each slash-separated key must be + a valid YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This is + useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds to + ImageExtractorConfigs. This config is only valid for verifyImages + rules. + type: object + match: + description: MatchResources defines when this policy rule should + be applied. The match criteria can include resource information + (e.g. kind, name, namespace, labels) and admission review + request information like the user name or role. At least one + kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 + JSON Patch declarations used to modify resources. + See https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge patch + used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to be + mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must be + unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based conditional + rule execution. This is useful for finer control of when + an rule is applied. A condition can reference object data + using JMESPath notation. Here, all of the conditions need + to pass + items: + properties: + key: + description: Key is the context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional operation + to perform. Valid operators are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, or set + of values. The values can be fixed set or can be + variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based conditional + rule execution. This is useful for finer control of when + an rule is applied. A condition can reference object data + using JMESPath notation. Here, at least one of the conditions + need to pass + items: + properties: + key: + description: Key is the context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional operation + to perform. Valid operators are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, or set + of values. The values can be fixed set or can be + variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation patterns. + At least one of the patterns must be satisfied for the + validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or fail + a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared under + an `any` or `all` statement. A direct list of conditions + (without `any` or `all` statements) is also supported + for backwards compatibility See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A condition + can reference object data using JMESPath notation. + Here, all of the conditions need to pass + items: + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators are: + Equals, NotEquals, In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A condition + can reference object data using JMESPath notation. + Here, at least one of the conditions need to pass + items: + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators are: + Equals, NotEquals, In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: object + foreach: + description: ForEach applies validate rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to use + the current list element as the scope for validation. + Defaults to "true" if not specified. When set to + "false", "request.object" is used as the validation + scope within the foreach block to allow referencing + other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of annotation + for message and signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must match + (a logical OR). If the count contains a value + N, then N must be less than or equal to the + size of entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes + for keyless verification, or a nested attestor + declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty object + is provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots + are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image signatures. + The keys can be directly specified + or can be a variable reference to + a key specified in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) + within the set of attestors and the + count is applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If + specified Repository will override other + OCI image repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while comparing + manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate OCI + repository to use for resource bundle reference. The + repository can be overridden per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be displayed + on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for Pod + Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security Standard + controls to be excluded. + items: + description: PodSecurityStandard specifies the Pod + Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name of + the Pod Security Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each image + is the image name consisting of the registry + address, repository, image, and tag. Empty list + matches no containers, PSS checks are applied + at the pod level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values are + privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, + latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated to + include the SHA digest retrieved during the registration. + properties: + attestations: + description: Attestations are optional checks for signed + in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. See + https://github.com/in-toto/attestation. Kyverno fetches + signed attestations from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long there + are predicates that match the predicate type. + items: + description: AnyAllConditions consists of conditions + wrapped denoting a logical criteria to be fulfilled. + AnyConditions get fulfilled when at least one + of its sub-conditions passes. AllConditions + get fulfilled only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type of Predicate + contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is null, + all entries must match (a logical AND). If the + count is 1, at least one entry must match (a logical + OR). If the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes for + keyless verification, or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other key-value + pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one or + more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an optional + PEM encoded set of certificates used + to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked + and a root certificate chain is expected + instead. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots are + used. + type: string + subject: + description: Subject is the verified identity + used for keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one or more public + keys + properties: + publicKeys: + description: Keys is a set of X.509 public + keys used to verify image signatures. + The keys can be directly specified or + can be a variable reference to a key + specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) within + the set of attestors and the count is + applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If specified + Repository will override other OCI image + repository locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + imageReferences: + description: 'ImageReferences is a list of matching image + reference patterns. At least one pattern in the list + must match the image for the rule to apply. Each image + reference consists of a registry address (defaults to + docker.io), repository, image, and tag (defaults to + latest). Wildcards (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI repository + to use for image signatures and attestations that match + this rule. If specified Repository will override the + default OCI image repository configured for the installation. + The repository can also be overridden per Attestor or + Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + verifyDigest: + default: true + description: VerifyDigest validates that images have a + digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks for policies + as well as patched resources. Optional. The default value is set + to "true", it must be set to "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation policy + rule violation should block the admission review request (enforce), + or allow (audit) the admission review request and report an error + in a policy report. Optional. Allowed values are audit or enforce. + The default value is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster Policy + attribute that specifies ValidationFailureAction namespace-wise. + It overrides ValidationFailureAction for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the policy validation + failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum time in seconds + allowed to apply this policy. After the configured time expires, + the admission request may fail, or may simply ignore the policy + results, based on the failure policy. The default timeout is 10s, + the value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime data. + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It contains auto + generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match + declaration to select resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the + Kubernetes API server. The JSON data retrieved is + stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + JSON response returned from the API server. + For example a JMESPath of "items | length(@)" + applied to the API server response to the URLPath + "/apis/apps/v1/deployments" will return the + total count of deployments across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used + in the HTTP GET request to the Kubernetes API + server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an + OCI/Docker V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + ImageData struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference to + a container image in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take if the + JMESPath expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform the + variable. + type: string + value: + description: Value is any arbitrary JSON object + representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include + resource information (e.g. kind, name, namespace, labels) + and admission review request information like the name + or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used + to populate each generated resource. At most one of + Data or Clone can be specified. If neither are provided, + the generated resource will be created with default + data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource + namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source + resource used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource + namespace. + type: string + selector: + description: Selector is a label selector. Label + keys and values in `matchLabels`. wildcard characters + are not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. At most + one of Data or Clone must be specified. If neither + are provided, the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. + If Synchronize is set to "true" changes to generated + resources will be overwritten with resource data from + Data or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field + within 'path' that will be used to uniquely identify + an image. Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be + available under 'images.' in the context. + If this field is not defined, image entries will + appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should + be slash-separated. Each slash-separated key must + be a valid YAML key or a wildcard '*'. Wildcard + keys are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This + is useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds + to ImageExtractorConfigs. This config is only valid for + verifyImages rules. + type: object + match: + description: MatchResources defines when this policy rule + should be applied. The match criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the user name or role. + At least one kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to + be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must + be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or + fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct list + of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` + statements) is also supported for backwards + compatibility but will be deprecated in + the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to + use the current list element as the scope for + validation. Defaults to "true" if not specified. + When set to "false", "request.object" is used + as the validation scope within the foreach block + to allow referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of + annotation for message and signature. Default + is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while + comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle reference. + The repository can be overridden per Attestor + or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be + displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for + Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies the + Pod Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name + of the Pod Security Standard control. See: + https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each + image is the image name consisting of the + registry address, repository, image, and + tag. Empty list matches no containers, PSS + checks are applied at the pod level only. + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values + are privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated + to include the SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image verification. + Every specified key-value pair must exist and match + in the verified payload. The payload may contain + other key-value pairs. Deprecated. Use annotations + per Attestor instead. + type: object + attestations: + description: Attestations are optional checks for + signed in-toto Statements used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If + the count is null, all entries must + match (a logical AND). If the count + is 1, at least one entry must match + (a logical OR). If the count contains + a value N, then N must be less than + or equal to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify a + more complex set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used to + verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of + attribute used to verify a Sigstore + keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set of + X.509 public keys used to + verify image signatures. The + keys can be directly specified + or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a + separate staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use + for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long + there are predicates that match the predicate + type. + items: + description: AnyAllConditions consists of + conditions wrapped denoting a logical criteria + to be fulfilled. AnyConditions get fulfilled + when at least one of its sub-conditions + passes. AllConditions get fulfilled only + when all of its sub-conditions pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type + of Predicate contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must + match (a logical OR). If the count contains + a value N, then N must be less than or equal + to the size of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty + object is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, the + system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository will + override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting of + the registry address, repository, image, and tag. + Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of matching + image reference patterns. At least one pattern in + the list must match the image for the rule to apply. + Each image reference consists of a registry address + (defaults to docker.io), repository, image, and + tag (defaults to latest). Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer used + for keyless signing. Deprecated. Use KeylessAttestor + instead. + type: string + key: + description: Key is the PEM encoded public key that + the image or attestation is signed with. Deprecated. + Use StaticKeyAttestor instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI + repository to use for image signatures and attestations + that match this rule. If specified Repository will + override the default OCI image repository configured + for the installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + roots: + description: Roots is the PEM encoded Root certificate + chain used for keyless signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used for keyless + signing, for example an email address Deprecated. + Use KeylessAttestor instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images have + a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply to the + policy + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to serve the admission + request. Deprecated in favor of Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicyreports.wgpolicyk8s.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicyreports.wgpolicyk8s.io.yaml new file mode 100755 index 0000000..313afbe --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.clusterpolicyreports.wgpolicyk8s.io.yaml @@ -0,0 +1,370 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "6" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "6" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: clusterpolicyreports.wgpolicyk8s.io +spec: + group: wgpolicyk8s.io + names: + kind: ClusterPolicyReport + listKind: ClusterPolicyReportList + plural: clusterpolicyreports + shortNames: + - cpolr + singular: clusterpolicyreport + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .scope.kind + name: Kind + priority: 1 + type: string + - jsonPath: .scope.name + name: Name + priority: 1 + type: string + - jsonPath: .summary.pass + name: Pass + type: integer + - jsonPath: .summary.fail + name: Fail + type: integer + - jsonPath: .summary.warn + name: Warn + type: integer + - jsonPath: .summary.error + name: Error + type: integer + - jsonPath: .summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: ClusterPolicyReport is the Schema for the clusterpolicyreports + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for an individual + policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message for the + policy rule + type: string + policy: + description: Policy is the name or identifier of the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information for the + policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector for checked + Kubernetes resources. For example, a policy result may apply to + all pods that match a label. Either a Subject or a SubjectSelector + can be specified. If neither are provided, the result is assumed + to be for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the checked Kubernetes + resources + items: + description: "ObjectReference contains enough information to let + you inspect or modify the referred object. --- New uses of this + type are discouraged because of difficulty describing its usage + when embedded in APIs. 1. Ignored fields. It includes many + fields which are not generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in actual usage. 2. + Invalid usage help. It is impossible to add specific help for + individual usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types A and B\" or \"UID + not honored\" or \"name must be restricted\". Those cannot be + well described when embedded. 3. Inconsistent validation. Because + the usages are different, the validation rules are different + by usage, which makes it hard for users to predict what will + happen. 4. The fields are both imprecise and overly precise. + \ Kind is not a precise mapping to a URL. This can produce ambiguity + during interpretation and require a REST mapping. In most cases, + the dependency is on the group,resource tuple and the version + of the actual struct is irrelevant. 5. We cannot easily change + it. Because this type is embedded in many locations, updates + to this type will affect numerous schemas. Don't make new APIs + embed an underspecified API type they do not control. \n Instead + of using this type, create a locally provided and used type + that is well-focused on your reference. For example, ServiceReferences + for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule within the + policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy engine that + manages this report + type: string + timestamp: + description: Timestamp indicates the time the result was found + properties: + nanos: + description: Non-negative fractions of a second at nanosecond + resolution. Negative second values with fractions must still + have non-negative nanos values that count forward in time. + Must be from 0 to 999,999,999 inclusive. This field may be + limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + scope: + description: Scope is an optional reference to the report scope (e.g. + a Deployment, Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire + object, this string should contain a valid JSON/Go field access + statement, such as desiredState.manifest.containers[2]. For example, + if the object reference is to a container within a pod, this would + take on a value like: "spec.containers{name}" (where "name" refers + to the name of the container that triggered the event) or if no + container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design is not + final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is + made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + scopeSelector: + description: ScopeSelector is an optional selector for multiple scopes + (e.g. Pods). Either one of, or none of, but not both of, Scope or ScopeSelector + should be specified. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains + values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to a set + of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator + is In or NotIn, the values array must be non-empty. If the + operator is Exists or DoesNotExist, the values array must + be empty. This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that could not be + evaluated + type: integer + fail: + description: Fail provides the count of policies whose requirements + were not met + type: integer + pass: + description: Pass provides the count of policies whose requirements + were met + type: integer + skip: + description: Skip indicates the count of policies that were not selected + for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies whose + requirements were not met + type: integer + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.generaterequests.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.generaterequests.kyverno.io.yaml new file mode 100755 index 0000000..0739a00 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.generaterequests.kyverno.io.yaml @@ -0,0 +1,191 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "7" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "7" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: generaterequests.kyverno.io +spec: + group: kyverno.io + names: + kind: GenerateRequest + listKind: GenerateRequestList + plural: generaterequests + shortNames: + - gr + singular: generaterequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.policy + name: Policy + type: string + - jsonPath: .spec.resource.kind + name: ResourceKind + type: string + - jsonPath: .spec.resource.name + name: ResourceName + type: string + - jsonPath: .spec.resource.namespace + name: ResourceNamespace + type: string + - jsonPath: .status.state + name: status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: GenerateRequest is a request to process generate rule. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the information to identify the generate request. + properties: + context: + description: Context ... + properties: + admissionRequestInfo: + description: AdmissionRequestInfoObject stores the admission request + and operation details + properties: + admissionRequest: + type: string + operation: + description: Operation is the type of resource operation being + checked for admission control + type: string + type: object + userInfo: + description: RequestInfo contains permission info carried in an + admission request. + properties: + clusterRoles: + description: ClusterRoles is a list of possible clusterRoles + send the request. + items: + type: string + nullable: true + type: array + roles: + description: Roles is a list of possible role send the request. + items: + type: string + nullable: true + type: array + userInfo: + description: UserInfo is the userInfo carried in the admission + request. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf + can generate + items: + type: string + type: array + description: Any additional information provided by the + authenticator. + type: object + groups: + description: The names of groups this user is a part of. + items: + type: string + type: array + uid: + description: A unique value that identifies this user + across time. If this user is deleted and another user + by the same name is added, they will have different + UIDs. + type: string + username: + description: The name that uniquely identifies this user + among all active users. + type: string + type: object + type: object + type: object + policy: + description: Specifies the name of the policy. + type: string + resource: + description: ResourceSpec is the information to identify the generate + request. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + required: + - context + - policy + - resource + type: object + status: + description: Status contains statistics related to generate request. + properties: + generatedResources: + description: This will track the resources that are generated by the + generate Policy. Will be used during clean up resources. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + message: + description: Specifies request status message. + type: string + state: + description: State represents state of the generate request. + type: string + required: + - state + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policies.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policies.kyverno.io.yaml new file mode 100755 index 0000000..8b0505e --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policies.kyverno.io.yaml @@ -0,0 +1,11934 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "8" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "8" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: policies.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + - all + kind: Policy + listKind: PolicyList + plural: policies + shortNames: + - pol + singular: policy + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v1 + schema: + openAPIV3Schema: + description: 'Policy declares validation, mutation, and generation behaviors + for matching resources. See: https://kyverno.io/docs/writing-policies/ for + more information.' + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines policy behaviors and contains one or more rules. + properties: + applyRules: + description: ApplyRules controls how rules in a policy are applied. + Rule are processed in the order of declaration. When set to `One` + processing stops after a rule has been applied i.e. the rule matches + and results in a pass, fail, or error. When set to `All` all rules + in the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied to existing + resources during a background scan. Optional. Default value is "true". + The value must be set to "false" if the policy rule uses variables + that are only available in the admission review request (e.g. user + name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy errors and + webhook response timeout errors are handled. Rules within the same + policy share the same failure behavior. Allowed values are Ignore + or Fail. Defaults to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether to trigger + generate rule in existing resources If is set to "true" generate + rule will be triggered and applied to existing matched resources. + Defaults to "false" if not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if a mutateExisting + policy is applied on policy events. Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy contains + multiple rules and each rule can validate, mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match declaration + to select resources, and an optional exclude declaration to specify + which resources to exclude. + properties: + context: + description: Context defines variables and data sources that + can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a APILookup + must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the Kubernetes + API server. The JSON data retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the JSON response + returned from the API server. For example a JMESPath + of "items | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used in + the HTTP GET request to the Kubernetes API server + (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used by the + `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an OCI/Docker + V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the ImageData struct + returned as a result of processing the image reference. + type: string + reference: + description: 'Reference is image reference to a container + image in the registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath context + variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary JSON + object that the variable may take if the JMESPath + expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath Expression + that can be used to transform the variable. + type: string + value: + description: Value is any arbitrary JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the name or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide role + names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information about + the resource being created or modified. Requires at least + one tag to be specified when under MatchResources. Specifying + ResourceDescription directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations (key-value + pairs of type string). Annotation keys and values + support the wildcard characters "*" (matches zero + or many characters) and "?" (matches at least one + character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. The + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. Each + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters `*` + (matches zero or many characters) and `?` (matches + one character).Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces names. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label keys + and values in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` (matches + one character). Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or a + value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the referenced + subject. Defaults to "" for ServiceAccount subjects. + Defaults to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. Values + defined by this API group are "User", "Group", and + "ServiceAccount". If the Authorizer does not recognized + the kind value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used to + populate each generated resource. At most one of Data + or Clone can be specified. If neither are provided, the + generated resource will be created with default data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source resource + used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource namespace. + type: string + selector: + description: Selector is a label selector. Label keys + and values in `matchLabels`. wildcard characters are + not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration used + to populate each generated resource. At most one of Data + or Clone must be specified. If neither are provided, the + generated resource will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. If + Synchronize is set to "true" changes to generated resources + will be overwritten with resource data from Data or the + resource specified in the Clone declaration. Optional. + Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field within + 'path' that will be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be available + under 'images.' in the context. If this field + is not defined, image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should be + slash-separated. Each slash-separated key must be + a valid YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This is + useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds to + ImageExtractorConfigs. This config is only valid for verifyImages + rules. + type: object + match: + description: MatchResources defines when this policy rule should + be applied. The match criteria can include resource information + (e.g. kind, name, namespace, labels) and admission review + request information like the user name or role. At least one + kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide role + names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information about + the resource being created or modified. Requires at least + one tag to be specified when under MatchResources. Specifying + ResourceDescription directly under match is being deprecated. + Please specify under "any" or "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations (key-value + pairs of type string). Annotation keys and values + support the wildcard characters "*" (matches zero + or many characters) and "?" (matches at least one + character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. The + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + NOTE: "Name" is being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. Each + name supports wildcard characters "*" (matches zero + or many characters) and "?" (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters `*` + (matches zero or many characters) and `?` (matches + one character).Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces names. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label keys + and values in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` (matches + one character). Wildcards allows writing label selectors + like ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not match + an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or a + value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the referenced + subject. Defaults to "" for ServiceAccount subjects. + Defaults to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. Values + defined by this API group are "User", "Group", and + "ServiceAccount". If the Authorizer does not recognized + the kind value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the Authorizer + should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 + JSON Patch declarations used to modify resources. + See https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge patch + used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to be + mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must be + unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation patterns. + At least one of the patterns must be satisfied for the + validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or fail + a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared under + an `any` or `all` statement. A direct list of conditions + (without `any` or `all` statements) is also supported + for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to use + the current list element as the scope for validation. + Defaults to "true" if not specified. When set to + "false", "request.object" is used as the validation + scope within the foreach block to allow referencing + other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of annotation + for message and signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must match + (a logical OR). If the count contains a value + N, then N must be less than or equal to the + size of entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes + for keyless verification, or a nested attestor + declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty object + is provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots + are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image signatures. + The keys can be directly specified + or can be a variable reference to + a key specified in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) + within the set of attestors and the + count is applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If + specified Repository will override other + OCI image repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while comparing + manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate OCI + repository to use for resource bundle reference. The + repository can be overridden per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be displayed + on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for Pod + Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security Standard + controls to be excluded. + items: + description: PodSecurityStandard specifies the Pod + Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name of + the Pod Security Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each image + is the image name consisting of the registry + address, repository, image, and tag. Empty list + matches no containers, PSS checks are applied + at the pod level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values are + privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, + latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated to + include the SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image verification. + Every specified key-value pair must exist and match + in the verified payload. The payload may contain other + key-value pairs. Deprecated. Use annotations per Attestor + instead. + type: object + attestations: + description: Attestations are optional checks for signed + in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. See + https://github.com/in-toto/attestation. Kyverno fetches + signed attestations from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long there + are predicates that match the predicate type. + items: + description: AnyAllConditions consists of conditions + wrapped denoting a logical criteria to be fulfilled. + AnyConditions get fulfilled when at least one + of its sub-conditions passes. AllConditions + get fulfilled only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type of Predicate + contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is null, + all entries must match (a logical AND). If the + count is 1, at least one entry must match (a logical + OR). If the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes for + keyless verification, or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other key-value + pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one or + more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an optional + PEM encoded set of certificates used + to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked + and a root certificate chain is expected + instead. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots are + used. + type: string + subject: + description: Subject is the verified identity + used for keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one or more public + keys + properties: + publicKeys: + description: Keys is a set of X.509 public + keys used to verify image signatures. + The keys can be directly specified or + can be a variable reference to a key + specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) within + the set of attestors and the count is + applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If specified + Repository will override other OCI image + repository locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting of the + registry address, repository, image, and tag. Wildcards + (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of matching image + reference patterns. At least one pattern in the list + must match the image for the rule to apply. Each image + reference consists of a registry address (defaults to + docker.io), repository, image, and tag (defaults to + latest). Wildcards (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer used for + keyless signing. Deprecated. Use KeylessAttestor instead. + type: string + key: + description: Key is the PEM encoded public key that the + image or attestation is signed with. Deprecated. Use + StaticKeyAttestor instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI repository + to use for image signatures and attestations that match + this rule. If specified Repository will override the + default OCI image repository configured for the installation. + The repository can also be overridden per Attestor or + Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + roots: + description: Roots is the PEM encoded Root certificate + chain used for keyless signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used for keyless + signing, for example an email address Deprecated. Use + KeylessAttestor instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images have a + digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks for policies + as well as patched resources. Optional. The default value is set + to "true", it must be set to "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation policy + rule violation should block the admission review request (enforce), + or allow (audit) the admission review request and report an error + in a policy report. Optional. Allowed values are audit or enforce. + The default value is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster Policy + attribute that specifies ValidationFailureAction namespace-wise. + It overrides ValidationFailureAction for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the policy validation + failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum time in seconds + allowed to apply this policy. After the configured time expires, + the admission request may fail, or may simply ignore the policy + results, based on the failure policy. The default timeout is 10s, + the value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime information. Deprecated. Policy + metrics are available via the metrics endpoint + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It contains auto + generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match + declaration to select resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the + Kubernetes API server. The JSON data retrieved is + stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + JSON response returned from the API server. + For example a JMESPath of "items | length(@)" + applied to the API server response to the URLPath + "/apis/apps/v1/deployments" will return the + total count of deployments across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used + in the HTTP GET request to the Kubernetes API + server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an + OCI/Docker V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + ImageData struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference to + a container image in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take if the + JMESPath expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform the + variable. + type: string + value: + description: Value is any arbitrary JSON object + representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include + resource information (e.g. kind, name, namespace, labels) + and admission review request information like the name + or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used + to populate each generated resource. At most one of + Data or Clone can be specified. If neither are provided, + the generated resource will be created with default + data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource + namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source + resource used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource + namespace. + type: string + selector: + description: Selector is a label selector. Label + keys and values in `matchLabels`. wildcard characters + are not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. At most + one of Data or Clone must be specified. If neither + are provided, the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. + If Synchronize is set to "true" changes to generated + resources will be overwritten with resource data from + Data or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field + within 'path' that will be used to uniquely identify + an image. Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be + available under 'images.' in the context. + If this field is not defined, image entries will + appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should + be slash-separated. Each slash-separated key must + be a valid YAML key or a wildcard '*'. Wildcard + keys are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This + is useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds + to ImageExtractorConfigs. This config is only valid for + verifyImages rules. + type: object + match: + description: MatchResources defines when this policy rule + should be applied. The match criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the user name or role. + At least one kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to + be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must + be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or + fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct list + of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` + statements) is also supported for backwards + compatibility but will be deprecated in + the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to + use the current list element as the scope for + validation. Defaults to "true" if not specified. + When set to "false", "request.object" is used + as the validation scope within the foreach block + to allow referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of + annotation for message and signature. Default + is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while + comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle reference. + The repository can be overridden per Attestor + or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be + displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for + Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies the + Pod Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name + of the Pod Security Standard control. See: + https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each + image is the image name consisting of the + registry address, repository, image, and + tag. Empty list matches no containers, PSS + checks are applied at the pod level only. + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values + are privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated + to include the SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image verification. + Every specified key-value pair must exist and match + in the verified payload. The payload may contain + other key-value pairs. Deprecated. Use annotations + per Attestor instead. + type: object + attestations: + description: Attestations are optional checks for + signed in-toto Statements used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If + the count is null, all entries must + match (a logical AND). If the count + is 1, at least one entry must match + (a logical OR). If the count contains + a value N, then N must be less than + or equal to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify a + more complex set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used to + verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of + attribute used to verify a Sigstore + keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set of + X.509 public keys used to + verify image signatures. The + keys can be directly specified + or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a + separate staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use + for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long + there are predicates that match the predicate + type. + items: + description: AnyAllConditions consists of + conditions wrapped denoting a logical criteria + to be fulfilled. AnyConditions get fulfilled + when at least one of its sub-conditions + passes. AllConditions get fulfilled only + when all of its sub-conditions pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type + of Predicate contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must + match (a logical OR). If the count contains + a value N, then N must be less than or equal + to the size of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty + object is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, the + system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository will + override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting of + the registry address, repository, image, and tag. + Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of matching + image reference patterns. At least one pattern in + the list must match the image for the rule to apply. + Each image reference consists of a registry address + (defaults to docker.io), repository, image, and + tag (defaults to latest). Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer used + for keyless signing. Deprecated. Use KeylessAttestor + instead. + type: string + key: + description: Key is the PEM encoded public key that + the image or attestation is signed with. Deprecated. + Use StaticKeyAttestor instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI + repository to use for image signatures and attestations + that match this rule. If specified Repository will + override the default OCI image repository configured + for the installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + roots: + description: Roots is the PEM encoded Root certificate + chain used for keyless signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used for keyless + signing, for example an email address Deprecated. + Use KeylessAttestor instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images have + a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply to the + policy + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to serve the admission + request. Deprecated in favor of Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .spec.background + name: Background + type: boolean + - jsonPath: .spec.validationFailureAction + name: Validate Action + type: string + - jsonPath: .spec.failurePolicy + name: Failure Policy + priority: 1 + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + name: v2beta1 + schema: + openAPIV3Schema: + description: 'Policy declares validation, mutation, and generation behaviors + for matching resources. See: https://kyverno.io/docs/writing-policies/ for + more information.' + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec defines policy behaviors and contains one or more rules. + properties: + applyRules: + description: ApplyRules controls how rules in a policy are applied. + Rule are processed in the order of declaration. When set to `One` + processing stops after a rule has been applied i.e. the rule matches + and results in a pass, fail, or error. When set to `All` all rules + in the policy are processed. The default is `All`. + enum: + - All + - One + type: string + background: + default: true + description: Background controls if rules are applied to existing + resources during a background scan. Optional. Default value is "true". + The value must be set to "false" if the policy rule uses variables + that are only available in the admission review request (e.g. user + name). + type: boolean + failurePolicy: + description: FailurePolicy defines how unexpected policy errors and + webhook response timeout errors are handled. Rules within the same + policy share the same failure behavior. Allowed values are Ignore + or Fail. Defaults to Fail. + enum: + - Ignore + - Fail + type: string + generateExistingOnPolicyUpdate: + description: GenerateExistingOnPolicyUpdate controls whether to trigger + generate rule in existing resources If is set to "true" generate + rule will be triggered and applied to existing matched resources. + Defaults to "false" if not specified. + type: boolean + mutateExistingOnPolicyUpdate: + description: MutateExistingOnPolicyUpdate controls if a mutateExisting + policy is applied on policy events. Default value is "false". + type: boolean + rules: + description: Rules is a list of Rule instances. A Policy contains + multiple rules and each rule can validate, mutate, or generate resources. + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match declaration + to select resources, and an optional exclude declaration to specify + which resources to exclude. + properties: + context: + description: Context defines variables and data sources that + can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a APILookup + must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the Kubernetes + API server. The JSON data retrieved is stored in the + context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the JSON response + returned from the API server. For example a JMESPath + of "items | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments across + all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used in + the HTTP GET request to the Kubernetes API server + (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used by the + `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an OCI/Docker + V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match Expression + that can be used to transform the ImageData struct + returned as a result of processing the image reference. + type: string + reference: + description: 'Reference is image reference to a container + image in the registry. Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath context + variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary JSON + object that the variable may take if the JMESPath + expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath Expression + that can be used to transform the variable. + type: string + value: + description: Value is any arbitrary JSON object representable + in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the name or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used to + populate each generated resource. At most one of Data + or Clone can be specified. If neither are provided, the + generated resource will be created with default data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source resource + used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource namespace. + type: string + selector: + description: Selector is a label selector. Label keys + and values in `matchLabels`. wildcard characters are + not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration used + to populate each generated resource. At most one of Data + or Clone must be specified. If neither are provided, the + generated resource will be created with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. If + Synchronize is set to "true" changes to generated resources + will be overwritten with resource data from Data or the + resource specified in the Clone declaration. Optional. + Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field within + 'path' that will be used to uniquely identify an image. + Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be available + under 'images.' in the context. If this field + is not defined, image entries will appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should be + slash-separated. Each slash-separated key must be + a valid YAML key or a wildcard '*'. Wildcard keys + are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This is + useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds to + ImageExtractorConfigs. This config is only valid for verifyImages + rules. + type: object + match: + description: MatchResources defines when this policy rule should + be applied. The match criteria can include resource information + (e.g. kind, name, namespace, labels) and admission review + request information like the user name or role. At least one + kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or "OR" + between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and "?" + (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated + in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key + and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the + wildcard characters `*` (matches zero or many + characters) and `?` (matches one character). + Wildcards allows writing label selectors like + ["storage.k8s.io/*": "*"]. Note that using ["*" + : "*"] matches any key and value but does not + match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to the + object or user identities a role binding applies + to. This can either hold a direct API object + reference, or a value for non-objects such as + user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of + the referenced subject. Defaults to "" for + ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as + "User" or "Group", and this value is not empty + the Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 + JSON Patch declarations used to modify resources. + See https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge patch + used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to be + mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must be + unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based conditional + rule execution. This is useful for finer control of when + an rule is applied. A condition can reference object data + using JMESPath notation. Here, all of the conditions need + to pass + items: + properties: + key: + description: Key is the context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional operation + to perform. Valid operators are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, or set + of values. The values can be fixed set or can be + variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based conditional + rule execution. This is useful for finer control of when + an rule is applied. A condition can reference object data + using JMESPath notation. Here, at least one of the conditions + need to pass + items: + properties: + key: + description: Key is the context entry (using JMESPath) + for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional operation + to perform. Valid operators are: Equals, NotEquals, + In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, or set + of values. The values can be fixed set or can be + variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation patterns. + At least one of the patterns must be satisfied for the + validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or fail + a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared under + an `any` or `all` statement. A direct list of conditions + (without `any` or `all` statements) is also supported + for backwards compatibility See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A condition + can reference object data using JMESPath notation. + Here, all of the conditions need to pass + items: + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators are: + Equals, NotEquals, In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A condition + can reference object data using JMESPath notation. + Here, at least one of the conditions need to pass + items: + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators are: + Equals, NotEquals, In, AnyIn, AllIn, NotIn, + AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - AnyIn + - AllIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: object + foreach: + description: ForEach applies validate rules to a list of + sub-elements by creating a context for each entry in the + list and looping over it to apply the specified logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data + sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON data + retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the JSON response returned from the API + server. For example a JMESPath of "items + | length(@)" applied to the API server + response to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to + be used in the HTTP GET request to the + Kubernetes API server (e.g. "/api/v1/namespaces" + or "/apis/apps/v1/deployments"). The + format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch image + details. + properties: + jmesPath: + description: JMESPath is an optional JSON + Match Expression that can be used to transform + the ImageData struct returned as a result + of processing the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take + if the JMESPath expression evaluates to + nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform + the variable. + type: string + value: + description: Value is any arbitrary JSON + object representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to use + the current list element as the scope for validation. + Defaults to "true" if not specified. When set to + "false", "request.object" is used as the validation + scope within the foreach block to allow referencing + other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which the + validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful for + finer control of when an rule is applied. A + condition can reference object data using JMESPath + notation. Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry (using + JMESPath) for conditional rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, AllIn, + NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals, + GreaterThan, LessThanOrEquals, LessThan, + DurationGreaterThanOrEquals, DurationGreaterThan, + DurationLessThanOrEquals, DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional value, + or set of values. The values can be fixed + set or can be variables declared using + JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of annotation + for message and signature. Default is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must match + (a logical OR). If the count contains a value + N, then N must be less than or equal to the + size of entries, and at least N entries must + match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes + for keyless verification, or a nested attestor + declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other + key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty object + is provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots + are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image signatures. + The keys can be directly specified + or can be a variable reference to + a key specified in a ConfigMap (see + https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) + within the set of attestors and the + count is applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If + specified Repository will override other + OCI image repository locations for this + Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while comparing + manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate OCI + repository to use for resource bundle reference. The + repository can be overridden per Attestor or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be displayed + on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for Pod + Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security Standard + controls to be excluded. + items: + description: PodSecurityStandard specifies the Pod + Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name of + the Pod Security Standard control. See: https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each image + is the image name consisting of the registry + address, repository, image, and tag. Empty list + matches no containers, PSS checks are applied + at the pod level only. Wildcards (''*'' and + ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values are + privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, + latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated to + include the SHA digest retrieved during the registration. + properties: + attestations: + description: Attestations are optional checks for signed + in-toto Statements used to verify the image. See https://github.com/in-toto/attestation. + Kyverno fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. See + https://github.com/in-toto/attestation. Kyverno fetches + signed attestations from the OCI registry and decodes + them into a list of Statements. + properties: + attestors: + description: Attestors specify the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long there + are predicates that match the predicate type. + items: + description: AnyAllConditions consists of conditions + wrapped denoting a logical criteria to be fulfilled. + AnyConditions get fulfilled when at least one + of its sub-conditions passes. AllConditions + get fulfilled only when all of its sub-conditions + pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type of Predicate + contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is null, + all entries must match (a logical AND). If the + count is 1, at least one entry must match (a logical + OR). If the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available attestors. + An attestor can be a static key, attributes for + keyless verification, or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for image + verification. Every specified key-value + pair must exist and match in the verified + payload. The payload may contain other key-value + pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of match + authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one or + more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an optional + PEM encoded set of certificates used + to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are + certificate-extensions used for keyless + signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked + and a root certificate chain is expected + instead. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional set + of PEM encoded trusted root certificates. + If not provided, the system roots are + used. + type: string + subject: + description: Subject is the verified identity + used for keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one or more public + keys + properties: + publicKeys: + description: Keys is a set of X.509 public + keys used to verify image signatures. + The keys can be directly specified or + can be a variable reference to a key + specified in a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified each + key is processed as a separate staticKey + entry (.attestors[*].entries.keys) within + the set of attestors and the count is + applied across the keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not checked. + If an empty object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address of + the transparency log. Defaults to + the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional alternate + OCI repository to use for signatures and + attestations that match this rule. If specified + Repository will override other OCI image + repository locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + imageReferences: + description: 'ImageReferences is a list of matching image + reference patterns. At least one pattern in the list + must match the image for the rule to apply. Each image + reference consists of a registry address (defaults to + docker.io), repository, image, and tag (defaults to + latest). Wildcards (''*'' and ''?'') are allowed. See: + https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI repository + to use for image signatures and attestations that match + this rule. If specified Repository will override the + default OCI image repository configured for the installation. + The repository can also be overridden per Attestor or + Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + verifyDigest: + default: true + description: VerifyDigest validates that images have a + digest. + type: boolean + type: object + type: array + type: object + type: array + schemaValidation: + description: SchemaValidation skips validation checks for policies + as well as patched resources. Optional. The default value is set + to "true", it must be set to "false" to disable the validation checks. + type: boolean + validationFailureAction: + default: audit + description: ValidationFailureAction defines if a validation policy + rule violation should block the admission review request (enforce), + or allow (audit) the admission review request and report an error + in a policy report. Optional. Allowed values are audit or enforce. + The default value is "audit". + enum: + - audit + - enforce + type: string + validationFailureActionOverrides: + description: ValidationFailureActionOverrides is a Cluster Policy + attribute that specifies ValidationFailureAction namespace-wise. + It overrides ValidationFailureAction for the specified namespaces. + items: + properties: + action: + description: ValidationFailureAction defines the policy validation + failure action + enum: + - audit + - enforce + type: string + namespaces: + items: + type: string + type: array + type: object + type: array + webhookTimeoutSeconds: + description: WebhookTimeoutSeconds specifies the maximum time in seconds + allowed to apply this policy. After the configured time expires, + the admission request may fail, or may simply ignore the policy + results, based on the failure policy. The default timeout is 10s, + the value must be between 1 and 30 seconds. + format: int32 + type: integer + type: object + status: + description: Status contains policy runtime data. + properties: + autogen: + description: Autogen contains autogen status information + properties: + rules: + description: Rules is a list of Rule instances. It contains auto + generated rules added for pod controllers + items: + description: Rule defines a validation, mutation, or generation + control for matching resources. Each rules contains a match + declaration to select resources, and an optional exclude declaration + to specify which resources to exclude. + properties: + context: + description: Context defines variables and data sources + that can be used during rule execution. + items: + description: ContextEntry adds variables and data sources + to a rule Context. Either a ConfigMap reference or a + APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request to the + Kubernetes API server. The JSON data retrieved is + stored in the context. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + JSON response returned from the API server. + For example a JMESPath of "items | length(@)" + applied to the API server response to the URLPath + "/apis/apps/v1/deployments" will return the + total count of deployments across all namespaces. + type: string + urlPath: + description: URLPath is the URL path to be used + in the HTTP GET request to the Kubernetes API + server (e.g. "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format used + by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests to an + OCI/Docker V2 registry to fetch image details. + properties: + jmesPath: + description: JMESPath is an optional JSON Match + Expression that can be used to transform the + ImageData struct returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference to + a container image in the registry. Example: + ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary JMESPath + context variable that can be defined inline. + properties: + default: + description: Default is an optional arbitrary + JSON object that the variable may take if the + JMESPath expression evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional JMESPath + Expression that can be used to transform the + variable. + type: string + value: + description: Value is any arbitrary JSON object + representable in YAML or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + exclude: + description: ExcludeResources defines when this policy rule + should not be applied. The exclude criteria can include + resource information (e.g. kind, name, namespace, labels) + and admission review request information like the name + or role. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + generate: + description: Generation is used to create new resources. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + clone: + description: Clone specifies the source resource used + to populate each generated resource. At most one of + Data or Clone can be specified. If neither are provided, + the generated resource will be created with default + data only. + properties: + name: + description: Name specifies name of the resource. + type: string + namespace: + description: Namespace specifies source resource + namespace. + type: string + type: object + cloneList: + description: CloneList specifies the list of source + resource used to populate each generated resource. + properties: + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + namespace: + description: Namespace specifies source resource + namespace. + type: string + selector: + description: Selector is a label selector. Label + keys and values in `matchLabels`. wildcard characters + are not supported. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + data: + description: Data provides the resource declaration + used to populate each generated resource. At most + one of Data or Clone must be specified. If neither + are provided, the generated resource will be created + with default data only. + x-kubernetes-preserve-unknown-fields: true + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + synchronize: + description: Synchronize controls if generated resources + should be kept in-sync with their source resource. + If Synchronize is set to "true" changes to generated + resources will be overwritten with resource data from + Data or the resource specified in the Clone declaration. + Optional. Defaults to "false" if not specified. + type: boolean + type: object + imageExtractors: + additionalProperties: + items: + properties: + key: + description: Key is an optional name of the field + within 'path' that will be used to uniquely identify + an image. Note - this field MUST be unique. + type: string + name: + description: Name is the entry the image will be + available under 'images.' in the context. + If this field is not defined, image entries will + appear under 'images.custom'. + type: string + path: + description: Path is the path to the object containing + the image field in a custom resource. It should + be slash-separated. Each slash-separated key must + be a valid YAML key or a wildcard '*'. Wildcard + keys are expanded in case of arrays or objects. + type: string + value: + description: Value is an optional name of the field + within 'path' that points to the image URI. This + is useful when a custom 'key' is also defined. + type: string + required: + - path + type: object + type: array + description: ImageExtractors defines a mapping from kinds + to ImageExtractorConfigs. This config is only valid for + verifyImages rules. + type: object + match: + description: MatchResources defines when this policy rule + should be applied. The match criteria can include resource + information (e.g. kind, name, namespace, labels) and admission + review request information like the user name or role. + At least one kind is required. + properties: + all: + description: All allows specifying resources which will + be ANDed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + any: + description: Any allows specifying resources which will + be ORed + items: + description: ResourceFilter allow users to "AND" or + "OR" between resources + properties: + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation + keys and values support the wildcard characters + "*" (matches zero or many characters) and + "?" (matches at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). NOTE: "Name" is + being deprecated in favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" + (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label + selector for the resource namespace. Label + keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character).Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and + "?" (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. + Label keys and values in `matchLabels` support + the wildcard characters `*` (matches zero + or many characters) and `?` (matches one + character). Wildcards allows writing label + selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any + key and value but does not match an empty + label set.' + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role + names for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names + like users, user groups, and service accounts. + items: + description: Subject contains a reference to + the object or user identities a role binding + applies to. This can either hold a direct + API object reference, or a value for non-objects + such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group + of the referenced subject. Defaults to + "" for ServiceAccount subjects. Defaults + to "rbac.authorization.k8s.io" for User + and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the + Authorizer does not recognized the kind + value, the Authorizer should report an + error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced + object. If the object kind is non-namespace, + such as "User" or "Group", and this value + is not empty the Authorizer should report + an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + type: array + clusterRoles: + description: ClusterRoles is the list of cluster-wide + role names for the user. + items: + type: string + type: array + resources: + description: ResourceDescription contains information + about the resource being created or modified. Requires + at least one tag to be specified when under MatchResources. + Specifying ResourceDescription directly under match + is being deprecated. Please specify under "any" or + "all" instead. + properties: + annotations: + additionalProperties: + type: string + description: Annotations is a map of annotations + (key-value pairs of type string). Annotation keys + and values support the wildcard characters "*" + (matches zero or many characters) and "?" (matches + at least one character). + type: object + kinds: + description: Kinds is a list of resource kinds. + items: + type: string + type: array + name: + description: 'Name is the name of the resource. + The name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). NOTE: "Name" is being deprecated in + favor of "Names".' + type: string + names: + description: Names are the names of the resources. + Each name supports wildcard characters "*" (matches + zero or many characters) and "?" (at least one + character). + items: + type: string + type: array + namespaceSelector: + description: 'NamespaceSelector is a label selector + for the resource namespace. Label keys and values + in `matchLabels` support the wildcard characters + `*` (matches zero or many characters) and `?` + (matches one character).Wildcards allows writing + label selectors like ["storage.k8s.io/*": "*"]. + Note that using ["*" : "*"] matches any key and + value but does not match an empty label set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: Namespaces is a list of namespaces + names. Each name supports wildcard characters + "*" (matches zero or many characters) and "?" + (at least one character). + items: + type: string + type: array + selector: + description: 'Selector is a label selector. Label + keys and values in `matchLabels` support the wildcard + characters `*` (matches zero or many characters) + and `?` (matches one character). Wildcards allows + writing label selectors like ["storage.k8s.io/*": + "*"]. Note that using ["*" : "*"] matches any + key and value but does not match an empty label + set.' + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + roles: + description: Roles is the list of namespaced role names + for the user. + items: + type: string + type: array + subjects: + description: Subjects is the list of subject names like + users, user groups, and service accounts. + items: + description: Subject contains a reference to the object + or user identities a role binding applies to. This + can either hold a direct API object reference, or + a value for non-objects such as user and group names. + properties: + apiGroup: + description: APIGroup holds the API group of the + referenced subject. Defaults to "" for ServiceAccount + subjects. Defaults to "rbac.authorization.k8s.io" + for User and Group subjects. + type: string + kind: + description: Kind of object being referenced. + Values defined by this API group are "User", + "Group", and "ServiceAccount". If the Authorizer + does not recognized the kind value, the Authorizer + should report an error. + type: string + name: + description: Name of the object being referenced. + type: string + namespace: + description: Namespace of the referenced object. If + the object kind is non-namespace, such as "User" + or "Group", and this value is not empty the + Authorizer should report an error. + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: array + type: object + mutate: + description: Mutation is used to modify matching resources. + properties: + foreach: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies mutation rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + patchStrategicMerge: + description: PatchStrategicMerge is a strategic + merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC + 6902 JSON Patch declarations used to modify + resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + patchStrategicMerge: + description: PatchStrategicMerge is a strategic merge + patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. + x-kubernetes-preserve-unknown-fields: true + patchesJson6902: + description: PatchesJSON6902 is a list of RFC 6902 JSON + Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 + and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/. + type: string + targets: + description: Targets defines the target resources to + be mutated. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + type: object + name: + description: Name is a label to identify the rule, It must + be unique within the policy. + maxLength: 63 + type: string + preconditions: + description: 'Preconditions are used to determine if a policy + rule should be applied by evaluating a set of conditions. + The declaration can contain nested `any` or `all` statements. + A direct list of conditions (without `any` or `all` statements + is supported for backwards compatibility but will be deprecated + in the next major release. See: https://kyverno.io/docs/writing-policies/preconditions/' + x-kubernetes-preserve-unknown-fields: true + validate: + description: Validation is used to validate matching resources. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must be satisfied + for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + deny: + description: Deny defines conditions used to pass or + fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct list + of conditions (without `any` or `all` statements) + is also supported for backwards compatibility + but will be deprecated in the next major release. + See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + foreach: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + items: + description: ForEach applies validate rules to a list + of sub-elements by creating a context for each entry + in the list and looping over it to apply the specified + logic. + properties: + anyPattern: + description: AnyPattern specifies list of validation + patterns. At least one of the patterns must + be satisfied for the validation rule to succeed. + x-kubernetes-preserve-unknown-fields: true + context: + description: Context defines variables and data + sources that can be used during rule execution. + items: + description: ContextEntry adds variables and + data sources to a rule Context. Either a ConfigMap + reference or a APILookup must be provided. + properties: + apiCall: + description: APICall defines an HTTP request + to the Kubernetes API server. The JSON + data retrieved is stored in the context. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the JSON response + returned from the API server. For + example a JMESPath of "items | length(@)" + applied to the API server response + to the URLPath "/apis/apps/v1/deployments" + will return the total count of deployments + across all namespaces. + type: string + urlPath: + description: URLPath is the URL path + to be used in the HTTP GET request + to the Kubernetes API server (e.g. + "/api/v1/namespaces" or "/apis/apps/v1/deployments"). + The format required is the same format + used by the `kubectl get --raw` command. + type: string + required: + - urlPath + type: object + configMap: + description: ConfigMap is the ConfigMap + reference. + properties: + name: + description: Name is the ConfigMap name. + type: string + namespace: + description: Namespace is the ConfigMap + namespace. + type: string + required: + - name + type: object + imageRegistry: + description: ImageRegistry defines requests + to an OCI/Docker V2 registry to fetch + image details. + properties: + jmesPath: + description: JMESPath is an optional + JSON Match Expression that can be + used to transform the ImageData struct + returned as a result of processing + the image reference. + type: string + reference: + description: 'Reference is image reference + to a container image in the registry. + Example: ghcr.io/kyverno/kyverno:latest' + type: string + required: + - reference + type: object + name: + description: Name is the variable name. + type: string + variable: + description: Variable defines an arbitrary + JMESPath context variable that can be + defined inline. + properties: + default: + description: Default is an optional + arbitrary JSON object that the variable + may take if the JMESPath expression + evaluates to nil + x-kubernetes-preserve-unknown-fields: true + jmesPath: + description: JMESPath is an optional + JMESPath Expression that can be used + to transform the variable. + type: string + value: + description: Value is any arbitrary + JSON object representable in YAML + or JSON form. + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + type: array + deny: + description: Deny defines conditions used to pass + or fail a validation rule. + properties: + conditions: + description: 'Multiple conditions can be declared + under an `any` or `all` statement. A direct + list of conditions (without `any` or `all` + statements) is also supported for backwards + compatibility but will be deprecated in + the next major release. See: https://kyverno.io/docs/writing-policies/validate/#deny-rules' + x-kubernetes-preserve-unknown-fields: true + type: object + elementScope: + description: ElementScope specifies whether to + use the current list element as the scope for + validation. Defaults to "true" if not specified. + When set to "false", "request.object" is used + as the validation scope within the foreach block + to allow referencing other elements in the subtree. + type: boolean + list: + description: List specifies a JMESPath expression + that results in one or more elements to which + the validation logic is applied. + type: string + pattern: + description: Pattern specifies an overlay-style + pattern used to check resources. + x-kubernetes-preserve-unknown-fields: true + preconditions: + description: 'AnyAllConditions are used to determine + if a policy rule should be applied by evaluating + a set of conditions. The declaration can contain + nested `any` or `all` statements. See: https://kyverno.io/docs/writing-policies/preconditions/' + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, all of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is useful + for finer control of when an rule is applied. + A condition can reference object data using + JMESPath notation. Here, at least one of + the conditions need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context entry + (using JMESPath) for conditional rule + evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + manifests: + description: Manifest specifies conditions for manifest + verification + properties: + annotationDomain: + description: AnnotationDomain is custom domain of + annotation for message and signature. Default + is "cosign.sigstore.dev". + type: string + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If the + count is null, all entries must match (a + logical AND). If the count is 1, at least + one entry must match (a logical OR). If + the count contains a value N, then N must + be less than or equal to the size of entries, + and at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or + a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set + of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is + an optional PEM encoded set of + certificates used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless + attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked and a root + certificate chain is expected + instead. If an empty object is + provided the public instance of + Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, + the system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable + reference to a key specified in + a ConfigMap (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log + service. If the value is nil, + Rekor is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository + will override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + dryRun: + description: DryRun configuration + properties: + enable: + type: boolean + namespace: + type: string + type: object + ignoreFields: + description: Fields which will be ignored while + comparing manifests. + items: + properties: + fields: + items: + type: string + type: array + objects: + items: + properties: + group: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + version: + type: string + type: object + type: array + type: object + type: array + repository: + description: Repository is an optional alternate + OCI repository to use for resource bundle reference. + The repository can be overridden per Attestor + or Attestation. + type: string + type: object + message: + description: Message specifies a custom message to be + displayed on failure. + type: string + pattern: + description: Pattern specifies an overlay-style pattern + used to check resources. + x-kubernetes-preserve-unknown-fields: true + podSecurity: + description: PodSecurity applies exemptions for Kubernetes + Pod Security admission by specifying exclusions for + Pod Security Standards controls. + properties: + exclude: + description: Exclude specifies the Pod Security + Standard controls to be excluded. + items: + description: PodSecurityStandard specifies the + Pod Security Standard controls to be excluded. + properties: + controlName: + description: 'ControlName specifies the name + of the Pod Security Standard control. See: + https://kubernetes.io/docs/concepts/security/pod-security-standards/' + enum: + - HostProcess + - Host Namespaces + - Privileged Containers + - Capabilities + - HostPath Volumes + - Host Ports + - AppArmor + - SELinux + - /proc Mount Type + - Seccomp + - Sysctls + - Volume Types + - Privilege Escalation + - Running as Non-root + - Running as Non-root user + type: string + images: + description: 'Images selects matching containers + and applies the container level PSS. Each + image is the image name consisting of the + registry address, repository, image, and + tag. Empty list matches no containers, PSS + checks are applied at the pod level only. + Wildcards (''*'' and ''?'') are allowed. + See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + required: + - controlName + type: object + type: array + level: + description: Level defines the Pod Security Standard + level to be applied to workloads. Allowed values + are privileged, baseline, and restricted. + enum: + - privileged + - baseline + - restricted + type: string + version: + description: Version defines the Pod Security Standard + versions that Kubernetes supports. Allowed values + are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, + v1.25, latest. Defaults to latest. + enum: + - v1.19 + - v1.20 + - v1.21 + - v1.22 + - v1.23 + - v1.24 + - v1.25 + - latest + type: string + type: object + type: object + verifyImages: + description: VerifyImages is used to verify image signatures + and mutate them to add a digest + items: + description: ImageVerification validates that images that + match the specified pattern are signed with the supplied + public key. Once the image is verified it is mutated + to include the SHA digest retrieved during the registration. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions are certificate-extensions + used for keyless signing. Deprecated. + type: object + annotations: + additionalProperties: + type: string + description: Annotations are used for image verification. + Every specified key-value pair must exist and match + in the verified payload. The payload may contain + other key-value pairs. Deprecated. Use annotations + per Attestor instead. + type: object + attestations: + description: Attestations are optional checks for + signed in-toto Statements used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statement declarations. + items: + description: Attestation are checks for signed in-toto + Statements that are used to verify the image. + See https://github.com/in-toto/attestation. Kyverno + fetches signed attestations from the OCI registry + and decodes them into a list of Statements. + properties: + attestors: + description: Attestors specify the required + attestors (i.e. authorities) + items: + properties: + count: + description: Count specifies the required + number of entries that must match. If + the count is null, all entries must + match (a logical AND). If the count + is 1, at least one entry must match + (a logical OR). If the count contains + a value N, then N must be less than + or equal to the size of entries, and + at least N entries must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static + key, attributes for keyless verification, + or a nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used + for image verification. Every + specified key-value pair must + exist and match in the verified + payload. The payload may contain + other key-value pairs. + type: object + attestor: + description: Attestor is a nested + AttestorSet used to specify a + more complex set of match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies + one or more certificates + properties: + cert: + description: Certificate is + an optional PEM encoded public + certificate. + type: string + certChain: + description: CertificateChain + is an optional PEM encoded + set of certificates used to + verify + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of + attribute used to verify a Sigstore + keyless attestor. See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions + used for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked and a root + certificate chain is expected + instead. If an empty object + is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted + root certificates. If not + provided, the system roots + are used. + type: string + subject: + description: Subject is the + verified identity used for + keyless signing, for example + the email address + type: string + type: object + keys: + description: Keys specifies one + or more public keys + properties: + publicKeys: + description: Keys is a set of + X.509 public keys used to + verify image signatures. The + keys can be directly specified + or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a + separate staticKey entry (.attestors[*].entries.keys) + within the set of attestors + and the count is applied across + the keys. + type: string + rekor: + description: Rekor provides + configuration for the Rekor + transparency log service. + If the value is nil, Rekor + is not checked. If an empty + object is provided the public + instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the + address of the transparency + log. Defaults to the public + log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use + for signatures and attestations + that match this rule. If specified + Repository will override other + OCI image repository locations + for this Attestor. + type: string + type: object + type: array + type: object + type: array + conditions: + description: Conditions are used to verify attributes + within a Predicate. If no Conditions are specified + the attestation check is satisfied as long + there are predicates that match the predicate + type. + items: + description: AnyAllConditions consists of + conditions wrapped denoting a logical criteria + to be fulfilled. AnyConditions get fulfilled + when at least one of its sub-conditions + passes. AllConditions get fulfilled only + when all of its sub-conditions pass. + properties: + all: + description: AllConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, all of the conditions need to + pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + any: + description: AnyConditions enable variable-based + conditional rule execution. This is + useful for finer control of when an + rule is applied. A condition can reference + object data using JMESPath notation. + Here, at least one of the conditions + need to pass + items: + description: Condition defines variable-based + conditional criteria for rule execution. + properties: + key: + description: Key is the context + entry (using JMESPath) for conditional + rule evaluation. + x-kubernetes-preserve-unknown-fields: true + operator: + description: 'Operator is the conditional + operation to perform. Valid operators + are: Equals, NotEquals, In, AnyIn, + AllIn, NotIn, AnyNotIn, AllNotIn, + GreaterThanOrEquals, GreaterThan, + LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, + DurationGreaterThan, DurationLessThanOrEquals, + DurationLessThan' + enum: + - Equals + - NotEquals + - In + - AnyIn + - AllIn + - NotIn + - AnyNotIn + - AllNotIn + - GreaterThanOrEquals + - GreaterThan + - LessThanOrEquals + - LessThan + - DurationGreaterThanOrEquals + - DurationGreaterThan + - DurationLessThanOrEquals + - DurationLessThan + type: string + value: + description: Value is the conditional + value, or set of values. The values + can be fixed set or can be variables + declared using JMESPath. + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + type: object + type: array + predicateType: + description: PredicateType defines the type + of Predicate contained within the Statement. + type: string + required: + - predicateType + type: object + type: array + attestors: + description: Attestors specified the required attestors + (i.e. authorities) + items: + properties: + count: + description: Count specifies the required number + of entries that must match. If the count is + null, all entries must match (a logical AND). + If the count is 1, at least one entry must + match (a logical OR). If the count contains + a value N, then N must be less than or equal + to the size of entries, and at least N entries + must match. + minimum: 1 + type: integer + entries: + description: Entries contains the available + attestors. An attestor can be a static key, + attributes for keyless verification, or a + nested attestor declaration. + items: + properties: + annotations: + additionalProperties: + type: string + description: Annotations are used for + image verification. Every specified + key-value pair must exist and match + in the verified payload. The payload + may contain other key-value pairs. + type: object + attestor: + description: Attestor is a nested AttestorSet + used to specify a more complex set of + match authorities + x-kubernetes-preserve-unknown-fields: true + certificates: + description: Certificates specifies one + or more certificates + properties: + cert: + description: Certificate is an optional + PEM encoded public certificate. + type: string + certChain: + description: CertificateChain is an + optional PEM encoded set of certificates + used to verify + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + keyless: + description: Keyless is a set of attribute + used to verify a Sigstore keyless attestor. + See https://github.com/sigstore/cosign/blob/main/KEYLESS.md. + properties: + additionalExtensions: + additionalProperties: + type: string + description: AdditionalExtensions + are certificate-extensions used + for keyless signing. + type: object + issuer: + description: Issuer is the certificate + issuer used for keyless signing. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked and a root certificate chain + is expected instead. If an empty + object is provided the public instance + of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + roots: + description: Roots is an optional + set of PEM encoded trusted root + certificates. If not provided, the + system roots are used. + type: string + subject: + description: Subject is the verified + identity used for keyless signing, + for example the email address + type: string + type: object + keys: + description: Keys specifies one or more + public keys + properties: + publicKeys: + description: Keys is a set of X.509 + public keys used to verify image + signatures. The keys can be directly + specified or can be a variable reference + to a key specified in a ConfigMap + (see https://kyverno.io/docs/writing-policies/variables/). + When multiple keys are specified + each key is processed as a separate + staticKey entry (.attestors[*].entries.keys) + within the set of attestors and + the count is applied across the + keys. + type: string + rekor: + description: Rekor provides configuration + for the Rekor transparency log service. + If the value is nil, Rekor is not + checked. If an empty object is provided + the public instance of Rekor (https://rekor.sigstore.dev) + is used. + properties: + url: + description: URL is the address + of the transparency log. Defaults + to the public log https://rekor.sigstore.dev. + type: string + required: + - url + type: object + type: object + repository: + description: Repository is an optional + alternate OCI repository to use for + signatures and attestations that match + this rule. If specified Repository will + override other OCI image repository + locations for this Attestor. + type: string + type: object + type: array + type: object + type: array + image: + description: 'Image is the image name consisting of + the registry address, repository, image, and tag. + Wildcards (''*'' and ''?'') are allowed. See: https://kubernetes.io/docs/concepts/containers/images. + Deprecated. Use ImageReferences instead.' + type: string + imageReferences: + description: 'ImageReferences is a list of matching + image reference patterns. At least one pattern in + the list must match the image for the rule to apply. + Each image reference consists of a registry address + (defaults to docker.io), repository, image, and + tag (defaults to latest). Wildcards (''*'' and ''?'') + are allowed. See: https://kubernetes.io/docs/concepts/containers/images.' + items: + type: string + type: array + issuer: + description: Issuer is the certificate issuer used + for keyless signing. Deprecated. Use KeylessAttestor + instead. + type: string + key: + description: Key is the PEM encoded public key that + the image or attestation is signed with. Deprecated. + Use StaticKeyAttestor instead. + type: string + mutateDigest: + default: true + description: MutateDigest enables replacement of image + tags with digests. Defaults to true. + type: boolean + repository: + description: Repository is an optional alternate OCI + repository to use for image signatures and attestations + that match this rule. If specified Repository will + override the default OCI image repository configured + for the installation. The repository can also be + overridden per Attestor or Attestation. + type: string + required: + default: true + description: Required validates that images are verified + i.e. have matched passed a signature or attestation + check. + type: boolean + roots: + description: Roots is the PEM encoded Root certificate + chain used for keyless signing Deprecated. Use KeylessAttestor + instead. + type: string + subject: + description: Subject is the identity used for keyless + signing, for example an email address Deprecated. + Use KeylessAttestor instead. + type: string + verifyDigest: + default: true + description: VerifyDigest validates that images have + a digest. + type: boolean + type: object + type: array + type: object + type: array + type: object + conditions: + description: Conditions is a list of conditions that apply to the + policy + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + ready: + description: Ready indicates if the policy is ready to serve the admission + request. Deprecated in favor of Conditions + type: boolean + required: + - ready + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policyreports.wgpolicyk8s.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policyreports.wgpolicyk8s.io.yaml new file mode 100755 index 0000000..6fcc797 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.policyreports.wgpolicyk8s.io.yaml @@ -0,0 +1,369 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "9" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "9" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: policyreports.wgpolicyk8s.io +spec: + group: wgpolicyk8s.io + names: + kind: PolicyReport + listKind: PolicyReportList + plural: policyreports + shortNames: + - polr + singular: policyreport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .scope.kind + name: Kind + priority: 1 + type: string + - jsonPath: .scope.name + name: Name + priority: 1 + type: string + - jsonPath: .summary.pass + name: Pass + type: integer + - jsonPath: .summary.fail + name: Fail + type: integer + - jsonPath: .summary.warn + name: Warn + type: integer + - jsonPath: .summary.error + name: Error + type: integer + - jsonPath: .summary.skip + name: Skip + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + openAPIV3Schema: + description: PolicyReport is the Schema for the policyreports API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + results: + description: PolicyReportResult provides result details + items: + description: PolicyReportResult provides the result for an individual + policy + properties: + category: + description: Category indicates policy category + type: string + message: + description: Description is a short user friendly message for the + policy rule + type: string + policy: + description: Policy is the name or identifier of the policy + type: string + properties: + additionalProperties: + type: string + description: Properties provides additional information for the + policy rule + type: object + resourceSelector: + description: SubjectSelector is an optional label selector for checked + Kubernetes resources. For example, a policy result may apply to + all pods that match a label. Either a Subject or a SubjectSelector + can be specified. If neither are provided, the result is assumed + to be for the policy report scope. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that + contains values, a key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of string values. If the + operator is In or NotIn, the values array must be non-empty. + If the operator is Exists or DoesNotExist, the values + array must be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single + {key,value} in the matchLabels map is equivalent to an element + of matchExpressions, whose key field is "key", the operator + is "In", and the values array contains only "value". The requirements + are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + resources: + description: Subjects is an optional reference to the checked Kubernetes + resources + items: + description: "ObjectReference contains enough information to let + you inspect or modify the referred object. --- New uses of this + type are discouraged because of difficulty describing its usage + when embedded in APIs. 1. Ignored fields. It includes many + fields which are not generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in actual usage. 2. + Invalid usage help. It is impossible to add specific help for + individual usage. In most embedded usages, there are particular + restrictions like, \"must refer only to types A and B\" or \"UID + not honored\" or \"name must be restricted\". Those cannot be + well described when embedded. 3. Inconsistent validation. Because + the usages are different, the validation rules are different + by usage, which makes it hard for users to predict what will + happen. 4. The fields are both imprecise and overly precise. + \ Kind is not a precise mapping to a URL. This can produce ambiguity + during interpretation and require a REST mapping. In most cases, + the dependency is on the group,resource tuple and the version + of the actual struct is irrelevant. 5. We cannot easily change + it. Because this type is embedded in many locations, updates + to this type will affect numerous schemas. Don't make new APIs + embed an underspecified API type they do not control. \n Instead + of using this type, create a locally provided and used type + that is well-focused on your reference. For example, ServiceReferences + for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part + of an object. TODO: this design is not final and this field + is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + result: + description: Result indicates the outcome of the policy rule execution + enum: + - pass + - fail + - warn + - error + - skip + type: string + rule: + description: Rule is the name or identifier of the rule within the + policy + type: string + scored: + description: Scored indicates if this result is scored + type: boolean + severity: + description: Severity indicates policy check result criticality + enum: + - critical + - high + - low + - medium + - info + type: string + source: + description: Source is an identifier for the policy engine that + manages this report + type: string + timestamp: + description: Timestamp indicates the time the result was found + properties: + nanos: + description: Non-negative fractions of a second at nanosecond + resolution. Negative second values with fractions must still + have non-negative nanos values that count forward in time. + Must be from 0 to 999,999,999 inclusive. This field may be + limited in precision depending on context. + format: int32 + type: integer + seconds: + description: Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + 9999-12-31T23:59:59Z inclusive. + format: int64 + type: integer + required: + - nanos + - seconds + type: object + required: + - policy + type: object + type: array + scope: + description: Scope is an optional reference to the report scope (e.g. + a Deployment, Namespace, or Node) + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire + object, this string should contain a valid JSON/Go field access + statement, such as desiredState.manifest.containers[2]. For example, + if the object reference is to a container within a pod, this would + take on a value like: "spec.containers{name}" (where "name" refers + to the name of the container that triggered the event) or if no + container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined + way of referencing a part of an object. TODO: this design is not + final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is + made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + scopeSelector: + description: ScopeSelector is an optional selector for multiple scopes + (e.g. Pods). Either one of, or none of, but not both of, Scope or ScopeSelector + should be specified. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains + values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies + to. + type: string + operator: + description: operator represents a key's relationship to a set + of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator + is In or NotIn, the values array must be non-empty. If the + operator is Exists or DoesNotExist, the values array must + be empty. This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + summary: + description: PolicyReportSummary provides a summary of results + properties: + error: + description: Error provides the count of policies that could not be + evaluated + type: integer + fail: + description: Fail provides the count of policies whose requirements + were not met + type: integer + pass: + description: Pass provides the count of policies whose requirements + were met + type: integer + skip: + description: Skip indicates the count of policies that were not selected + for evaluation + type: integer + warn: + description: Warn provides the count of non-scored policies whose + requirements were not met + type: integer + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.updaterequests.kyverno.io.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.updaterequests.kyverno.io.yaml new file mode 100755 index 0000000..b7e9f7d --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/CustomResourceDefinition.updaterequests.kyverno.io.yaml @@ -0,0 +1,394 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + config.kubernetes.io/index: "10" + controller-gen.kubebuilder.io/version: v0.10.0 + internal.config.kubernetes.io/index: "10" + creationTimestamp: null + labels: + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: v1.8.5 + name: updaterequests.kyverno.io +spec: + group: kyverno.io + names: + categories: + - kyverno + kind: UpdateRequest + listKind: UpdateRequestList + plural: updaterequests + shortNames: + - ur + singular: updaterequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.policy + name: Policy + type: string + - jsonPath: .spec.requestType + name: RuleType + type: string + - jsonPath: .spec.resource.kind + name: ResourceKind + type: string + - jsonPath: .spec.resource.name + name: ResourceName + type: string + - jsonPath: .spec.resource.namespace + name: ResourceNamespace + type: string + - jsonPath: .status.state + name: status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: UpdateRequest is a request to process mutate and generate rules + in background. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec is the information to identify the update request. + properties: + context: + description: Context ... + properties: + admissionRequestInfo: + description: AdmissionRequestInfoObject stores the admission request + and operation details + properties: + admissionRequest: + description: AdmissionRequest describes the admission.Attributes + for the admission request. + properties: + dryRun: + description: DryRun indicates that modifications will + definitely not be persisted for this request. Defaults + to false. + type: boolean + kind: + description: Kind is the fully-qualified type of object + being submitted (for example, v1.Pod or autoscaling.v1.Scale) + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + name: + description: Name is the name of the object as presented + in the request. On a CREATE operation, the client may + omit name and rely on the server to generate the name. If + that is the case, this field will contain an empty string. + type: string + namespace: + description: Namespace is the namespace associated with + the request (if any). + type: string + object: + description: Object is the object from the incoming request. + type: object + x-kubernetes-preserve-unknown-fields: true + oldObject: + description: OldObject is the existing object. Only populated + for DELETE and UPDATE requests. + type: object + x-kubernetes-preserve-unknown-fields: true + operation: + description: Operation is the operation being performed. + This may be different than the operation requested. + e.g. a patch can result in either a CREATE or UPDATE + Operation. + type: string + options: + description: Options is the operation option structure + of the operation being performed. e.g. `meta.k8s.io/v1.DeleteOptions` + or `meta.k8s.io/v1.CreateOptions`. This may be different + than the options the caller provided. e.g. for a patch + request the performed Operation might be a CREATE, in + which case the Options will a `meta.k8s.io/v1.CreateOptions` + even though the caller provided `meta.k8s.io/v1.PatchOptions`. + type: object + x-kubernetes-preserve-unknown-fields: true + requestKind: + description: "RequestKind is the fully-qualified type + of the original API request (for example, v1.Pod or + autoscaling.v1.Scale). If this is specified and differs + from the value in \"kind\", an equivalent match and + conversion was performed. \n For example, if deployments + can be modified via apps/v1 and apps/v1beta1, and a + webhook registered a rule of `apiGroups:[\"apps\"], + apiVersions:[\"v1\"], resources: [\"deployments\"]` + and `matchPolicy: Equivalent`, an API request to apps/v1beta1 + deployments would be converted and sent to the webhook + with `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` + (matching the rule the webhook registered for), and + `requestKind: {group:\"apps\", version:\"v1beta1\", + kind:\"Deployment\"}` (indicating the kind of the original + API request). \n See documentation for the \"matchPolicy\" + field in the webhook configuration type for more details." + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + requestResource: + description: "RequestResource is the fully-qualified resource + of the original API request (for example, v1.pods). + If this is specified and differs from the value in \"resource\", + an equivalent match and conversion was performed. \n + For example, if deployments can be modified via apps/v1 + and apps/v1beta1, and a webhook registered a rule of + `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: + [\"deployments\"]` and `matchPolicy: Equivalent`, an + API request to apps/v1beta1 deployments would be converted + and sent to the webhook with `resource: {group:\"apps\", + version:\"v1\", resource:\"deployments\"}` (matching + the resource the webhook registered for), and `requestResource: + {group:\"apps\", version:\"v1beta1\", resource:\"deployments\"}` + (indicating the resource of the original API request). + \n See documentation for the \"matchPolicy\" field in + the webhook configuration type." + properties: + group: + type: string + resource: + type: string + version: + type: string + required: + - group + - resource + - version + type: object + requestSubResource: + description: RequestSubResource is the name of the subresource + of the original API request, if any (for example, "status" + or "scale") If this is specified and differs from the + value in "subResource", an equivalent match and conversion + was performed. See documentation for the "matchPolicy" + field in the webhook configuration type. + type: string + resource: + description: Resource is the fully-qualified resource + being requested (for example, v1.pods) + properties: + group: + type: string + resource: + type: string + version: + type: string + required: + - group + - resource + - version + type: object + subResource: + description: SubResource is the subresource being requested, + if any (for example, "status" or "scale") + type: string + uid: + description: UID is an identifier for the individual request/response. + It allows us to distinguish instances of requests which + are otherwise identical (parallel requests, requests + when earlier requests did not modify etc) The UID is + meant to track the round trip (request/response) between + the KAS and the WebHook, not the user request. It is + suitable for correlating log entries between the webhook + and apiserver, for either auditing or debugging. + type: string + userInfo: + description: UserInfo is information about the requesting + user + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf + can generate + items: + type: string + type: array + description: Any additional information provided by + the authenticator. + type: object + groups: + description: The names of groups this user is a part + of. + items: + type: string + type: array + uid: + description: A unique value that identifies this user + across time. If this user is deleted and another + user by the same name is added, they will have different + UIDs. + type: string + username: + description: The name that uniquely identifies this + user among all active users. + type: string + type: object + required: + - kind + - operation + - resource + - uid + - userInfo + type: object + operation: + description: Operation is the type of resource operation being + checked for admission control + type: string + type: object + userInfo: + description: RequestInfo contains permission info carried in an + admission request. + properties: + clusterRoles: + description: ClusterRoles is a list of possible clusterRoles + send the request. + items: + type: string + nullable: true + type: array + roles: + description: Roles is a list of possible role send the request. + items: + type: string + nullable: true + type: array + userInfo: + description: UserInfo is the userInfo carried in the admission + request. + properties: + extra: + additionalProperties: + description: ExtraValue masks the value so protobuf + can generate + items: + type: string + type: array + description: Any additional information provided by the + authenticator. + type: object + groups: + description: The names of groups this user is a part of. + items: + type: string + type: array + uid: + description: A unique value that identifies this user + across time. If this user is deleted and another user + by the same name is added, they will have different + UIDs. + type: string + username: + description: The name that uniquely identifies this user + among all active users. + type: string + type: object + type: object + type: object + policy: + description: Specifies the name of the policy. + type: string + requestType: + description: Type represents request type for background processing + enum: + - mutate + - generate + type: string + resource: + description: ResourceSpec is the information to identify the update + request. + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + required: + - context + - policy + - resource + type: object + status: + description: Status contains statistics related to update request. + properties: + generatedResources: + description: This will track the resources that are updated by the + generate Policy. Will be used during clean up resources. + items: + properties: + apiVersion: + description: APIVersion specifies resource apiVersion. + type: string + kind: + description: Kind specifies resource kind. + type: string + name: + description: Name specifies the resource name. + type: string + namespace: + description: Namespace specifies resource namespace. + type: string + type: object + type: array + handler: + description: Handler represents the instance ID that handles the UR + type: string + message: + description: Specifies request status message. + type: string + state: + description: State represents state of the update request. + type: string + required: + - state + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Deployment.kyverno.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Deployment.kyverno.yaml new file mode 100755 index 0000000..97bb7e0 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Deployment.kyverno.yaml @@ -0,0 +1,172 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + namespace: kyverno +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 40% + type: RollingUpdate + template: + metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - kyverno + topologyKey: kubernetes.io/hostname + weight: 1 + containers: + - args: + - --autogenInternals=true + - --loggingFormat=text + env: + - name: INIT_CONFIG + value: kyverno + - name: METRICS_CONFIG + value: kyverno-metrics + - name: KYVERNO_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: KYVERNO_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: KYVERNO_SERVICEACCOUNT_NAME + value: kyverno + - name: KYVERNO_SVC + value: kyverno-svc + - name: TUF_ROOT + value: /.sigstore + - name: KYVERNO_DEPLOYMENT + value: kyverno + image: ghcr.io/kyverno/kyverno:v1.8.5 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 2 + httpGet: + path: /health/liveness + port: 9443 + scheme: HTTPS + initialDelaySeconds: 15 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 + name: kyverno + ports: + - containerPort: 9443 + name: https + protocol: TCP + - containerPort: 8000 + name: metrics-port + protocol: TCP + readinessProbe: + failureThreshold: 6 + httpGet: + path: /health/readiness + port: 9443 + scheme: HTTPS + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + limits: + memory: 384Mi + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + startupProbe: + failureThreshold: 20 + httpGet: + path: /health/liveness + port: 9443 + scheme: HTTPS + initialDelaySeconds: 2 + periodSeconds: 6 + volumeMounts: + - mountPath: /.sigstore + name: sigstore + dnsPolicy: ClusterFirst + initContainers: + - args: + - --loggingFormat=text + env: + - name: METRICS_CONFIG + value: kyverno-metrics + - name: KYVERNO_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: KYVERNO_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: KYVERNO_DEPLOYMENT + value: kyverno + image: ghcr.io/kyverno/kyvernopre:v1.8.5 + imagePullPolicy: IfNotPresent + name: kyverno-pre + resources: + limits: + cpu: 100m + memory: 256Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + serviceAccountName: kyverno + volumes: + - emptyDir: {} + name: sigstore diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Namespace.kyverno.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Namespace.kyverno.yaml new file mode 100755 index 0000000..f305dd7 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Namespace.kyverno.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Role.kyverno:leaderelection.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Role.kyverno:leaderelection.yaml new file mode 100755 index 0000000..3e547a6 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Role.kyverno:leaderelection.yaml @@ -0,0 +1,35 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:leaderelection + namespace: kyverno +rules: +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - delete + - get + - patch + - update +- apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - patch + - update + - watch diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/RoleBinding.kyverno:leaderelection.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/RoleBinding.kyverno:leaderelection.yaml new file mode 100755 index 0000000..660f141 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/RoleBinding.kyverno:leaderelection.yaml @@ -0,0 +1,22 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno:leaderelection + namespace: kyverno +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kyverno:leaderelection +subjects: +- kind: ServiceAccount + name: kyverno + namespace: kyverno diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc-metrics.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc-metrics.yaml new file mode 100755 index 0000000..945a979 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc-metrics.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno-svc-metrics + namespace: kyverno +spec: + ports: + - name: metrics-port + port: 8000 + protocol: TCP + targetPort: 8000 + selector: + app: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + type: ClusterIP diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc.yaml new file mode 100755 index 0000000..9146c62 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/Service.kyverno-svc.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno-svc + namespace: kyverno +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: https + selector: + app: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/name: kyverno + type: ClusterIP diff --git a/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ServiceAccount.kyverno.yaml b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ServiceAccount.kyverno.yaml new file mode 100755 index 0000000..e81f8c0 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-install-kyverno-from-manifests/policy-install-kyverno-from-manifests/ServiceAccount.kyverno.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: kyverno + app.kubernetes.io/component: kyverno + app.kubernetes.io/instance: kyverno + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: kyverno + app.kubernetes.io/part-of: kyverno + app.kubernetes.io/version: 2.6.5 + helm.sh/chart: kyverno-2.6.5 + name: kyverno + namespace: kyverno diff --git a/pkg/testdata/ocm/policies/policy-kyverno-require-labels/check-kyverno-reports/require-lables.yaml b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/check-kyverno-reports/require-lables.yaml new file mode 100644 index 0000000..760e3e1 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/check-kyverno-reports/require-lables.yaml @@ -0,0 +1,5 @@ +apiVersion: wgpolicyk8s.io/v1alpha2 +kind: PolicyReport +results: + - policy: require-labels + result: fail \ No newline at end of file diff --git a/pkg/testdata/ocm/policies/policy-kyverno-require-labels/kustomization.yaml b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/kustomization.yaml new file mode 100755 index 0000000..0573618 --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/kustomization.yaml @@ -0,0 +1,2 @@ +generators: +- ./policy-generator.yaml diff --git a/pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-generator.yaml b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-generator.yaml new file mode 100755 index 0000000..145a0ce --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-generator.yaml @@ -0,0 +1,23 @@ +apiVersion: policy.open-cluster-management.io/v1 +kind: PolicyGenerator +metadata: + name: policy-generator +policyDefaults: + consolidateManifests: true + orderManifests: false + namespace: namespace + informKyvernoPolicies: false +policies: + - consolidateManifests: false + orderManifests: false + remediationAction: enforce + severity: low + complianceType: musthave + name: policy-kyverno-require-labels + manifests: + - path: ./policy-kyverno-require-labels + - path: ./check-kyverno-reports + complianceType: mustnothave + severity: low + remediationAction: inform + informKyvernoPolicies: false \ No newline at end of file diff --git a/pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-kyverno-require-labels/ClusterPolicy.require-labels.0.yaml b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-kyverno-require-labels/ClusterPolicy.require-labels.0.yaml new file mode 100755 index 0000000..c63dcbd --- /dev/null +++ b/pkg/testdata/ocm/policies/policy-kyverno-require-labels/policy-kyverno-require-labels/ClusterPolicy.require-labels.0.yaml @@ -0,0 +1,18 @@ +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: require-labels +spec: + rules: + - match: + resources: + kinds: + - Pod + name: check-for-labels + validate: + message: label `app.kubernetes.io/name` is required + pattern: + metadata: + labels: + app.kubernetes.io/name: ?* + validationFailureAction: audit From 6e6a5fe7cb1589c0768d58969fed9696051e98d8 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Wed, 6 Dec 2023 15:19:24 +0900 Subject: [PATCH 11/13] Move oscal2posture to subcommand 'tools' Signed-off-by: Takumi Yanagawa --- README.md | 2 +- cmd/c2pcli/subcommands/kyverno.go | 3 -- cmd/c2pcli/subcommands/ocm.go | 5 ++-- cmd/kyverno/tools/cmd/cmd.go | 3 ++ cmd/ocm/tools/cmd/cmd.go | 50 +++++++++++++++++++++++++++++++ cmd/ocm/tools/options/options.go | 39 ++++++++++++++++++++++++ docs/ocm/README.md | 8 ++--- 7 files changed, 99 insertions(+), 11 deletions(-) create mode 100644 cmd/ocm/tools/cmd/cmd.go create mode 100644 cmd/ocm/tools/options/options.go diff --git a/README.md b/README.md index 2279c27..5cabb44 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ $ tree /tmp/assessment-results #### Reformat in human-friendly format (markdown file) ``` -$ go run cmd/c2pcli/main.go kyverno oscal2posture -c ./pkg/testdata/kyverno/c2p-config.yaml --assessment-results /tmp/assessment-results/assessment-results.json -o /tmp/compliance-report.md +$ go run cmd/c2pcli/main.go kyverno tools oscal2posture -c ./pkg/testdata/kyverno/c2p-config.yaml --assessment-results /tmp/assessment-results/assessment-results.json -o /tmp/compliance-report.md ``` ``` diff --git a/cmd/c2pcli/subcommands/kyverno.go b/cmd/c2pcli/subcommands/kyverno.go index 3b0aa08..4f8761b 100644 --- a/cmd/c2pcli/subcommands/kyverno.go +++ b/cmd/c2pcli/subcommands/kyverno.go @@ -23,8 +23,6 @@ import ( oscal2policycmd "github.com/IBM/compliance-to-policy/cmd/kyverno/oscal2policy/cmd" result2oscalcmd "github.com/IBM/compliance-to-policy/cmd/kyverno/result2oscal/cmd" toolscmd "github.com/IBM/compliance-to-policy/cmd/kyverno/tools/cmd" - oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/cmd" - "github.com/IBM/compliance-to-policy/pkg" ) func NewKyvernoSubCommand() *cobra.Command { @@ -39,7 +37,6 @@ func NewKyvernoSubCommand() *cobra.Command { command.AddCommand(oscal2policycmd.New()) command.AddCommand(result2oscalcmd.New()) - command.AddCommand(oscal2posturecmd.New(pkg.GetLogger("kyverno/oscal2posture"))) command.AddCommand(toolscmd.New()) return command diff --git a/cmd/c2pcli/subcommands/ocm.go b/cmd/c2pcli/subcommands/ocm.go index 9b9659d..d3a7cec 100644 --- a/cmd/c2pcli/subcommands/ocm.go +++ b/cmd/c2pcli/subcommands/ocm.go @@ -22,8 +22,7 @@ import ( "github.com/IBM/compliance-to-policy/cmd/c2pcli/options" oscal2policycmd "github.com/IBM/compliance-to-policy/cmd/ocm/oscal2policy/cmd" result2oscalcmd "github.com/IBM/compliance-to-policy/cmd/ocm/result2oscal/cmd" - oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/cmd" - "github.com/IBM/compliance-to-policy/pkg" + toolscmd "github.com/IBM/compliance-to-policy/cmd/ocm/tools/cmd" ) func NewOcmSubCommand() *cobra.Command { @@ -38,7 +37,7 @@ func NewOcmSubCommand() *cobra.Command { command.AddCommand(oscal2policycmd.New()) command.AddCommand(result2oscalcmd.New()) - command.AddCommand(oscal2posturecmd.New(pkg.GetLogger("ocm/oscal2posture"))) + command.AddCommand(toolscmd.New()) return command } diff --git a/cmd/kyverno/tools/cmd/cmd.go b/cmd/kyverno/tools/cmd/cmd.go index 89adc9d..ab035d4 100644 --- a/cmd/kyverno/tools/cmd/cmd.go +++ b/cmd/kyverno/tools/cmd/cmd.go @@ -21,6 +21,8 @@ import ( "github.com/IBM/compliance-to-policy/cmd/c2pcli/options" kyvernocmd "github.com/IBM/compliance-to-policy/cmd/kyverno/tools/subcommands/kyverno" + oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/cmd" + "github.com/IBM/compliance-to-policy/pkg" ) func New() *cobra.Command { @@ -44,6 +46,7 @@ func New() *cobra.Command { opts.AddFlags(command.Flags()) command.AddCommand(kyvernocmd.New()) + command.AddCommand(oscal2posturecmd.New(pkg.GetLogger("kyverno/oscal2posture"))) return command } diff --git a/cmd/ocm/tools/cmd/cmd.go b/cmd/ocm/tools/cmd/cmd.go new file mode 100644 index 0000000..5b601a5 --- /dev/null +++ b/cmd/ocm/tools/cmd/cmd.go @@ -0,0 +1,50 @@ +/* +Copyright 2023 IBM Corporation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "github.com/spf13/cobra" + + "github.com/IBM/compliance-to-policy/cmd/c2pcli/options" + oscal2posturecmd "github.com/IBM/compliance-to-policy/cmd/pvpcommon/oscal2posture/cmd" + "github.com/IBM/compliance-to-policy/pkg" +) + +func New() *cobra.Command { + opts := options.NewOptions() + + command := &cobra.Command{ + Use: "tools", + Short: "Tools", + RunE: func(cmd *cobra.Command, args []string) error { + if err := opts.Complete(); err != nil { + return err + } + + if err := opts.Validate(); err != nil { + return err + } + return nil + }, + } + + opts.AddFlags(command.Flags()) + + command.AddCommand(oscal2posturecmd.New(pkg.GetLogger("ocm/oscal2posture"))) + + return command +} diff --git a/cmd/ocm/tools/options/options.go b/cmd/ocm/tools/options/options.go new file mode 100644 index 0000000..63ed570 --- /dev/null +++ b/cmd/ocm/tools/options/options.go @@ -0,0 +1,39 @@ +/* +Copyright 2023 IBM Corporation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package options + +import ( + "github.com/spf13/pflag" +) + +type Options struct { +} + +func NewOptions() *Options { + return &Options{} +} + +func (o *Options) AddFlags(fs *pflag.FlagSet) { +} + +func (o *Options) Complete() error { + return nil +} + +func (o *Options) Validate() error { + return nil +} diff --git a/docs/ocm/README.md b/docs/ocm/README.md index a48945e..edfbe7a 100644 --- a/docs/ocm/README.md +++ b/docs/ocm/README.md @@ -9,9 +9,9 @@ Usage: c2pcli ocm [command] Available Commands: - oscal2policy Compose deliverable OCM Policies from OSCAL - oscal2posture Generate Compliance Posture from OSCAL artifacts - result2oscal Generate OSCAL Assessment Results from OCM Policy statuses + oscal2policy Compose deliverable OCM Policies from OSCAL + result2oscal Generate OSCAL Assessment Results from OCM Policy statuses + tools Tools Flags: -h, --help help for ocm @@ -84,7 +84,7 @@ Use "c2pcli ocm [command] --help" for more information about a command. ``` 1. Prettify OSCAL Assessment Results in .md format ``` - c2pcli ocm oscal2posture -c ./docs/ocm/c2p-config.yaml --assessment-results /tmp/assessment-results.json -o /tmp/compliance-posture.md + c2pcli ocm tools oscal2posture -c ./docs/ocm/c2p-config.yaml --assessment-results /tmp/assessment-results.json -o /tmp/compliance-posture.md ``` - You can view the compliance posture like [./final-outputs/compliance-posture.md](./final-outputs/compliance-posture.md) From 1d04003bab62b37577f10d92c19fcbcf28bb4550 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Wed, 6 Dec 2023 15:38:07 +0900 Subject: [PATCH 12/13] Separate docs from C2P for OCM and C2P for Kyverno Signed-off-by: Takumi Yanagawa --- README.md | 104 +++++------------------- docs/images/e2e-pm.drawio | 165 ++++++++++++++++++++++++++++++++++++++ docs/images/e2e-pm.png | Bin 0 -> 99922 bytes docs/kyverno/README.md | 112 ++++++++++++++++++++++++++ docs/ocm/README.md | 10 ++- 5 files changed, 305 insertions(+), 86 deletions(-) create mode 100644 docs/images/e2e-pm.drawio create mode 100644 docs/images/e2e-pm.png create mode 100644 docs/kyverno/README.md diff --git a/README.md b/README.md index 5cabb44..f830bc0 100644 --- a/README.md +++ b/README.md @@ -1,98 +1,34 @@ # compliance-to-policy Compliance-to-Policy (C2P) provides the framework to bridge Compliance administration and Policy administration by [OSCAL](https://pages.nist.gov/OSCAL/). OSCAL (Open Security Controls Assessment Language) is a standardized framework developed by NIST for expressing and automating the assessment and management of security controls in machine-readable format (xml, json, yaml) -## Continuous Compliance by C2P +![C2P Overview](/docs/images/e2e-pm.png) -https://github.com/IBM/compliance-to-policy/assets/113283236/4b0b5357-4025-46c8-8d88-1f4c00538795 - -## Usage of C2P commands - -### C2P for Kyverno -Prepare Kyverno Policy Resources -- You can use [policy-resources for test](/pkg/testdata/kyverno/policy-resources) -- For bring your own policies, please see [Bring your own Kyverno Policy Resources](#bring-your-own-kyverno-policy-resources) - -#### Convert OSCAL to Kyverno Policy -``` -$ go run cmd/c2pcli/main.go kyverno oscal2policy -c ./pkg/testdata/kyverno/c2p-config.yaml -o /tmp/kyverno-policies -2023-10-31T07:23:56.291+0900 INFO kyverno/c2pcr kyverno/configparser.go:53 Component-definition is loaded from ./pkg/testdata/kyverno/component-definition.json - -$ tree /tmp/kyverno-policies -/tmp/kyverno-policies -└── allowed-base-images - ├── 02-setup-cm.yaml - └── allowed-base-images.yaml -``` - -#### Convert Policy Report to OSCAL Assessment Results +## Usage of C2P CLI ``` -$ go run cmd/c2pcli/main.go kyverno result2oscal -c ./pkg/testdata/kyverno/c2p-config.yaml -o /tmp/assessment-results +$ c2pcli -h +C2P CLI -$ tree /tmp/assessment-results -/tmp/assessment-results -└── assessment-results.json -``` +Usage: + c2pcli [flags] + c2pcli [command] -#### Reformat in human-friendly format (markdown file) -``` -$ go run cmd/c2pcli/main.go kyverno tools oscal2posture -c ./pkg/testdata/kyverno/c2p-config.yaml --assessment-results /tmp/assessment-results/assessment-results.json -o /tmp/compliance-report.md -``` +Available Commands: + completion Generate the autocompletion script for the specified shell + help Help about any command + kyverno C2P CLI Kyverno plugin + ocm C2P CLI OCM plugin + version Display version -``` -$ head -n 15 /tmp/compliance-report.md -## Catalog +Flags: + -h, --help help for c2pcli -## Component: Kubernetes -#### Result of control: cm-8.3_smt.a - -Rule ID: allowed-base-images -
Details - - - Subject UUID: 0b1adf1c-f6e2-46af-889e-39255e669655 - - Title: ApiVersion: v1, Kind: Pod, Namespace: argocd, Name: argocd-application-controller-0 - - Result: fail - - Reason: - ``` - validation failure: This container image's base is not in the approved list or is not specified. Only pre-approved base images may be used. Please contact the platform team for assistance. - ``` +Use "c2pcli [command] --help" for more information about a command. ``` -### Bring your own Kyverno Policy Resources -- You can download Kyverno Policies (https://github.com/kyverno/policies) as Policy Resources and modify them - 1. Run `kyverno tools load-policy-resources` command - ``` - $ go run cmd/c2pcli/main.go kyverno tools load-policy-resources --src https://github.com/kyverno/policies --dest /tmp/policies - ``` - ``` - $ tree /tmp/policies - /tmp/policies - ├── add-apparmor-annotations - │ └── add-apparmor-annotations.yaml - ├── add-capabilities - │ └── add-capabilities.yaml - ├── add-castai-removal-disabled - │ └── add-castai-removal-disabled.yaml - ├── add-certificates-volume - │ └── add-certificates-volume.yaml - ├── add-default-resources - ... - ``` - - You can check result.json about what resources are downloaded. - ``` - $ cat /tmp/policies/result.json - - ``` - - There are some policies that depend on context. Please add the context resources manually. result.json contains list of the policies that have context field - ``` - $ jq -r .summary.resourcesHavingContext /tmp/policies/result.json - [ - "allowed-podpriorities", - "allowed-base-images", - "advanced-restrict-image-registries", - ... - "require-linkerd-server" - ] - ``` +C2P is targeting a plugin architecture to cover not only OCM Policy Framework but also other types of PVPs. +Please go to the docs for each usage. +- [C2P for OCM](/docs/ocm/README.md) +- [C2P for Kyverno](/docs/kyverno/README.md) ## Build at local ``` diff --git a/docs/images/e2e-pm.drawio b/docs/images/e2e-pm.drawio new file mode 100644 index 0000000..0adb5b5 --- /dev/null +++ b/docs/images/e2e-pm.drawio @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/images/e2e-pm.png b/docs/images/e2e-pm.png new file mode 100644 index 0000000000000000000000000000000000000000..5a96786c33beade6b540b66735e27e41e31407e1 GIT binary patch literal 99922 zcmeFZ1z42bw>~_yQi9abiXuo4jkE};NT{STzyL!?cejMJK{wd6K{pc8pa?46NJ|Ui zw?`R7Up>Ei&wJkQ{0|ow%slhN-fOMB*1hhv_S{fWk|)Ba!G}N~MCZ<)xdee=!66V# zwgb4}$RPWXTi_pt-6i?ckeoKUX$VAK(_U87-on|))Eo(6=9BsMikVLqyf!pN7~3K& zn0a|j4Vn4QF!S;Xsb5qyGFCM)5aGS7dQQaA+D1?p90q4tA}o;K&QU=aBROHHqhD`g z;Vf^9ur^V&GDMn#^9-H8odx3+Qd4#_mFt$ZM?(1E6c~A!~o4W4aAGUj) zv4g20(r))|->$T`vNE?fwf^y-ft95t(!ljW@Kf)JIURrT7!A~a1rXj zWdnryACGF78rqxeo(mHc`8F8T>1UCq#wNRu7UmWD_JIWgee&*1>`V}bR!-lp|9a@F z;B2j|z?HIJbs~c_M+pxtmv7g}{pQoX@!KLTcc1-VU$8r1M})bRnBwlIg2KD9*)5#>1d+1Rdh9Q2W#`bbLylfRvS_<8?I0rCAtKtO29D$?MuJi;Dn zhD2H;ZU26f68tMA#s6zb0n3#GVv<9c8~ptin*h&WC?Q_KKUfIT5JdCc0B2=uZ(?O^ zWr;AC{eER6dtN&$2U`Q=?o~epczJZ> z|9bC#6!ZCa&2b;-`PWS3H|qXsB>#o7{|&tw3iI#?@$G4EAAFD&;Nbxg9j)VaR_3M# zC@d;%Xklt;3KkDAVJk~;KnASZ|1{YAv__2(hC+y6LP33gK>;3qFfb!4OMA4ZLcwcu zgg(+-#mdg~>!|q77xm6r}J-f+PAnt(q)ZuO9%sd z6fFM>avC)JMvFv*4~??-3FTLK9GxluMA0kkf*=xF0Y47;tx^_5PK=d*~l7$i1cetCai4 zr2J1+bsE)KW{Az^X+`wg|tt0RYzy+w-S~&s^@_(~O zfT8IRw1?*Vl`{Uj43r-@+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n~3$tZnS@ zYw(x^xz7CYxOU5v$8mZ~IFHc;bM7ym7X%t_r$nPfy=;1gwe=L`Szwt%D884iO8wod zI4R7j}2gtH7N__qQ5cVcaPs=Da`F^+T3Vk2E`ICGv0mam5_^dIu={IVrKf&Ofi zg-H&Z|1}&K_H7Xg>*`K}Kr#J|+IdE3!Ozy!>`LyEgY}3UAs@t1Ge?IUyZ`bc8g1Rc zwbU5U?f3e+SPoXZH1hpjHKWyK{$i~ZnU`)Kh~M33RRR}|wh3}SI8yF4nrN(R99(#o z9mY+|))dD7)ut^Bk2zpk7~B5psn>YO#{?sL#m2+2ZB?<<+oA5+5vM3WyTWWZ2`TW3 zF!o3yaW5>bO93A4{rQPY59IHxG@>G!Dh5t>QE!sM+y{Lo-uw=k86t;ufdeU5T>dAp zylP52WT6w$v05NAcXU?tcYv7$EqQ`Wx$aQ#1%hteb)vw!`A4SAvqc~VheF<#`UASy z++%3(gL?t-ehDaX7%q#`v3eE aUz>ZpP7?|jNIq2H4?@pGm!R!<<9`6h!rZ3- literal 0 HcmV?d00001 diff --git a/docs/kyverno/README.md b/docs/kyverno/README.md new file mode 100644 index 0000000..068f86b --- /dev/null +++ b/docs/kyverno/README.md @@ -0,0 +1,112 @@ +## C2P for Kyverno + +### Continuous Compliance by C2P + +https://github.com/IBM/compliance-to-policy/assets/113283236/4b0b5357-4025-46c8-8d88-1f4c00538795 + +### Usage of C2P CLI +``` +$ c2pcli ocm -h +C2P CLI Kyverno plugin + +Usage: + c2pcli kyverno [command] + +Available Commands: + oscal2policy Compose deliverable Kyverno policies from OSCAL + result2oscal Generate OSCAL Assessment Results from Kyverno policies and the policy reports + tools Tools + +Flags: + -h, --help help for kyverno + +Use "c2pcli kyverno [command] --help" for more information about a command. +``` + +### Prerequisites + +1. Prepare Kyverno Policy Resources + - You can use [policy-resources for test](/pkg/testdata/kyverno/policy-resources) + - For bring your own policies, please see [Bring your own Kyverno Policy Resources](#bring-your-own-kyverno-policy-resources) + +#### Convert OSCAL to Kyverno Policy +``` +$ c2pcli kyverno oscal2policy -c ./pkg/testdata/kyverno/c2p-config.yaml -o /tmp/kyverno-policies +2023-10-31T07:23:56.291+0900 INFO kyverno/c2pcr kyverno/configparser.go:53 Component-definition is loaded from ./pkg/testdata/kyverno/component-definition.json + +$ tree /tmp/kyverno-policies +/tmp/kyverno-policies +└── allowed-base-images + ├── 02-setup-cm.yaml + └── allowed-base-images.yaml +``` + +#### Convert Policy Report to OSCAL Assessment Results +``` +$ c2pcli kyverno result2oscal -c ./pkg/testdata/kyverno/c2p-config.yaml -o /tmp/assessment-results + +$ tree /tmp/assessment-results +/tmp/assessment-results +└── assessment-results.json +``` + +#### Reformat in human-friendly format (markdown file) +``` +$ c2pcli kyverno tools oscal2posture -c ./pkg/testdata/kyverno/c2p-config.yaml --assessment-results /tmp/assessment-results/assessment-results.json -o /tmp/compliance-report.md +``` + +``` +$ head -n 15 /tmp/compliance-report.md +## Catalog + +## Component: Kubernetes +#### Result of control: cm-8.3_smt.a + +Rule ID: allowed-base-images +

Details + + - Subject UUID: 0b1adf1c-f6e2-46af-889e-39255e669655 + - Title: ApiVersion: v1, Kind: Pod, Namespace: argocd, Name: argocd-application-controller-0 + - Result: fail + - Reason: + ``` + validation failure: This container image's base is not in the approved list or is not specified. Only pre-approved base images may be used. Please contact the platform team for assistance. + ``` +``` + +### Bring your own Kyverno Policy Resources +- You can download Kyverno Policies (https://github.com/kyverno/policies) as Policy Resources and modify them + 1. Run `kyverno tools load-policy-resources` command + ``` + $ c2pcli kyverno tools load-policy-resources --src https://github.com/kyverno/policies --dest /tmp/policies + ``` + ``` + $ tree /tmp/policies + /tmp/policies + ├── add-apparmor-annotations + │ └── add-apparmor-annotations.yaml + ├── add-capabilities + │ └── add-capabilities.yaml + ├── add-castai-removal-disabled + │ └── add-castai-removal-disabled.yaml + ├── add-certificates-volume + │ └── add-certificates-volume.yaml + ├── add-default-resources + ... + ``` + - You can check result.json about what resources are downloaded. + ``` + $ cat /tmp/policies/result.json + + ``` + - There are some policies that depend on context. Please add the context resources manually. result.json contains list of the policies that have context field + ``` + $ jq -r .summary.resourcesHavingContext /tmp/policies/result.json + [ + "allowed-podpriorities", + "allowed-base-images", + "advanced-restrict-image-registries", + ... + "require-linkerd-server" + ] + ``` \ No newline at end of file diff --git a/docs/ocm/README.md b/docs/ocm/README.md index edfbe7a..a3259a6 100644 --- a/docs/ocm/README.md +++ b/docs/ocm/README.md @@ -1,6 +1,6 @@ ## C2P for OCM -### Usage +### Usage of C2P CLI ``` $ c2pcli ocm -h C2P CLI OCM plugin @@ -21,6 +21,9 @@ Use "c2pcli ocm [command] --help" for more information about a command. ### Prerequisites 1. Install [Policy Generator Plugin](https://github.com/open-cluster-management-io/policy-generator-plugin#as-a-kustomize-plugin) +1. Prepare OCM Policy Resources + - You can use [policy-resources for test](/pkg/testdata/ocm/policies) + - You can also use [Policy Collection](https://github.com/open-cluster-management-io/policy-collection). Please see [C2P Decomposer](#c2p-decomposer) ### Manual end-to-end use case @@ -150,7 +153,10 @@ Compose OCM Policy from policy resources from compliance information (for exampl └── policy-sets.yaml ``` -### Setup pipeline +### GitOps automation use case + +https://github.com/IBM/compliance-to-policy/assets/113283236/da3518d0-53de-4bd6-8703-04ce94e9dfba + 1. Create two repositories (one is configuration repository that's used for pipeline from OSCAL to Policy and another is evidence repository that's used for pipeline from OCM statuses to Compliance result) - For example, c2p-for-ocm-pipeline01-config and c2p-for-ocm-pipeline01-evidence 1. Create Github Personal Access Token having following permissions From 4c67e939b2b68b376fb0e02a79a20c59a7382c14 Mon Sep 17 00:00:00 2001 From: Takumi Yanagawa Date: Wed, 6 Dec 2023 15:51:11 +0900 Subject: [PATCH 13/13] Add images for example use case Signed-off-by: Takumi Yanagawa --- docs/ocm/README.md | 160 ++++++++++-------- .../images/manual-end-to-end-use-case.drawio | 76 +++++++++ .../ocm/images/manual-end-to-end-use-case.png | Bin 0 -> 47252 bytes 3 files changed, 168 insertions(+), 68 deletions(-) create mode 100644 docs/ocm/images/manual-end-to-end-use-case.drawio create mode 100644 docs/ocm/images/manual-end-to-end-use-case.png diff --git a/docs/ocm/README.md b/docs/ocm/README.md index a3259a6..8df2105 100644 --- a/docs/ocm/README.md +++ b/docs/ocm/README.md @@ -27,6 +27,19 @@ Use "c2pcli ocm [command] --help" for more information about a command. ### Manual end-to-end use case +#### Outline +1. Create OSCAL Component Definition + - Use example one. In real cases, a user writes OSCAL by Authoring tool like [Trestle](https://ibm.github.io/compliance-trestle/)) +1. Run oscal2policy to generate OCM Policies from OSCAL +1. Deploy generated OCM Policies to OCM Hub +1. Get OCM Policies from OCM Hub +1. Run result2oscal to generate OSCAL Assessment Results from the OCM Policy Results +1. Prettify OSCAL Assessment Results + - Use C2P tools. In real cases, it's responsible of GRC tools. + +![manual-end-to-end-use-case.png](/docs/ocm/images/manual-end-to-end-use-case.png) + +#### Steps 1. Prerequisites 1. OCM is configured to manage two k8s clusters (cluster1 and cluster2) and installed Policy Governance Framework. 1. Namespace `c2p` is created in OCM Hub @@ -48,12 +61,12 @@ Use "c2pcli ocm [command] --help" for more information about a command. └── 2 ManagedClusters selected └── [cluster1 cluster2] ``` -1. Run oscal2policy +1. Run oscal2policy to generate OCM Policies from OSCAL ``` c2pcli ocm oscal2policy -c ./docs/ocm/c2p-config.yaml -o /tmp/ocm-policies ``` - The generated ocm-policies directory looks like [./final-outputs/ocm-policies](./final-outputs/ocm-policies) -1. Deploy generated OCM Policies to OCM Hub +1. Deploy the generated OCM Policies to OCM Hub ``` kubectl create -f /tmp/ocm-policies ``` @@ -81,7 +94,7 @@ Use "c2pcli ocm [command] --help" for more information about a command. kubectl get policysets.policy.open-cluster-management.io -A -o yaml > /tmp/results/policysets.policy.open-cluster-management.io.yaml kubectl get placementdecisions.cluster.open-cluster-management.io -A -o yaml > /tmp/results/placementdecisions.cluster.open-cluster-management.io.yaml ``` -1. Run result2oscal +1. Run result2oscal to generate OSCAL Assessment Results from the OCM Policy Results ``` c2pcli ocm result2oscal -c ./docs/ocm/c2p-config.yaml --results /tmp/results -o /tmp/assessment-results.json ``` @@ -91,71 +104,15 @@ Use "c2pcli ocm [command] --help" for more information about a command. ``` - You can view the compliance posture like [./final-outputs/compliance-posture.md](./final-outputs/compliance-posture.md) -### C2P Decomposer -Decompose OCM poicy collection to kubernetes resources composing each OCM policy (we call it policy resource). +### GitOps automation use case -1. Clone [Policy Collection](https://github.com/open-cluster-management-io/policy-collection) - ``` - git clone --depth 1 https://github.com/open-cluster-management-io/policy-collection.git /tmp/policy-collection - ``` -1. Run C2P Decomposer - ``` - go run ./cmd/decompose/decompose.go --policy-collection-dir=/tmp/policy-collection --out=/tmp/c2p-output - ``` -1. Decomposed policy resources are ouput in `/tmp/c2p-output/decomposed/resources` - ``` - $ tree -L 1 /tmp/c2p-output/decomposed - /tmp/c2p-output/decomposed - ├── _sources - └── resources - ``` - Individual decomposed resource contains k8s manifests and configuration files (policy-generator.yaml and kustomization.yaml) for PolicyGenerator. - ``` - $ tree -L 3 /tmp/c2p-output/decomposed/resources - /tmp/c2p-output/decomposed/resources - ├── add-chrony - │   ├── add-chrony-worker - │   │   └── MachineConfig.50-worker-chrony.0.yaml - │   ├── kustomization.yaml - │   └── policy-generator.yaml - ├── add-tvk-license - │   ├── add-tvk-license - │   │   └── License.triliovault-license.0.yaml - │   ├── kustomization.yaml - ``` -### C2P Composer -Compose OCM Policy from policy resources from compliance information (for example, [compliance.yaml](cmd/compose/compliance.yaml)) +#### Outline -1. Run C2P Composer - ``` - go run cmd/compose-by-c2pcr/main.go --c2pcr ./cmd/compose-by-c2pcr/c2pcr.yaml --out /tmp/c2p-output - ``` -1. Composed OCM policies are output in `/tmp/c2p-output` - ``` - $ tree /tmp/c2p-output - /tmp/c2p-output - ├── add-chrony - │ ├── add-chrony-worker - │ │ └── MachineConfig.50-worker-chrony.0.yaml - │ ├── kustomization.yaml - │ └── policy-generator.yaml - ├── install-odf-lvm-operator - │ ├── kustomization.yaml - │ ├── odf-lvmcluster - │ │ └── LVMCluster.odf-lvmcluster.0.yaml - │ ├── policy-generator.yaml - │ └── policy-odf-lvm-operator - │ ├── Namespace.openshift-storage.0.yaml - │ ├── OperatorGroup.openshift-storage-operatorgroup.0.yaml - │ └── Subscription.lvm-operator.0.yaml - ├── kustomization.yaml - ├── policy-generator.yaml - └── policy-sets.yaml - ``` +https://github.com/IBM/compliance-to-policy/assets/113283236/da3518d0-53de-4bd6-8703-04ce94e9dfba -### GitOps automation use case +#### Steps -https://github.com/IBM/compliance-to-policy/assets/113283236/da3518d0-53de-4bd6-8703-04ce94e9dfba +Setup Github Repos 1. Create two repositories (one is configuration repository that's used for pipeline from OSCAL to Policy and another is evidence repository that's used for pipeline from OCM statuses to Compliance result) - For example, c2p-for-ocm-pipeline01-config and c2p-for-ocm-pipeline01-evidence @@ -183,17 +140,20 @@ https://github.com/IBM/compliance-to-policy/assets/113283236/da3518d0-53de-4bd6- - Name: PAT - Secret: Created Github Personal Access Token -### Run oscal-to-pocliy +Run oscal-to-pocliy + 1. Go to the configuration repository 1. Go to `Actions` tab 1. Run `OSCAL to Policy` 1. This action generates manifests from OSCAL and then generate a PR of changes for a directory `ocm-policy-manifests` containing the generated manifests. 1. Merge the PR -### Integrate with GitOps +Integrate with GitOps + 1. Sync `ocm-policy-manifests` directory with your OCM Hub by OCM GitOps (OCM Channel and Subscription addon) -### Deploy collector to your OCM Hub +Deploy collector to your OCM Hub + 1. Apply RBAC for collector ``` kubectl apply -f https://raw.githubusercontent.com/yana1205/compliance-to-policy/redesign.0622/scripts/collect/rbac.yaml @@ -211,13 +171,77 @@ https://github.com/IBM/compliance-to-policy/assets/113283236/da3518d0-53de-4bd6- kubectl apply -f https://raw.githubusercontent.com/IBM/compliance-to-policy/main/scripts/collect/cronjob.yaml ``` -### Cleanup +Cleanup + ``` kubectl delete -f https://raw.githubusercontent.com/IBM/compliance-to-policy/main/scripts/collect/cronjob.yaml kubectl -n c2p delete secret collect-ocm-status-secret kubectl delete -f https://raw.githubusercontent.com/IBM/compliance-to-policy/main/scripts/collect/rbac.yaml ``` + +### C2P Decomposer +Decompose OCM poicy collection to kubernetes resources composing each OCM policy (we call it policy resource). + +1. Clone [Policy Collection](https://github.com/open-cluster-management-io/policy-collection) + ``` + git clone --depth 1 https://github.com/open-cluster-management-io/policy-collection.git /tmp/policy-collection + ``` +1. Run C2P Decomposer + ``` + go run ./cmd/decompose/decompose.go --policy-collection-dir=/tmp/policy-collection --out=/tmp/c2p-output + ``` +1. Decomposed policy resources are ouput in `/tmp/c2p-output/decomposed/resources` + ``` + $ tree -L 1 /tmp/c2p-output/decomposed + /tmp/c2p-output/decomposed + ├── _sources + └── resources + ``` + Individual decomposed resource contains k8s manifests and configuration files (policy-generator.yaml and kustomization.yaml) for PolicyGenerator. + ``` + $ tree -L 3 /tmp/c2p-output/decomposed/resources + /tmp/c2p-output/decomposed/resources + ├── add-chrony + │   ├── add-chrony-worker + │   │   └── MachineConfig.50-worker-chrony.0.yaml + │   ├── kustomization.yaml + │   └── policy-generator.yaml + ├── add-tvk-license + │   ├── add-tvk-license + │   │   └── License.triliovault-license.0.yaml + │   ├── kustomization.yaml + ``` +### C2P Composer +Compose OCM Policy from policy resources from compliance information (for example, [compliance.yaml](cmd/compose/compliance.yaml)) + +1. Run C2P Composer + ``` + go run cmd/compose-by-c2pcr/main.go --c2pcr ./cmd/compose-by-c2pcr/c2pcr.yaml --out /tmp/c2p-output + ``` +1. Composed OCM policies are output in `/tmp/c2p-output` + ``` + $ tree /tmp/c2p-output + /tmp/c2p-output + ├── add-chrony + │ ├── add-chrony-worker + │ │ └── MachineConfig.50-worker-chrony.0.yaml + │ ├── kustomization.yaml + │ └── policy-generator.yaml + ├── install-odf-lvm-operator + │ ├── kustomization.yaml + │ ├── odf-lvmcluster + │ │ └── LVMCluster.odf-lvmcluster.0.yaml + │ ├── policy-generator.yaml + │ └── policy-odf-lvm-operator + │ ├── Namespace.openshift-storage.0.yaml + │ ├── OperatorGroup.openshift-storage-operatorgroup.0.yaml + │ └── Subscription.lvm-operator.0.yaml + ├── kustomization.yaml + ├── policy-generator.yaml + └── policy-sets.yaml + ``` + ## C2P as controller (deprecated) 1. Build image ``` diff --git a/docs/ocm/images/manual-end-to-end-use-case.drawio b/docs/ocm/images/manual-end-to-end-use-case.drawio new file mode 100644 index 0000000..19a1dcf --- /dev/null +++ b/docs/ocm/images/manual-end-to-end-use-case.drawio @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/ocm/images/manual-end-to-end-use-case.png b/docs/ocm/images/manual-end-to-end-use-case.png new file mode 100644 index 0000000000000000000000000000000000000000..8b968d27852191182160f8b4a4de697000f0e4c2 GIT binary patch literal 47252 zcmd?Q1z1(vwm7bUN+@hVK9!wpJnxZjcg1Q9(euQBv9 zbb~1T=OWJWoOADezyE#rzW2WGp6@%j*PL^WIp*jw=2#)>s&eOW$#GAdIB`xvUKW1h z1P1!ViIcamPlJ)Ju*q`p&q+tPob-vjF3PVbPB0iaUDI~5bF;9rH9x_`Cv*6ViSHWt zZDwU`i8Quj;^nq7W8#x#;^lQ#wm>=GGe2CTZft4J z!2^vR0I_qELmJ<`qk=Fqw*~9W+zwaq@CtGtzG;R!91-FcJ{+(_9&dL5g_j!|(6Dkp zg3ojGo~5&unYrT;w8J-@5C~f*tGj<3G)36ko0~fQVWBY+iE#bnG7E(5(IJm^y$jCq zhnJuM4O3&=zm95InK|7#TFWCSa)=DHT;ANu^3KuL!n{I<6L!YOi;qs?c*ocb;d=P~ z!O#KWkO%~L^V$JVWXx?L;vLiF@V)DQXZAPzk>>VCd;b?N@Es!NVr=VtbhyI-M<>+r zY0d4;u0liuSen`zJ33mKGVw{@ak8@o13ciT1;XCxh({3TrNP!nls1^;<`fYTIv&tD z7!c+WI3AFN#DV*_CrA{2dr~(?TG^R9nIn$}-K?A-h#cIU+(1^q9$?@P5W(~B0HKH9 z;DLufgF8H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