diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..3550a30f --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index b26c0b08..2432e9ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ _manifest.yaml _resources.yaml *.tgz +_build/ +.direnv/ +.pre-commit-config.yaml diff --git a/applications/archmeister.yaml b/apps/archmeister.yaml similarity index 100% rename from applications/archmeister.yaml rename to apps/archmeister.yaml diff --git a/applications/atlantis-host-resources.yaml b/apps/atlantis-host-resources.yaml similarity index 100% rename from applications/atlantis-host-resources.yaml rename to apps/atlantis-host-resources.yaml diff --git a/applications/atlantis-resources.yaml b/apps/atlantis-resources.yaml similarity index 100% rename from applications/atlantis-resources.yaml rename to apps/atlantis-resources.yaml diff --git a/apps/atlantis.nix b/apps/atlantis.nix new file mode 100644 index 00000000..3929aecd --- /dev/null +++ b/apps/atlantis.nix @@ -0,0 +1,106 @@ +{ lib, config, ... }: +let + cfg = config.services.atlantis; +in +{ + options.services.atlantis = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable"; + }; + autoSync = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Auto sync"; + }; + prune = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Prune"; + }; + }; + + config = lib.mkIf cfg.enable { + applications.atlantis.resources = { + applicationSets = { + atlantis.spec = { + goTemplate = true; + generators = [ + { + list = { + elements = [ + { + env = "prod"; + namespace = "atlantis"; + project = "atlantis"; + cluster = "https://kubernetes.default.svc"; + hostname = "atlantis.srv.oceanbox.io"; + revision = "main"; + autoSync = cfg.autoSync; + prune = cfg.prune; + } + { + env = "staging"; + namespace = "atlantis"; + project = "atlantis"; + cluster = "https://staging-vcluster.staging-vcluster"; + hostname = "atlantis.beta.oceanbox.io"; + revision = "main"; + autoSync = cfg.autoSync; + prune = cfg.prune; + } + ]; + }; + } + ]; + template = { + metadata = { + name = "{{ .env }}-atlantis"; + annotations = { + "argocd.argoproj.io/compare-options" = "ServerSideDiff=true"; + }; + }; + spec = { + destination = { + namespace = "{{`{{.namespace}}`}}"; + server = "{{ .cluster }}"; + }; + project = "{{`{{.project}}`}}"; + sources = [ + { + repoURL = "https://gitlab.com/oceanbox/manifests.git"; + targetRevision = "{{`{{.revision}}`}}"; + path = "kustomizations/atlantis"; + plugin = { + name = "kustomize-helm-with-rewrite"; + parameters = [ + { + name = "env"; + string = "{{ .env }}"; + } + { + name = "hostname"; + string = "{{ .hostname }}"; + } + ]; + }; + } + ]; + syncPolicy = { + syncOptions = [ + "CreateNamespace=true" + "ApplyOutOfSyncOnly=true" + ]; + automated = lib.mkIf cfg.autoSync { + prune = cfg.prune; + selfHeal = false; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/applications/atlantis.yaml b/apps/atlantis.yaml similarity index 100% rename from applications/atlantis.yaml rename to apps/atlantis.yaml diff --git a/applications/busynix.yaml b/apps/busynix.yaml similarity index 100% rename from applications/busynix.yaml rename to apps/busynix.yaml diff --git a/applications/cerbos.yaml b/apps/cerbos.yaml similarity index 100% rename from applications/cerbos.yaml rename to apps/cerbos.yaml diff --git a/apps/default.nix b/apps/default.nix new file mode 100644 index 00000000..1b6428bf --- /dev/null +++ b/apps/default.nix @@ -0,0 +1,16 @@ +{ ... }: +{ + imports = [ + ./atlantis.nix + ]; + + config = { + services = { + atlantis = { + enable = true; + autoSync = true; + prune = false; + }; + }; + }; +} diff --git a/applications/dex.yaml b/apps/dex.yaml similarity index 100% rename from applications/dex.yaml rename to apps/dex.yaml diff --git a/applications/geoserver.yaml b/apps/geoserver.yaml similarity index 100% rename from applications/geoserver.yaml rename to apps/geoserver.yaml diff --git a/applications/hipster.yaml b/apps/hipster.yaml similarity index 100% rename from applications/hipster.yaml rename to apps/hipster.yaml diff --git a/applications/jaeger.yaml b/apps/jaeger.yaml similarity index 100% rename from applications/jaeger.yaml rename to apps/jaeger.yaml diff --git a/applications/keycloak.yaml b/apps/keycloak.yaml similarity index 100% rename from applications/keycloak.yaml rename to apps/keycloak.yaml diff --git a/applications/loki.yaml b/apps/loki.yaml similarity index 100% rename from applications/loki.yaml rename to apps/loki.yaml diff --git a/applications/openfga.yaml b/apps/openfga.yaml similarity index 100% rename from applications/openfga.yaml rename to apps/openfga.yaml diff --git a/applications/opentelemetry-collector.yaml b/apps/opentelemetry-collector.yaml similarity index 100% rename from applications/opentelemetry-collector.yaml rename to apps/opentelemetry-collector.yaml diff --git a/applications/osm-tile-server.yaml b/apps/osm-tile-server.yaml similarity index 100% rename from applications/osm-tile-server.yaml rename to apps/osm-tile-server.yaml diff --git a/applications/petimeter.yaml b/apps/petimeter.yaml similarity index 100% rename from applications/petimeter.yaml rename to apps/petimeter.yaml diff --git a/applications/rabbitmq.yaml b/apps/rabbitmq.yaml similarity index 100% rename from applications/rabbitmq.yaml rename to apps/rabbitmq.yaml diff --git a/applications/redis.yaml b/apps/redis.yaml similarity index 100% rename from applications/redis.yaml rename to apps/redis.yaml diff --git a/applications/seq.yaml b/apps/seq.yaml similarity index 100% rename from applications/seq.yaml rename to apps/seq.yaml diff --git a/applications/sorcerer.yaml b/apps/sorcerer.yaml similarity index 100% rename from applications/sorcerer.yaml rename to apps/sorcerer.yaml diff --git a/applications/tempo.yaml b/apps/tempo.yaml similarity index 100% rename from applications/tempo.yaml rename to apps/tempo.yaml diff --git a/applications/wordpress.yaml b/apps/wordpress.yaml similarity index 100% rename from applications/wordpress.yaml rename to apps/wordpress.yaml diff --git a/applications/yolo-dl.yaml b/apps/yolo-dl.yaml similarity index 100% rename from applications/yolo-dl.yaml rename to apps/yolo-dl.yaml diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..ba151910 --- /dev/null +++ b/flake.lock @@ -0,0 +1,635 @@ +{ + "nodes": { + "cargo2nix": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1699033427, + "narHash": "sha256-OVtd5IPbb4NvHibN+QvMrMxq7aZN5GFoINZSAXKjUdA=", + "owner": "cargo2nix", + "repo": "cargo2nix", + "rev": "c6f33051f412352f293e738cc8da6fd4c457080f", + "type": "github" + }, + "original": { + "owner": "cargo2nix", + "ref": "release-0.11.0", + "repo": "cargo2nix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "inputs": { + "systems": "systems_7" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "haumea": { + "inputs": { + "nixpkgs": [ + "nixhelm", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685133229, + "narHash": "sha256-FePm/Gi9PBSNwiDFq3N+DWdfxFq0UKsVVTJS3cQPn94=", + "owner": "nix-community", + "repo": "haumea", + "rev": "34dd58385092a23018748b50f9b23de6266dffc2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v0.2.2", + "repo": "haumea", + "type": "github" + } + }, + "kubenix": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixidy", + "nixpkgs" + ], + "systems": "systems_6", + "treefmt": "treefmt" + }, + "locked": { + "lastModified": 1718110643, + "narHash": "sha256-KrEOCx/bpN++sySOEL5EO5AhYsqRZZk+CXacueUeSl4=", + "owner": "hall", + "repo": "kubenix", + "rev": "a04066c45526c6d8410ba998134f692ff991b4f3", + "type": "github" + }, + "original": { + "owner": "hall", + "repo": "kubenix", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "nixhelm", + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703863825, + "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nix-kube-generators": { + "locked": { + "lastModified": 1708155396, + "narHash": "sha256-A/BIeJjiRS7sBYP6tFJa/WHDPHe7DGTCkSEKXttYeAQ=", + "owner": "farcaller", + "repo": "nix-kube-generators", + "rev": "14dbd5e5b40615937900f71d9a9851b59b4d9a88", + "type": "github" + }, + "original": { + "owner": "farcaller", + "repo": "nix-kube-generators", + "type": "github" + } + }, + "nix-kube-generators_2": { + "locked": { + "lastModified": 1708155396, + "narHash": "sha256-A/BIeJjiRS7sBYP6tFJa/WHDPHe7DGTCkSEKXttYeAQ=", + "owner": "farcaller", + "repo": "nix-kube-generators", + "rev": "14dbd5e5b40615937900f71d9a9851b59b4d9a88", + "type": "github" + }, + "original": { + "owner": "farcaller", + "repo": "nix-kube-generators", + "type": "github" + } + }, + "nixhelm": { + "inputs": { + "flake-utils": "flake-utils_2", + "haumea": "haumea", + "nix-kube-generators": "nix-kube-generators", + "nixpkgs": [ + "nixpkgs" + ], + "poetry2nix": "poetry2nix" + }, + "locked": { + "lastModified": 1728522957, + "narHash": "sha256-5/2Q/aVVCgd/pL94KFnnH5h36se3UqT+oxXPTYnVjtY=", + "owner": "farcaller", + "repo": "nixhelm", + "rev": "6fc421b792250c65aa39d121f3c67a26cc7dd2ea", + "type": "github" + }, + "original": { + "owner": "farcaller", + "repo": "nixhelm", + "type": "github" + } + }, + "nixidy": { + "inputs": { + "flake-utils": "flake-utils_4", + "kubenix": "kubenix", + "nix-kube-generators": "nix-kube-generators_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726669031, + "narHash": "sha256-iNh3jgB/vrltSUquE9Q3lbGIRqiyayglnSHtB5KbW+M=", + "owner": "arnarg", + "repo": "nixidy", + "rev": "b8abf95f1d4b1a7f5e70ffba926be571a778c540", + "type": "github" + }, + "original": { + "owner": "arnarg", + "repo": "nixidy", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1728492678, + "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1697382362, + "narHash": "sha256-PvFjWFmSYOF6TjNZ/WjOeqa+sgaWm+83Fz37vEuATHA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ad9a253a0d34f313707f9c25fb8c95c65b1c8882", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "poetry2nix": { + "inputs": { + "flake-utils": "flake-utils_3", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixhelm", + "nixpkgs" + ], + "systems": "systems_4", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1718285706, + "narHash": "sha256-DScsBM+kZvxOva7QegfdtleebMXh30XPxDQr/1IGKYo=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "a5be1bbbe0af0266147a88e0ec43b18c722f2bb9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1728092656, + "narHash": "sha256-eMeCTJZ5xBeQ0f9Os7K8DThNVSo9gy4umZLDfF5q6OM=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "1211305a5b237771e13fcca0c51e60ad47326a9a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixhelm": "nixhelm", + "nixidy": "nixidy", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": "pre-commit-hooks", + "yaml2nix": "yaml2nix" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "yaml2nix", + "cargo2nix", + "flake-utils" + ], + "nixpkgs": [ + "yaml2nix", + "cargo2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1697336027, + "narHash": "sha256-ctmmw7j4liyfSh63v9rdFZeIoNYCkCvgqvtEOB7KhX8=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "e494404d36a41247987eeb1bfc2f1ca903e97764", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "id": "systems", + "type": "indirect" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "id": "systems", + "type": "indirect" + } + }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt": { + "inputs": { + "nixpkgs": [ + "nixidy", + "kubenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688026376, + "narHash": "sha256-qJmkr9BWDpqblk4E9/rCsAEl39y2n4Ycw6KRopvpUcY=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "df3f32b0cc253dfc7009b7317e8f0e7ccd70b1cf", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixhelm", + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717850719, + "narHash": "sha256-npYqVg+Wk4oxnWrnVG7416fpfrlRhp/lQ6wQ4DHI8YE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "4fc1c45a5f50169f9f29f6a98a438fb910b834ed", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "yaml2nix": { + "inputs": { + "cargo2nix": "cargo2nix", + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726132715, + "narHash": "sha256-DkHWWpvBco2yodyOk40LjTNcoaJ1bFKf0JY9OwWgy5M=", + "owner": "euank", + "repo": "yaml2nix", + "rev": "3a6df359da40ee49cb9ed597c2400342b76f2083", + "type": "github" + }, + "original": { + "owner": "euank", + "repo": "yaml2nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..77939084 --- /dev/null +++ b/flake.nix @@ -0,0 +1,139 @@ +{ + description = "My ArgoCD configuration with nixidy."; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + + nixidy = { + url = "github:arnarg/nixidy"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixhelm = { + url = "github:farcaller/nixhelm"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + pre-commit-hooks = { + url = "github:cachix/pre-commit-hooks.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + yaml2nix = { + url = "github:euank/yaml2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; + }; + + outputs = + { + self, + nixpkgs, + flake-utils, + nixidy, + nixhelm, + yaml2nix, + pre-commit-hooks, + }: + (flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + { + nixidyEnvs = { + prod = nixidy.lib.mkEnv { + inherit pkgs; + charts = nixhelm.chartsDerivations.${system}; + modules = [ + ./modules + ./apps + ./policies/oceanbox/network + # ./policies/oceanbox/kyverno + ]; + }; + }; + + checks = { + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + nixfmt-rfc-style.enable = false; + deadnix.enable = false; + statix.enable = false; + }; + }; + }; + + packages = { + nixidy = nixidy.packages.${system}.default; + generators = { + cilium = nixidy.packages.${system}.generators.fromCRD { + name = "cilium"; + src = pkgs.fetchFromGitHub { + owner = "cilium"; + repo = "cilium"; + rev = "v1.16.0"; + hash = "sha256-LJrNGHF52hdKCuVwjvGifqsH+8hxkf/A3LZNpCHeR7E="; + }; + crds = [ + "pkg/k8s/apis/cilium.io/client/crds/v2/ciliumnetworkpolicies.yaml" + "pkg/k8s/apis/cilium.io/client/crds/v2/ciliumclusterwidenetworkpolicies.yaml" + ]; + }; + + kyverno = nixidy.packages.${system}.generators.fromCRD { + name = "kyverno"; + src = pkgs.fetchFromGitHub { + owner = "kyverno"; + repo = "kyverno"; + rev = "v1.12.6"; + hash = "sha256-FwVB1okxhWTzWlZljGEEH9KuSsJl9GmwnX7bn4iDx/M="; + }; + crds = [ + "config/crds/kyverno/kyverno.io_cleanuppolicies.yaml" + "config/crds/kyverno/kyverno.io_clustercleanuppolicies.yaml" + "config/crds/kyverno/kyverno.io_clusterpolicies.yaml" + "config/crds/kyverno/kyverno.io_globalcontextentries.yaml" + "config/crds/kyverno/kyverno.io_policies.yaml" + "config/crds/kyverno/kyverno.io_policyexceptions.yaml" + "config/crds/kyverno/kyverno.io_updaterequests.yaml" + ]; + }; + }; + }; + + apps = { + gen-crd = { + type = "app"; + program = + (pkgs.writeShellScript "generate-modules" '' + set -eo pipefail + echo "generate cilium" + cat ${self.packages.${system}.generators.cilium} > modules/cilium-crd.nix + echo "generate kyverno" + cat ${self.packages.${system}.generators.kyverno} > modules/kyverno-crd.nix + '').outPath; + }; + }; + + devShells.default = pkgs.mkShellNoCC { + inherit (self.checks.${system}.pre-commit-check) shellHook; + nativeBuildInputs = with pkgs; [ + self.checks.${system}.pre-commit-check.enabledPackages + nixidy.packages.${system}.default + yaml2nix.packages.${system}.default + nixd + nixfmt-rfc-style + just + fzf + ]; + NIXD_FLAGS = "--inlay-hints"; + }; + } + )); +} diff --git a/justfile b/justfile new file mode 100644 index 00000000..d3674829 --- /dev/null +++ b/justfile @@ -0,0 +1,17 @@ +default := "prod" + +default: + just --choose + +info target=default: + nix run .#nixidy -- info .#{{target}} + +build target=default: + nix run .#nixidy -- build .#{{target}} + +switch target=default: + nix run .#nixidy -- switch .#{{target}} + +generate target=default: + nix build .#generators.cilium + # nix build .#generators.kyverno diff --git a/modules/cilium-crd.nix b/modules/cilium-crd.nix new file mode 100644 index 00000000..c300fb71 --- /dev/null +++ b/modules/cilium-crd.nix @@ -0,0 +1,9771 @@ +# This file was generated with nixidy CRD generator, do not edit. +{ + lib, + options, + config, + ... +}: +with lib; +let + hasAttrNotNull = attr: set: hasAttr attr set && set.${attr} != null; + + attrsToList = + values: + if values != null then + sort ( + a: b: + if (hasAttrNotNull "_priority" a && hasAttrNotNull "_priority" b) then + a._priority < b._priority + else + false + ) (mapAttrsToList (n: v: v) values) + else + values; + + getDefaults = + resource: group: version: kind: + catAttrs "default" ( + filter ( + default: + (default.resource == null || default.resource == resource) + && (default.group == null || default.group == group) + && (default.version == null || default.version == version) + && (default.kind == null || default.kind == kind) + ) config.defaults + ); + + types = lib.types // rec { + str = mkOptionType { + name = "str"; + description = "string"; + check = isString; + merge = mergeEqualOption; + }; + + # Either value of type `finalType` or `coercedType`, the latter is + # converted to `finalType` using `coerceFunc`. + coercedTo = + coercedType: coerceFunc: finalType: + mkOptionType rec { + inherit (finalType) getSubOptions getSubModules; + + name = "coercedTo"; + description = "${finalType.description} or ${coercedType.description}"; + check = x: finalType.check x || coercedType.check x; + merge = + loc: defs: + let + coerceVal = + val: + if finalType.check val then + val + else + let + coerced = coerceFunc val; + in + assert finalType.check coerced; + coerced; + in + finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs); + substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); + typeMerge = t1: t2: null; + functor = (defaultFunctor name) // { + wrapped = finalType; + }; + }; + }; + + mkOptionDefault = mkOverride 1001; + + mergeValuesByKey = + attrMergeKey: listMergeKeys: values: + listToAttrs ( + imap0 ( + i: value: + nameValuePair ( + if hasAttr attrMergeKey value then + if isAttrs value.${attrMergeKey} then + toString value.${attrMergeKey}.content + else + (toString value.${attrMergeKey}) + else + # generate merge key for list elements if it's not present + "__kubenix_list_merge_key_" + + (concatStringsSep "" ( + map ( + key: if isAttrs value.${key} then toString value.${key}.content else (toString value.${key}) + ) listMergeKeys + )) + ) (value // { _priority = i; }) + ) values + ); + + submoduleOf = + ref: + types.submodule ( + { name, ... }: + { + options = definitions."${ref}".options or { }; + config = definitions."${ref}".config or { }; + } + ); + + globalSubmoduleOf = + ref: + types.submodule ( + { name, ... }: + { + options = config.definitions."${ref}".options or { }; + config = config.definitions."${ref}".config or { }; + } + ); + + submoduleWithMergeOf = + ref: mergeKey: + types.submodule ( + { name, ... }: + let + convertName = + name: if definitions."${ref}".options.${mergeKey}.type == types.int then toInt name else name; + in + { + options = definitions."${ref}".options // { + # position in original array + _priority = mkOption { + type = types.nullOr types.int; + default = null; + }; + }; + config = definitions."${ref}".config // { + ${mergeKey} = mkOverride 1002 ( + # use name as mergeKey only if it is not coming from mergeValuesByKey + if (!hasPrefix "__kubenix_list_merge_key_" name) then convertName name else null + ); + }; + } + ); + + submoduleForDefinition = + ref: resource: kind: group: version: + let + apiVersion = if group == "core" then version else "${group}/${version}"; + in + types.submodule ( + { name, ... }: + { + inherit (definitions."${ref}") options; + + imports = getDefaults resource group version kind; + config = mkMerge [ + definitions."${ref}".config + { + kind = mkOptionDefault kind; + apiVersion = mkOptionDefault apiVersion; + + # metdata.name cannot use option default, due deep config + metadata.name = mkOptionDefault name; + } + ]; + } + ); + + coerceAttrsOfSubmodulesToListByKey = + ref: attrMergeKey: listMergeKeys: + (types.coercedTo (types.listOf (submoduleOf ref)) (mergeValuesByKey attrMergeKey listMergeKeys) ( + types.attrsOf (submoduleWithMergeOf ref attrMergeKey) + )); + + definitions = { + "cilium.io.v2.CiliumClusterwideNetworkPolicy" = { + options = { + "apiVersion" = mkOption { + 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 = types.nullOr types.str; + }; + "kind" = mkOption { + 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 = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"; + }; + "spec" = mkOption { + description = "Spec is the desired Cilium specific rule specification."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpec"); + }; + "specs" = mkOption { + description = "Specs is a list of desired Cilium specific rule specification."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecs")); + }; + "status" = mkOption { + description = "Status is the status of the Cilium policy rule. \n The reason this field exists in this structure is due a bug in the k8s code-generator that doesn't create a `UpdateStatus` method because the field does not exist in the structure."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "spec" = mkOverride 1002 null; + "specs" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpec" = { + options = { + "description" = mkOption { + description = "Description is a free form string, it can be used by the creator of the rule to store human readable explanation of the purpose of this rule. Rules cannot be identified by comment."; + type = types.nullOr types.str; + }; + "egress" = mkOption { + description = "Egress is a list of EgressRule which are enforced at egress. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgress") + ); + }; + "egressDeny" = mkOption { + description = "EgressDeny is a list of EgressDenyRule which are enforced at egress. Any rule inserted here will be denied regardless of the allowed egress rules in the 'egress' field. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDeny") + ); + }; + "enableDefaultDeny" = mkOption { + description = "EnableDefaultDeny determines whether this policy configures the subject endpoint(s) to have a default deny mode. If enabled, this causes all traffic not explicitly allowed by a network policy to be dropped. \n If not specified, the default is true for each traffic direction that has rules, and false otherwise. For example, if a policy only has Ingress or IngressDeny rules, then the default for ingress is true and egress is false. \n If multiple policies apply to an endpoint, that endpoint's default deny will be enabled if any policy requests it. \n This is useful for creating broad-based network policies that will not cause endpoints to enter default-deny mode."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEnableDefaultDeny" + ); + }; + "endpointSelector" = mkOption { + description = "EndpointSelector selects all endpoints which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEndpointSelector"); + }; + "ingress" = mkOption { + description = "Ingress is a list of IngressRule which are enforced at ingress. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngress") + ); + }; + "ingressDeny" = mkOption { + description = "IngressDeny is a list of IngressDenyRule which are enforced at ingress. Any rule inserted here will be denied regardless of the allowed ingress rules in the 'ingress' field. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDeny") + ); + }; + "labels" = mkOption { + description = "Labels is a list of optional strings which can be used to re-identify the rule or to store metadata. It is possible to lookup or delete strings based on labels. Labels are not required to be unique, multiple rules can have overlapping or identical labels."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecLabels") + ); + }; + "nodeSelector" = mkOption { + description = "NodeSelector selects all nodes which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive. Can only be used in CiliumClusterwideNetworkPolicies."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecNodeSelector"); + }; + }; + + config = { + "description" = mkOverride 1002 null; + "egress" = mkOverride 1002 null; + "egressDeny" = mkOverride 1002 null; + "enableDefaultDeny" = mkOverride 1002 null; + "endpointSelector" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + "ingressDeny" = mkOverride 1002 null; + "labels" = mkOverride 1002 null; + "nodeSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressAuthentication" + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is allowed to initiate type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressIcmps") + ); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toFQDNs" = mkOption { + description = "ToFQDN allows whitelisting DNS names in place of IPs. The IPs that result from DNS resolution of `ToFQDN.MatchName`s are added to the same EgressRule object as ToCIDRSet entries, and behave accordingly. Any L4 and L7 rules within this EgressRule will also apply to these IPs. The DNS -> IP mapping is re-resolved periodically from within the cilium-agent, and the IPs in the DNS response are effected in the policy for selected pods as-is (i.e. the list of IPs is not modified in any way). Note: An explicit rule to allow for DNS traffic is needed for the pods, as ToFQDN counts as an egress rule and will enforce egress policy when PolicyEnforcment=default. Note: If the resolved IPs are IPs within the kubernetes cluster, the ToFQDN rule will not apply to that IP. Note: ToFQDN cannot occur in the same policy as other To* rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToFQDNs") + ); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServices") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toFQDNs" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDeny" = { + options = { + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is not allowed to initiate type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyIcmps") + ); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is not allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServices") + ); + }; + }; + + config = { + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sService" + ); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToFQDNs" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsListener" + ); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRules" + ); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sService" + ); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEgressToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEnableDefaultDeny" = { + options = { + "egress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to egress traffic."; + type = types.nullOr types.bool; + }; + "ingress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to ingress traffic."; + type = types.nullOr types.bool; + }; + }; + + config = { + "egress" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEndpointSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEndpointSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecEndpointSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressAuthentication" + ); + }; + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPorts") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDeny" = { + options = { + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyToPorts") + ); + }; + }; + + config = { + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsListener" + ); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRules" + ); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecIngressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecLabels" = { + options = { + "key" = mkOption { + description = ""; + type = types.str; + }; + "source" = mkOption { + description = "Source can be one of the above values (e.g.: LabelSourceContainer)."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "source" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecNodeSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecNodeSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecNodeSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecs" = { + options = { + "description" = mkOption { + description = "Description is a free form string, it can be used by the creator of the rule to store human readable explanation of the purpose of this rule. Rules cannot be identified by comment."; + type = types.nullOr types.str; + }; + "egress" = mkOption { + description = "Egress is a list of EgressRule which are enforced at egress. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgress") + ); + }; + "egressDeny" = mkOption { + description = "EgressDeny is a list of EgressDenyRule which are enforced at egress. Any rule inserted here will be denied regardless of the allowed egress rules in the 'egress' field. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDeny") + ); + }; + "enableDefaultDeny" = mkOption { + description = "EnableDefaultDeny determines whether this policy configures the subject endpoint(s) to have a default deny mode. If enabled, this causes all traffic not explicitly allowed by a network policy to be dropped. \n If not specified, the default is true for each traffic direction that has rules, and false otherwise. For example, if a policy only has Ingress or IngressDeny rules, then the default for ingress is true and egress is false. \n If multiple policies apply to an endpoint, that endpoint's default deny will be enabled if any policy requests it. \n This is useful for creating broad-based network policies that will not cause endpoints to enter default-deny mode."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEnableDefaultDeny" + ); + }; + "endpointSelector" = mkOption { + description = "EndpointSelector selects all endpoints which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEndpointSelector" + ); + }; + "ingress" = mkOption { + description = "Ingress is a list of IngressRule which are enforced at ingress. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngress") + ); + }; + "ingressDeny" = mkOption { + description = "IngressDeny is a list of IngressDenyRule which are enforced at ingress. Any rule inserted here will be denied regardless of the allowed ingress rules in the 'ingress' field. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDeny") + ); + }; + "labels" = mkOption { + description = "Labels is a list of optional strings which can be used to re-identify the rule or to store metadata. It is possible to lookup or delete strings based on labels. Labels are not required to be unique, multiple rules can have overlapping or identical labels."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsLabels") + ); + }; + "nodeSelector" = mkOption { + description = "NodeSelector selects all nodes which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive. Can only be used in CiliumClusterwideNetworkPolicies."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsNodeSelector"); + }; + }; + + config = { + "description" = mkOverride 1002 null; + "egress" = mkOverride 1002 null; + "egressDeny" = mkOverride 1002 null; + "enableDefaultDeny" = mkOverride 1002 null; + "endpointSelector" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + "ingressDeny" = mkOverride 1002 null; + "labels" = mkOverride 1002 null; + "nodeSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressAuthentication" + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is allowed to initiate type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressIcmps") + ); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toFQDNs" = mkOption { + description = "ToFQDN allows whitelisting DNS names in place of IPs. The IPs that result from DNS resolution of `ToFQDN.MatchName`s are added to the same EgressRule object as ToCIDRSet entries, and behave accordingly. Any L4 and L7 rules within this EgressRule will also apply to these IPs. The DNS -> IP mapping is re-resolved periodically from within the cilium-agent, and the IPs in the DNS response are effected in the policy for selected pods as-is (i.e. the list of IPs is not modified in any way). Note: An explicit rule to allow for DNS traffic is needed for the pods, as ToFQDN counts as an egress rule and will enforce egress policy when PolicyEnforcment=default. Note: If the resolved IPs are IPs within the kubernetes cluster, the ToFQDN rule will not apply to that IP. Note: ToFQDN cannot occur in the same policy as other To* rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToFQDNs") + ); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServices") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toFQDNs" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDeny" = { + options = { + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is not allowed to initiate type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyIcmps") + ); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is not allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServices") + ); + }; + }; + + config = { + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sService" + ); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToFQDNs" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsListener" + ); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRules" + ); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sService" + ); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEnableDefaultDeny" = { + options = { + "egress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to egress traffic."; + type = types.nullOr types.bool; + }; + "ingress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to ingress traffic."; + type = types.nullOr types.bool; + }; + }; + + config = { + "egress" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEndpointSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEndpointSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsEndpointSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressAuthentication" + ); + }; + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPorts") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDeny" = { + options = { + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromEndpoints" + ) + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyToPorts") + ); + }; + }; + + config = { + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromGroupsAws" + ); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsListener" + ); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRules" + ); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesKafka" + ) + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsIngressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsLabels" = { + options = { + "key" = mkOption { + description = ""; + type = types.str; + }; + "source" = mkOption { + description = "Source can be one of the above values (e.g.: LabelSourceContainer)."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "source" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsNodeSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsNodeSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicySpecsNodeSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumClusterwideNetworkPolicyStatusConditions") + ); + }; + "derivativePolicies" = mkOption { + description = "DerivativePolicies is the status of all policies derived from the Cilium policy"; + type = types.nullOr (types.attrsOf types.attrs); + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "derivativePolicies" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumClusterwideNetworkPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "The last time the condition transitioned from one status to another."; + type = types.nullOr types.str; + }; + "message" = mkOption { + description = "A human readable message indicating details about the transition."; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "The reason for the condition's last transition."; + type = types.nullOr types.str; + }; + "status" = mkOption { + description = "The status of the condition, one of True, False, or Unknown"; + type = types.str; + }; + "type" = mkOption { + description = "The type of the policy condition"; + type = types.str; + }; + }; + + config = { + "lastTransitionTime" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicy" = { + options = { + "apiVersion" = mkOption { + 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 = types.nullOr types.str; + }; + "kind" = mkOption { + 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 = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"; + }; + "spec" = mkOption { + description = "Spec is the desired Cilium specific rule specification."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpec"); + }; + "specs" = mkOption { + description = "Specs is a list of desired Cilium specific rule specification."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecs")); + }; + "status" = mkOption { + description = "Status is the status of the Cilium policy rule"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "spec" = mkOverride 1002 null; + "specs" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpec" = { + options = { + "description" = mkOption { + description = "Description is a free form string, it can be used by the creator of the rule to store human readable explanation of the purpose of this rule. Rules cannot be identified by comment."; + type = types.nullOr types.str; + }; + "egress" = mkOption { + description = "Egress is a list of EgressRule which are enforced at egress. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgress")); + }; + "egressDeny" = mkOption { + description = "EgressDeny is a list of EgressDenyRule which are enforced at egress. Any rule inserted here will be denied regardless of the allowed egress rules in the 'egress' field. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDeny")); + }; + "enableDefaultDeny" = mkOption { + description = "EnableDefaultDeny determines whether this policy configures the subject endpoint(s) to have a default deny mode. If enabled, this causes all traffic not explicitly allowed by a network policy to be dropped. \n If not specified, the default is true for each traffic direction that has rules, and false otherwise. For example, if a policy only has Ingress or IngressDeny rules, then the default for ingress is true and egress is false. \n If multiple policies apply to an endpoint, that endpoint's default deny will be enabled if any policy requests it. \n This is useful for creating broad-based network policies that will not cause endpoints to enter default-deny mode."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEnableDefaultDeny"); + }; + "endpointSelector" = mkOption { + description = "EndpointSelector selects all endpoints which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEndpointSelector"); + }; + "ingress" = mkOption { + description = "Ingress is a list of IngressRule which are enforced at ingress. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngress")); + }; + "ingressDeny" = mkOption { + description = "IngressDeny is a list of IngressDenyRule which are enforced at ingress. Any rule inserted here will be denied regardless of the allowed ingress rules in the 'ingress' field. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDeny")); + }; + "labels" = mkOption { + description = "Labels is a list of optional strings which can be used to re-identify the rule or to store metadata. It is possible to lookup or delete strings based on labels. Labels are not required to be unique, multiple rules can have overlapping or identical labels."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecLabels")); + }; + "nodeSelector" = mkOption { + description = "NodeSelector selects all nodes which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive. Can only be used in CiliumClusterwideNetworkPolicies."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecNodeSelector"); + }; + }; + + config = { + "description" = mkOverride 1002 null; + "egress" = mkOverride 1002 null; + "egressDeny" = mkOverride 1002 null; + "enableDefaultDeny" = mkOverride 1002 null; + "endpointSelector" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + "ingressDeny" = mkOverride 1002 null; + "labels" = mkOverride 1002 null; + "nodeSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressAuthentication"); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is allowed to initiate type 8 ICMP connections."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressIcmps")); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toFQDNs" = mkOption { + description = "ToFQDN allows whitelisting DNS names in place of IPs. The IPs that result from DNS resolution of `ToFQDN.MatchName`s are added to the same EgressRule object as ToCIDRSet entries, and behave accordingly. Any L4 and L7 rules within this EgressRule will also apply to these IPs. The DNS -> IP mapping is re-resolved periodically from within the cilium-agent, and the IPs in the DNS response are effected in the policy for selected pods as-is (i.e. the list of IPs is not modified in any way). Note: An explicit rule to allow for DNS traffic is needed for the pods, as ToFQDN counts as an egress rule and will enforce egress policy when PolicyEnforcment=default. Note: If the resolved IPs are IPs within the kubernetes cluster, the ToFQDN rule will not apply to that IP. Note: ToFQDN cannot occur in the same policy as other To* rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToFQDNs") + ); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToServices") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toFQDNs" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDeny" = { + options = { + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is not allowed to initiate type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyIcmps") + ); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is not allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServices") + ); + }; + }; + + config = { + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToNodesMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sService" + ); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToEndpointsMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToFQDNs" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToNodesMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsListener"); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsOriginatingTLS"); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRules"); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsTerminatingTLS"); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToRequiresMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sService"); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEgressToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEnableDefaultDeny" = { + options = { + "egress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to egress traffic."; + type = types.nullOr types.bool; + }; + "ingress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to ingress traffic."; + type = types.nullOr types.bool; + }; + }; + + config = { + "egress" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEndpointSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecEndpointSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecEndpointSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressAuthentication"); + }; + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming type 8 ICMP connections."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressIcmps")); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPorts") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDeny" = { + options = { + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyToPorts") + ); + }; + }; + + config = { + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromNodesMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressFromRequiresMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsListener"); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRules"); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecIngressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecLabels" = { + options = { + "key" = mkOption { + description = ""; + type = types.str; + }; + "source" = mkOption { + description = "Source can be one of the above values (e.g.: LabelSourceContainer)."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "source" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecNodeSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecNodeSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecNodeSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecs" = { + options = { + "description" = mkOption { + description = "Description is a free form string, it can be used by the creator of the rule to store human readable explanation of the purpose of this rule. Rules cannot be identified by comment."; + type = types.nullOr types.str; + }; + "egress" = mkOption { + description = "Egress is a list of EgressRule which are enforced at egress. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgress")); + }; + "egressDeny" = mkOption { + description = "EgressDeny is a list of EgressDenyRule which are enforced at egress. Any rule inserted here will be denied regardless of the allowed egress rules in the 'egress' field. If omitted or empty, this rule does not apply at egress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDeny")); + }; + "enableDefaultDeny" = mkOption { + description = "EnableDefaultDeny determines whether this policy configures the subject endpoint(s) to have a default deny mode. If enabled, this causes all traffic not explicitly allowed by a network policy to be dropped. \n If not specified, the default is true for each traffic direction that has rules, and false otherwise. For example, if a policy only has Ingress or IngressDeny rules, then the default for ingress is true and egress is false. \n If multiple policies apply to an endpoint, that endpoint's default deny will be enabled if any policy requests it. \n This is useful for creating broad-based network policies that will not cause endpoints to enter default-deny mode."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEnableDefaultDeny"); + }; + "endpointSelector" = mkOption { + description = "EndpointSelector selects all endpoints which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEndpointSelector"); + }; + "ingress" = mkOption { + description = "Ingress is a list of IngressRule which are enforced at ingress. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngress")); + }; + "ingressDeny" = mkOption { + description = "IngressDeny is a list of IngressDenyRule which are enforced at ingress. Any rule inserted here will be denied regardless of the allowed ingress rules in the 'ingress' field. If omitted or empty, this rule does not apply at ingress."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDeny")); + }; + "labels" = mkOption { + description = "Labels is a list of optional strings which can be used to re-identify the rule or to store metadata. It is possible to lookup or delete strings based on labels. Labels are not required to be unique, multiple rules can have overlapping or identical labels."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsLabels")); + }; + "nodeSelector" = mkOption { + description = "NodeSelector selects all nodes which should be subject to this rule. EndpointSelector and NodeSelector cannot be both empty and are mutually exclusive. Can only be used in CiliumClusterwideNetworkPolicies."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsNodeSelector"); + }; + }; + + config = { + "description" = mkOverride 1002 null; + "egress" = mkOverride 1002 null; + "egressDeny" = mkOverride 1002 null; + "enableDefaultDeny" = mkOverride 1002 null; + "endpointSelector" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + "ingressDeny" = mkOverride 1002 null; + "labels" = mkOverride 1002 null; + "nodeSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressAuthentication"); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is allowed to initiate type 8 ICMP connections."; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressIcmps")); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toFQDNs" = mkOption { + description = "ToFQDN allows whitelisting DNS names in place of IPs. The IPs that result from DNS resolution of `ToFQDN.MatchName`s are added to the same EgressRule object as ToCIDRSet entries, and behave accordingly. Any L4 and L7 rules within this EgressRule will also apply to these IPs. The DNS -> IP mapping is re-resolved periodically from within the cilium-agent, and the IPs in the DNS response are effected in the policy for selected pods as-is (i.e. the list of IPs is not modified in any way). Note: An explicit rule to allow for DNS traffic is needed for the pods, as ToFQDN counts as an egress rule and will enforce egress policy when PolicyEnforcment=default. Note: If the resolved IPs are IPs within the kubernetes cluster, the ToFQDN rule will not apply to that IP. Note: ToFQDN cannot occur in the same policy as other To* rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToFQDNs") + ); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServices") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toFQDNs" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDeny" = { + options = { + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"app=httpd\" is not allowed to initiate type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyIcmps") + ); + }; + "toCIDR" = mkOption { + description = "ToCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections. Only connections destined for outside of the cluster and not targeting the host will be subject to CIDR rules. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24"; + type = types.nullOr (types.listOf types.str); + }; + "toCIDRSet" = mkOption { + description = "ToCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to initiate connections to in addition to connections which are allowed via ToEndpoints, along with a list of subnets contained within their corresponding IP block to which traffic should not be allowed. This will match on the destination IP address of outgoing connections. Adding a prefix into ToCIDR or into ToCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between ToCIDR and ToCIDRSet. \n Example: Any endpoint with the label \"app=database-proxy\" is allowed to initiate connections to 10.2.3.0/24 except from IPs in subnet 10.2.3.0/28."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToCIDRSet") + ); + }; + "toEndpoints" = mkOption { + description = "ToEndpoints is a list of endpoints identified by an EndpointSelector to which the endpoints subject to the rule are allowed to communicate. \n Example: Any endpoint with the label \"role=frontend\" can communicate with any endpoint carrying the label \"role=backend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToEndpoints") + ); + }; + "toEntities" = mkOption { + description = "ToEntities is a list of special entities to which the endpoint subject to the rule is allowed to initiate connections. Supported entities are `world`, `cluster`,`host`,`remote-node`,`kube-apiserver`, `init`, `health`,`unmanaged` and `all`."; + type = types.nullOr (types.listOf types.str); + }; + "toGroups" = mkOption { + description = "ToGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: toGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToGroups") + ); + }; + "toNodes" = mkOption { + description = "ToNodes is a list of nodes identified by an EndpointSelector to which endpoints subject to the rule is allowed to communicate."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToNodes") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to connect to. \n Example: Any endpoint with the label \"role=frontend\" is not allowed to initiate connections to destination port 8080/tcp"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToPorts") + ); + }; + "toRequires" = mkOption { + description = "ToRequires is a list of additional constraints which must be met in order for the selected endpoints to be able to connect to other endpoints. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching ToEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires any endpoint to which it communicates to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToRequires") + ); + }; + "toServices" = mkOption { + description = "ToServices is a list of services to which the endpoint subject to the rule is allowed to initiate connections. Currently Cilium only supports toServices for K8s services without selectors. \n Example: Any endpoint with the label \"app=backend-app\" is allowed to initiate connections to all cidrs backing the \"external-service\" service"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServices") + ); + }; + }; + + config = { + "icmps" = mkOverride 1002 null; + "toCIDR" = mkOverride 1002 null; + "toCIDRSet" = mkOverride 1002 null; + "toEndpoints" = mkOverride 1002 null; + "toEntities" = mkOverride 1002 null; + "toGroups" = mkOverride 1002 null; + "toNodes" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + "toRequires" = mkOverride 1002 null; + "toServices" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToNodesMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sService" + ); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressDenyToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToEndpointsMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToFQDNs" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToNodesMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsListener"); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRules"); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToRequiresMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServices" = { + options = { + "k8sService" = mkOption { + description = "K8sService selects service by name and namespace pair"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sService"); + }; + "k8sServiceSelector" = mkOption { + description = "K8sServiceSelector selects services by k8s labels and namespace"; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sServiceSelector" + ); + }; + }; + + config = { + "k8sService" = mkOverride 1002 null; + "k8sServiceSelector" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sService" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "serviceName" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + "serviceName" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sServiceSelector" = { + options = { + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "ServiceSelector is a label selector for k8s services"; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelector"; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEgressToServicesK8sServiceSelectorSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEnableDefaultDeny" = { + options = { + "egress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to egress traffic."; + type = types.nullOr types.bool; + }; + "ingress" = mkOption { + description = "Whether or not the endpoint should have a default-deny rule applied to ingress traffic."; + type = types.nullOr types.bool; + }; + }; + + config = { + "egress" = mkOverride 1002 null; + "ingress" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEndpointSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsEndpointSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsEndpointSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngress" = { + options = { + "authentication" = mkOption { + description = "Authentication is the required authentication type for the allowed traffic, if any."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressAuthentication"); + }; + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can only accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPorts") + ); + }; + }; + + config = { + "authentication" = mkOverride 1002 null; + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressAuthentication" = { + options = { + "mode" = mkOption { + description = "Mode is the required authentication mode for the allowed traffic, if any."; + type = types.str; + }; + }; + + config = { }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDeny" = { + options = { + "fromCIDR" = mkOption { + description = "FromCIDR is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from. Only connections which do *not* originate from the cluster or from the local host are subject to CIDR rules. In order to allow in-cluster connectivity, use the FromEndpoints field. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.3.9.1"; + type = types.nullOr (types.listOf types.str); + }; + "fromCIDRSet" = mkOption { + description = "FromCIDRSet is a list of IP blocks which the endpoint subject to the rule is allowed to receive connections from in addition to FromEndpoints, along with a list of subnets contained within their corresponding IP block from which traffic should not be allowed. This will match on the source IP address of incoming connections. Adding a prefix into FromCIDR or into FromCIDRSet with no ExcludeCIDRs is equivalent. Overlaps are allowed between FromCIDR and FromCIDRSet. \n Example: Any endpoint with the label \"app=my-legacy-pet\" is allowed to receive connections from 10.0.0.0/8 except from IPs in subnet 10.96.0.0/12."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromCIDRSet") + ); + }; + "fromEndpoints" = mkOption { + description = "FromEndpoints is a list of endpoints identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule. \n Example: Any endpoint with the label \"role=backend\" can be consumed by any endpoint carrying the label \"role=frontend\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromEndpoints") + ); + }; + "fromEntities" = mkOption { + description = "FromEntities is a list of special entities which the endpoint subject to the rule is allowed to receive connections from. Supported entities are `world`, `cluster` and `host`"; + type = types.nullOr (types.listOf types.str); + }; + "fromGroups" = mkOption { + description = "FromGroups is a directive that allows the integration with multiple outside providers. Currently, only AWS is supported, and the rule can select by multiple sub directives: \n Example: FromGroups: - aws: securityGroupsIds: - 'sg-XXXXXXXXXXXXX'"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromGroups") + ); + }; + "fromNodes" = mkOption { + description = "FromNodes is a list of nodes identified by an EndpointSelector which are allowed to communicate with the endpoint subject to the rule."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromNodes") + ); + }; + "fromRequires" = mkOption { + description = "FromRequires is a list of additional constraints which must be met in order for the selected endpoints to be reachable. These additional constraints do no by itself grant access privileges and must always be accompanied with at least one matching FromEndpoints. \n Example: Any Endpoint with the label \"team=A\" requires consuming endpoint to also carry the label \"team=A\"."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromRequires") + ); + }; + "icmps" = mkOption { + description = "ICMPs is a list of ICMP rule identified by type number which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming type 8 ICMP connections."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyIcmps") + ); + }; + "toPorts" = mkOption { + description = "ToPorts is a list of destination ports identified by port number and protocol which the endpoint subject to the rule is not allowed to receive connections on. \n Example: Any endpoint with the label \"app=httpd\" can not accept incoming connections on port 80/tcp."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyToPorts") + ); + }; + }; + + config = { + "fromCIDR" = mkOverride 1002 null; + "fromCIDRSet" = mkOverride 1002 null; + "fromEndpoints" = mkOverride 1002 null; + "fromEntities" = mkOverride 1002 null; + "fromGroups" = mkOverride 1002 null; + "fromNodes" = mkOverride 1002 null; + "fromRequires" = mkOverride 1002 null; + "icmps" = mkOverride 1002 null; + "toPorts" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromNodesMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyToPorts" = { + options = { + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyToPortsPorts") + ); + }; + }; + + config = { + "ports" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressDenyToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromCIDRSet" = { + options = { + "cidr" = mkOption { + description = "CIDR is a CIDR prefix / IP Block."; + type = types.nullOr types.str; + }; + "cidrGroupRef" = mkOption { + description = "CIDRGroupRef is a reference to a CiliumCIDRGroup object. A CiliumCIDRGroup contains a list of CIDRs that the endpoint, subject to the rule, can (Ingress/Egress) or cannot (IngressDeny/EgressDeny) receive connections from."; + type = types.nullOr types.str; + }; + "except" = mkOption { + description = "ExceptCIDRs is a list of IP blocks which the endpoint subject to the rule is not allowed to initiate connections to. These CIDR prefixes should be contained within Cidr, using ExceptCIDRs together with CIDRGroupRef is not supported yet. These exceptions are only applied to the Cidr in this CIDRRule, and do not apply to any other CIDR prefixes in any other CIDRRules."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "cidr" = mkOverride 1002 null; + "cidrGroupRef" = mkOverride 1002 null; + "except" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromEndpoints" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromEndpointsMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromEndpointsMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromGroups" = { + options = { + "aws" = mkOption { + description = "AWSGroup is an structure that can be used to whitelisting information from AWS integration"; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromGroupsAws"); + }; + }; + + config = { + "aws" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromGroupsAws" = { + options = { + "labels" = mkOption { + description = ""; + type = types.nullOr (types.attrsOf types.str); + }; + "region" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "securityGroupsIds" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "securityGroupsNames" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "labels" = mkOverride 1002 null; + "region" = mkOverride 1002 null; + "securityGroupsIds" = mkOverride 1002 null; + "securityGroupsNames" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromNodes" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromNodesMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromNodesMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromRequires" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromRequiresMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressFromRequiresMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressIcmps" = { + options = { + "fields" = mkOption { + description = "Fields is a list of ICMP fields."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressIcmpsFields") + ); + }; + }; + + config = { + "fields" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressIcmpsFields" = { + options = { + "family" = mkOption { + description = "Family is a IP address version. Currently, we support `IPv4` and `IPv6`. `IPv4` is set as default."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type is a ICMP-type. It should be an 8bit code (0-255), or it's CamelCase name (for example, \"EchoReply\"). Allowed ICMP types are: Ipv4: EchoReply | DestinationUnreachable | Redirect | Echo | EchoRequest | RouterAdvertisement | RouterSelection | TimeExceeded | ParameterProblem | Timestamp | TimestampReply | Photuris | ExtendedEcho Request | ExtendedEcho Reply Ipv6: DestinationUnreachable | PacketTooBig | TimeExceeded | ParameterProblem | EchoRequest | EchoReply | MulticastListenerQuery| MulticastListenerReport | MulticastListenerDone | RouterSolicitation | RouterAdvertisement | NeighborSolicitation | NeighborAdvertisement | RedirectMessage | RouterRenumbering | ICMPNodeInformationQuery | ICMPNodeInformationResponse | InverseNeighborDiscoverySolicitation | InverseNeighborDiscoveryAdvertisement | HomeAgentAddressDiscoveryRequest | HomeAgentAddressDiscoveryReply | MobilePrefixSolicitation | MobilePrefixAdvertisement | DuplicateAddressRequestCodeSuffix | DuplicateAddressConfirmationCodeSuffix | ExtendedEchoRequest | ExtendedEchoReply"; + type = types.int; + }; + }; + + config = { + "family" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPorts" = { + options = { + "listener" = mkOption { + description = "listener specifies the name of a custom Envoy listener to which this traffic should be redirected to."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsListener"); + }; + "originatingTLS" = mkOption { + description = "OriginatingTLS is the TLS context for the connections originated by the L7 proxy. For egress policy this specifies the client-side TLS parameters for the upstream connection originating from the L7 proxy to the remote destination. For ingress policy this specifies the client-side TLS parameters for the connection from the L7 proxy to the local endpoint."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsOriginatingTLS" + ); + }; + "ports" = mkOption { + description = "Ports is a list of L4 port/protocol"; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsPorts") + ); + }; + "rules" = mkOption { + description = "Rules is a list of additional port level rules which must be met in order for the PortRule to allow the traffic. If omitted or empty, no layer 7 rules are enforced."; + type = types.nullOr (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRules"); + }; + "serverNames" = mkOption { + description = "ServerNames is a list of allowed TLS SNI values. If not empty, then TLS must be present and one of the provided SNIs must be indicated in the TLS handshake."; + type = types.nullOr (types.listOf types.str); + }; + "terminatingTLS" = mkOption { + description = "TerminatingTLS is the TLS context for the connection terminated by the L7 proxy. For egress policy this specifies the server-side TLS parameters to be applied on the connections originated from the local endpoint and terminated by the L7 proxy. For ingress policy this specifies the server-side TLS parameters to be applied on the connections originated from a remote source and terminated by the L7 proxy."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsTerminatingTLS" + ); + }; + }; + + config = { + "listener" = mkOverride 1002 null; + "originatingTLS" = mkOverride 1002 null; + "ports" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "serverNames" = mkOverride 1002 null; + "terminatingTLS" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsListener" = { + options = { + "envoyConfig" = mkOption { + description = "EnvoyConfig is a reference to the CEC or CCEC resource in which the listener is defined."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsListenerEnvoyConfig"; + }; + "name" = mkOption { + description = "Name is the name of the listener."; + type = types.str; + }; + "priority" = mkOption { + description = "Priority for this Listener that is used when multiple rules would apply different listeners to a policy map entry. Behavior of this is implementation dependent."; + type = types.nullOr types.int; + }; + }; + + config = { + "priority" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsListenerEnvoyConfig" = { + options = { + "kind" = mkOption { + description = "Kind is the resource type being referred to. Defaults to CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig for CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy, respectively. The only case this is currently explicitly needed is when referring to a CiliumClusterwideEnvoyConfig from CiliumNetworkPolicy, as using a namespaced listener from a cluster scoped policy is not allowed."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name is the resource name of the CiliumEnvoyConfig or CiliumClusterwideEnvoyConfig where the listener is defined in."; + type = types.str; + }; + }; + + config = { + "kind" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsOriginatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsOriginatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsOriginatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsPorts" = { + options = { + "endPort" = mkOption { + description = "EndPort can only be an L4 port number."; + type = types.nullOr types.int; + }; + "port" = mkOption { + description = "Port can be an L4 port number, or a name in the form of \"http\" or \"http-8080\"."; + type = types.str; + }; + "protocol" = mkOption { + description = "Protocol is the L4 protocol. If omitted or empty, any protocol matches. Accepted values: \"TCP\", \"UDP\", \"SCTP\", \"ANY\" \n Matching on ICMP is not supported. \n Named port specified for a container may narrow this down, but may not contradict this."; + type = types.nullOr types.str; + }; + }; + + config = { + "endPort" = mkOverride 1002 null; + "protocol" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRules" = { + options = { + "dns" = mkOption { + description = "DNS-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesDns") + ); + }; + "http" = mkOption { + description = "HTTP specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesHttp") + ); + }; + "kafka" = mkOption { + description = "Kafka-specific rules."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesKafka") + ); + }; + "l7" = mkOption { + description = "Key-value pair rules."; + type = types.nullOr (types.listOf types.attrs); + }; + "l7proto" = mkOption { + description = "Name of the L7 protocol for which the Key-value pair rules apply."; + type = types.nullOr types.str; + }; + }; + + config = { + "dns" = mkOverride 1002 null; + "http" = mkOverride 1002 null; + "kafka" = mkOverride 1002 null; + "l7" = mkOverride 1002 null; + "l7proto" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesDns" = { + options = { + "matchName" = mkOption { + description = "MatchName matches literal DNS names. A trailing \".\" is automatically added when missing."; + type = types.nullOr types.str; + }; + "matchPattern" = mkOption { + description = "MatchPattern allows using wildcards to match DNS names. All wildcards are case insensitive. The wildcards are: - \"*\" matches 0 or more DNS valid characters, and may occur anywhere in the pattern. As a special case a \"*\" as the leftmost character, without a following \".\" matches all subdomains as well as the name to the right. A trailing \".\" is automatically added when missing. \n Examples: `*.cilium.io` matches subomains of cilium at that level www.cilium.io and blog.cilium.io match, cilium.io and google.com do not `*cilium.io` matches cilium.io and all subdomains ends with \"cilium.io\" except those containing \".\" separator, subcilium.io and sub-cilium.io match, www.cilium.io and blog.cilium.io does not sub*.cilium.io matches subdomains of cilium where the subdomain component begins with \"sub\" sub.cilium.io and subdomain.cilium.io match, www.cilium.io, blog.cilium.io, cilium.io and google.com do not"; + type = types.nullOr types.str; + }; + }; + + config = { + "matchName" = mkOverride 1002 null; + "matchPattern" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesHttp" = { + options = { + "headerMatches" = mkOption { + description = "HeaderMatches is a list of HTTP headers which must be present and match against the given values. Mismatch field can be used to specify what to do when there is no match."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatches" + "name" + [ ] + ); + apply = attrsToList; + }; + "headers" = mkOption { + description = "Headers is a list of HTTP headers which must be present in the request. If omitted or empty, requests are allowed regardless of headers present."; + type = types.nullOr (types.listOf types.str); + }; + "host" = mkOption { + description = "Host is an extended POSIX regex matched against the host header of a request, e.g. \"foo.com\" \n If omitted or empty, the value of the host header is ignored."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is an extended POSIX regex matched against the method of a request, e.g. \"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\", ... \n If omitted or empty, all methods are allowed."; + type = types.nullOr types.str; + }; + "path" = mkOption { + description = "Path is an extended POSIX regex matched against the path of a request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. \n If omitted or empty, all paths are all allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "headerMatches" = mkOverride 1002 null; + "headers" = mkOverride 1002 null; + "host" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "path" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatches" = { + options = { + "mismatch" = mkOption { + description = "Mismatch identifies what to do in case there is no match. The default is to drop the request. Otherwise the overall rule is still considered as matching, but the mismatches are logged in the access log."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name identifies the header."; + type = types.str; + }; + "secret" = mkOption { + description = "Secret refers to a secret that contains the value to be matched against. The secret must only contain one entry. If the referred secret does not exist, and there is no \"Value\" specified, the match will fail."; + type = types.nullOr ( + submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatchesSecret" + ); + }; + "value" = mkOption { + description = "Value matches the exact value of the header. Can be specified either alone or together with \"Secret\"; will be used as the header value if the secret can not be found in the latter case."; + type = types.nullOr types.str; + }; + }; + + config = { + "mismatch" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesHttpHeaderMatchesSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsRulesKafka" = { + options = { + "apiKey" = mkOption { + description = "APIKey is a case-insensitive string matched against the key of a request, e.g. \"produce\", \"fetch\", \"createtopic\", \"deletetopic\", et al Reference: https://kafka.apache.org/protocol#protocol_api_keys \n If omitted or empty, and if Role is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "apiVersion" = mkOption { + description = "APIVersion is the version matched against the api version of the Kafka message. If set, it has to be a string representing a positive integer. \n If omitted or empty, all versions are allowed."; + type = types.nullOr types.str; + }; + "clientID" = mkOption { + description = "ClientID is the client identifier as provided in the request. \n From Kafka protocol documentation: This is a user supplied identifier for the client application. The user can use any identifier they like and it will be used when logging errors, monitoring aggregates, etc. For example, one might want to monitor not just the requests per second overall, but the number coming from each client application (each of which could reside on multiple servers). This id acts as a logical grouping across all requests from a particular client. \n If omitted or empty, all client identifiers are allowed."; + type = types.nullOr types.str; + }; + "role" = mkOption { + description = "Role is a case-insensitive string and describes a group of API keys necessary to perform certain higher-level Kafka operations such as \"produce\" or \"consume\". A Role automatically expands into all APIKeys required to perform the specified higher-level operation. \n The following values are supported: - \"produce\": Allow producing to the topics specified in the rule - \"consume\": Allow consuming from the topics specified in the rule \n This field is incompatible with the APIKey field, i.e APIKey and Role cannot both be specified in the same rule. \n If omitted or empty, and if APIKey is not specified, then all keys are allowed."; + type = types.nullOr types.str; + }; + "topic" = mkOption { + description = "Topic is the topic name contained in the message. If a Kafka request contains multiple topics, then all topics must be allowed or the message will be rejected. \n This constraint is ignored if the matched request message type doesn't contain any topic. Maximum size of Topic can be 249 characters as per recent Kafka spec and allowed characters are a-z, A-Z, 0-9, -, . and _. \n Older Kafka versions had longer topic lengths of 255, but in Kafka 0.10 version the length was changed from 255 to 249. For compatibility reasons we are using 255. \n If omitted or empty, all topics are allowed."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiKey" = mkOverride 1002 null; + "apiVersion" = mkOverride 1002 null; + "clientID" = mkOverride 1002 null; + "role" = mkOverride 1002 null; + "topic" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsTerminatingTLS" = { + options = { + "certificate" = mkOption { + description = "Certificate is the file name or k8s secret item name for the certificate chain. If omitted, 'tls.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "privateKey" = mkOption { + description = "PrivateKey is the file name or k8s secret item name for the private key matching the certificate chain. If omitted, 'tls.key' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + "secret" = mkOption { + description = "Secret is the secret that contains the certificates and private key for the TLS context. By default, Cilium will search in this secret for the following items: - 'ca.crt' - Which represents the trusted CA to verify remote source. - 'tls.crt' - Which represents the public key certificate. - 'tls.key' - Which represents the private key matching the public key certificate."; + type = submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsTerminatingTLSSecret"; + }; + "trustedCA" = mkOption { + description = "TrustedCA is the file name or k8s secret item name for the trusted CA. If omitted, 'ca.crt' is assumed, if it exists. If given, the item must exist."; + type = types.nullOr types.str; + }; + }; + + config = { + "certificate" = mkOverride 1002 null; + "privateKey" = mkOverride 1002 null; + "trustedCA" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsIngressToPortsTerminatingTLSSecret" = { + options = { + "name" = mkOption { + description = "Name is the name of the secret."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace in which the secret exists. Context of use determines the default value if left out (e.g., \"default\")."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsLabels" = { + options = { + "key" = mkOption { + description = ""; + type = types.str; + }; + "source" = mkOption { + description = "Source can be one of the above values (e.g.: LabelSourceContainer)."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "source" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsNodeSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicySpecsNodeSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + 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 = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicySpecsNodeSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + 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."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "cilium.io.v2.CiliumNetworkPolicyStatusConditions")); + }; + "derivativePolicies" = mkOption { + description = "DerivativePolicies is the status of all policies derived from the Cilium policy"; + type = types.nullOr (types.attrsOf types.attrs); + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "derivativePolicies" = mkOverride 1002 null; + }; + }; + "cilium.io.v2.CiliumNetworkPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "The last time the condition transitioned from one status to another."; + type = types.nullOr types.str; + }; + "message" = mkOption { + description = "A human readable message indicating details about the transition."; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "The reason for the condition's last transition."; + type = types.nullOr types.str; + }; + "status" = mkOption { + description = "The status of the condition, one of True, False, or Unknown"; + type = types.str; + }; + "type" = mkOption { + description = "The type of the policy condition"; + type = types.str; + }; + }; + + config = { + "lastTransitionTime" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + }; +in +{ + # all resource versions + options = { + resources = + { + "cilium.io"."v2"."CiliumClusterwideNetworkPolicy" = mkOption { + description = "CiliumClusterwideNetworkPolicy is a Kubernetes third-party resource with an modified version of CiliumNetworkPolicy which is cluster scoped rather than namespace scoped."; + type = types.attrsOf ( + submoduleForDefinition "cilium.io.v2.CiliumClusterwideNetworkPolicy" + "ciliumclusterwidenetworkpolicies" + "CiliumClusterwideNetworkPolicy" + "cilium.io" + "v2" + ); + default = { }; + }; + "cilium.io"."v2"."CiliumNetworkPolicy" = mkOption { + description = "CiliumNetworkPolicy is a Kubernetes third-party resource with an extended version of NetworkPolicy."; + type = types.attrsOf ( + submoduleForDefinition "cilium.io.v2.CiliumNetworkPolicy" "ciliumnetworkpolicies" + "CiliumNetworkPolicy" + "cilium.io" + "v2" + ); + default = { }; + }; + } + // { + "ciliumClusterwideNetworkPolicies" = mkOption { + description = "CiliumClusterwideNetworkPolicy is a Kubernetes third-party resource with an modified version of CiliumNetworkPolicy which is cluster scoped rather than namespace scoped."; + type = types.attrsOf ( + submoduleForDefinition "cilium.io.v2.CiliumClusterwideNetworkPolicy" + "ciliumclusterwidenetworkpolicies" + "CiliumClusterwideNetworkPolicy" + "cilium.io" + "v2" + ); + default = { }; + }; + "ciliumNetworkPolicies" = mkOption { + description = "CiliumNetworkPolicy is a Kubernetes third-party resource with an extended version of NetworkPolicy."; + type = types.attrsOf ( + submoduleForDefinition "cilium.io.v2.CiliumNetworkPolicy" "ciliumnetworkpolicies" + "CiliumNetworkPolicy" + "cilium.io" + "v2" + ); + default = { }; + }; + }; + }; + + config = { + # expose resource definitions + inherit definitions; + + # register resource types + types = [ + { + name = "ciliumclusterwidenetworkpolicies"; + group = "cilium.io"; + version = "v2"; + kind = "CiliumClusterwideNetworkPolicy"; + attrName = "ciliumClusterwideNetworkPolicies"; + } + { + name = "ciliumnetworkpolicies"; + group = "cilium.io"; + version = "v2"; + kind = "CiliumNetworkPolicy"; + attrName = "ciliumNetworkPolicies"; + } + ]; + + resources = { + "cilium.io"."v2"."CiliumClusterwideNetworkPolicy" = + mkAliasDefinitions + options.resources."ciliumClusterwideNetworkPolicies"; + "cilium.io"."v2"."CiliumNetworkPolicy" = + mkAliasDefinitions + options.resources."ciliumNetworkPolicies"; + }; + + defaults = [ + { + group = "cilium.io"; + version = "v2"; + kind = "CiliumNetworkPolicy"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + ]; + }; +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 00000000..ca1c709e --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,44 @@ +{ lib, ... }: +{ + imports = [ ]; + + config = { + nixidy = { + target = { + repository = "https://gitlab.com/oveanbox/manifests.git"; + branch = "main"; + rootPath = "_build"; + }; + + resourceImports = [ + ./cilium-crd.nix + ./kyverno-crd.nix + ]; + + chartsDir = ../charts; + + defaults = { + syncPolicy = { + autoSync = { + enabled = true; + prune = false; + selfHeal = false; + }; + }; + + # Many helm chars will render all resources with the + # following labels. + # This produces huge diffs when the charts are updated + # because the values of these labels change each release. + # Here we add a transformer that strips them out after + # templating the helm charts in each application. + helm.transformer = map ( + lib.kube.removeLabels [ + "app.kubernetes.io/version" + "helm.sh/chart" + ] + ); + }; + }; + }; +} diff --git a/modules/kyverno-crd.nix b/modules/kyverno-crd.nix new file mode 100644 index 00000000..60fb32d8 --- /dev/null +++ b/modules/kyverno-crd.nix @@ -0,0 +1,44300 @@ +# This file was generated with nixidy CRD generator, do not edit. +{ + lib, + options, + config, + ... +}: +with lib; +let + hasAttrNotNull = attr: set: hasAttr attr set && set.${attr} != null; + + attrsToList = + values: + if values != null then + sort ( + a: b: + if (hasAttrNotNull "_priority" a && hasAttrNotNull "_priority" b) then + a._priority < b._priority + else + false + ) (mapAttrsToList (n: v: v) values) + else + values; + + getDefaults = + resource: group: version: kind: + catAttrs "default" ( + filter ( + default: + (default.resource == null || default.resource == resource) + && (default.group == null || default.group == group) + && (default.version == null || default.version == version) + && (default.kind == null || default.kind == kind) + ) config.defaults + ); + + types = lib.types // rec { + str = mkOptionType { + name = "str"; + description = "string"; + check = isString; + merge = mergeEqualOption; + }; + + # Either value of type `finalType` or `coercedType`, the latter is + # converted to `finalType` using `coerceFunc`. + coercedTo = + coercedType: coerceFunc: finalType: + mkOptionType rec { + inherit (finalType) getSubOptions getSubModules; + + name = "coercedTo"; + description = "${finalType.description} or ${coercedType.description}"; + check = x: finalType.check x || coercedType.check x; + merge = + loc: defs: + let + coerceVal = + val: + if finalType.check val then + val + else + let + coerced = coerceFunc val; + in + assert finalType.check coerced; + coerced; + in + finalType.merge loc (map (def: def // { value = coerceVal def.value; }) defs); + substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m); + typeMerge = t1: t2: null; + functor = (defaultFunctor name) // { + wrapped = finalType; + }; + }; + }; + + mkOptionDefault = mkOverride 1001; + + mergeValuesByKey = + attrMergeKey: listMergeKeys: values: + listToAttrs ( + imap0 ( + i: value: + nameValuePair ( + if hasAttr attrMergeKey value then + if isAttrs value.${attrMergeKey} then + toString value.${attrMergeKey}.content + else + (toString value.${attrMergeKey}) + else + # generate merge key for list elements if it's not present + "__kubenix_list_merge_key_" + + (concatStringsSep "" ( + map ( + key: if isAttrs value.${key} then toString value.${key}.content else (toString value.${key}) + ) listMergeKeys + )) + ) (value // { _priority = i; }) + ) values + ); + + submoduleOf = + ref: + types.submodule ( + { name, ... }: + { + options = definitions."${ref}".options or { }; + config = definitions."${ref}".config or { }; + } + ); + + globalSubmoduleOf = + ref: + types.submodule ( + { name, ... }: + { + options = config.definitions."${ref}".options or { }; + config = config.definitions."${ref}".config or { }; + } + ); + + submoduleWithMergeOf = + ref: mergeKey: + types.submodule ( + { name, ... }: + let + convertName = + name: if definitions."${ref}".options.${mergeKey}.type == types.int then toInt name else name; + in + { + options = definitions."${ref}".options // { + # position in original array + _priority = mkOption { + type = types.nullOr types.int; + default = null; + }; + }; + config = definitions."${ref}".config // { + ${mergeKey} = mkOverride 1002 ( + # use name as mergeKey only if it is not coming from mergeValuesByKey + if (!hasPrefix "__kubenix_list_merge_key_" name) then convertName name else null + ); + }; + } + ); + + submoduleForDefinition = + ref: resource: kind: group: version: + let + apiVersion = if group == "core" then version else "${group}/${version}"; + in + types.submodule ( + { name, ... }: + { + inherit (definitions."${ref}") options; + + imports = getDefaults resource group version kind; + config = mkMerge [ + definitions."${ref}".config + { + kind = mkOptionDefault kind; + apiVersion = mkOptionDefault apiVersion; + + # metdata.name cannot use option default, due deep config + metadata.name = mkOptionDefault name; + } + ]; + } + ); + + coerceAttrsOfSubmodulesToListByKey = + ref: attrMergeKey: listMergeKeys: + (types.coercedTo (types.listOf (submoduleOf ref)) (mergeValuesByKey attrMergeKey listMergeKeys) ( + types.attrsOf (submoduleWithMergeOf ref attrMergeKey) + )); + + definitions = { + "kyverno.io.v1.ClusterPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v1.ClusterPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpec" = { + options = { + "admission" = mkOption { + description = "Admission controls if rules are applied during admission.\nOptional. Default value is \"true\"."; + type = types.nullOr types.bool; + }; + "applyRules" = mkOption { + description = "ApplyRules controls how rules in a policy are applied. Rule are processed in\nthe order of declaration. When set to `One` processing stops after a rule has\nbeen applied i.e. the rule matches and results in a pass, fail, or error. When\nset to `All` all rules in the policy are processed. The default is `All`."; + type = types.nullOr types.str; + }; + "background" = mkOption { + description = "Background controls if rules are applied to existing resources during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "failurePolicy" = mkOption { + description = "FailurePolicy defines how unexpected policy errors and webhook response timeout errors are handled.\nRules within the same policy share the same failure behavior.\nThis field should not be accessed directly, instead `GetFailurePolicy()` should be used.\nAllowed values are Ignore or Fail. Defaults to Fail."; + type = types.nullOr types.str; + }; + "generateExisting" = mkOption { + description = "GenerateExisting controls whether to trigger generate rule in existing resources\nIf is set to \"true\" generate rule will be triggered and applied to existing matched resources.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "generateExistingOnPolicyUpdate" = mkOption { + description = "Deprecated, use generateExisting instead"; + type = types.nullOr types.bool; + }; + "mutateExistingOnPolicyUpdate" = mkOption { + description = "MutateExistingOnPolicyUpdate controls if a mutateExisting policy is applied on policy events.\nDefault value is \"false\"."; + type = types.nullOr types.bool; + }; + "rules" = mkOption { + description = "Rules is a list of Rule instances. A Policy contains multiple rules and\neach rule can validate, mutate, or generate resources."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRules" "name" [ ] + ); + apply = attrsToList; + }; + "schemaValidation" = mkOption { + description = "Deprecated."; + type = types.nullOr types.bool; + }; + "useServerSideApply" = mkOption { + description = "UseServerSideApply controls whether to use server-side apply for generate rules\nIf is set to \"true\" create & update for generate rules will use apply instead of create/update.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "validationFailureAction" = mkOption { + description = "ValidationFailureAction defines if a validation policy rule violation should block\nthe admission review request (enforce), or allow (audit) the admission review request\nand report an error in a policy report. Optional.\nAllowed values are audit or enforce. The default value is \"Audit\"."; + type = types.nullOr types.str; + }; + "validationFailureActionOverrides" = mkOption { + description = "ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction\nnamespace-wise. It overrides ValidationFailureAction for the specified namespaces."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecValidationFailureActionOverrides") + ); + }; + "webhookConfiguration" = mkOption { + description = "WebhookConfiguration specifies the custom configuration for Kubernetes admission webhookconfiguration.\nRequires Kubernetes 1.27 or later."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecWebhookConfiguration"); + }; + "webhookTimeoutSeconds" = mkOption { + description = "WebhookTimeoutSeconds specifies the maximum time in seconds allowed to apply this policy.\nAfter the configured time expires, the admission request may fail, or may simply ignore the policy results,\nbased on the failure policy. The default timeout is 10s, the value must be between 1 and 30 seconds."; + type = types.nullOr types.int; + }; + }; + + config = { + "admission" = mkOverride 1002 null; + "applyRules" = mkOverride 1002 null; + "background" = mkOverride 1002 null; + "failurePolicy" = mkOverride 1002 null; + "generateExisting" = mkOverride 1002 null; + "generateExistingOnPolicyUpdate" = mkOverride 1002 null; + "mutateExistingOnPolicyUpdate" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "schemaValidation" = mkOverride 1002 null; + "useServerSideApply" = mkOverride 1002 null; + "validationFailureAction" = mkOverride 1002 null; + "validationFailureActionOverrides" = mkOverride 1002 null; + "webhookConfiguration" = mkOverride 1002 null; + "webhookTimeoutSeconds" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesCelPreconditions" "name" [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImages")); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAny")); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesExcludeSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesExcludeSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesGenerateCloneListSelector"); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAny")); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesMatchSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesMatchAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesMatchAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMatchSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeach") + ); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesMutateTargets" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContext" "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachPreconditions"); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContext" "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidatePodSecurity"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCelAuditAnnotations") + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamKind"); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamRef"); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesValidateCelVariables" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamRefSelector"); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachDeny"); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachPreconditions" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsDryRun"); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsIgnoreFields") + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImages" = { + options = { + "additionalExtensions" = mkOption { + description = "Deprecated."; + type = types.nullOr (types.attrsOf types.str); + }; + "annotations" = mkOption { + description = "Deprecated. Use annotations per Attestor instead."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestors") + ); + }; + "image" = mkOption { + description = "Deprecated. Use ImageReferences instead."; + type = types.nullOr types.str; + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesImageRegistryCredentials" + ); + }; + "issuer" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "key" = mkOption { + description = "Deprecated. Use StaticKeyAttestor instead."; + type = types.nullOr types.str; + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "roots" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "subject" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule."; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "annotations" = mkOverride 1002 null; + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "image" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "key" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestors") + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsConditions") + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicySpecRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecValidationFailureActionOverrides" = { + options = { + "action" = mkOption { + description = "ValidationFailureAction defines the policy validation failure action"; + type = types.nullOr types.str; + }; + "namespaceSelector" = mkOption { + description = "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "action" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecWebhookConfiguration" = { + options = { + "matchConditions" = mkOption { + description = "MatchCondition configures admission webhook matchConditions."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicySpecWebhookConfigurationMatchConditions" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "matchConditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicySpecWebhookConfigurationMatchConditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatus" = { + options = { + "autogen" = mkOption { + description = "AutogenStatus contains autogen status information."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogen"); + }; + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusConditions")); + }; + "ready" = mkOption { + description = "Deprecated in favor of Conditions"; + type = types.bool; + }; + "rulecount" = mkOption { + description = "RuleCountStatus contains four variables which describes counts for\nvalidate, generate, mutate and verify images rules"; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusRulecount"); + }; + "validatingadmissionpolicy" = mkOption { + description = "ValidatingAdmissionPolicy contains status information"; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusValidatingadmissionpolicy"); + }; + }; + + config = { + "autogen" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "rulecount" = mkOverride 1002 null; + "validatingadmissionpolicy" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogen" = { + options = { + "rules" = mkOption { + description = "Rules is a list of Rule instances. It contains auto generated rules added for pod controllers"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRules" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "rules" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesCelPreconditions" + "name" + [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImages") + ); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAny") + ); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesExcludeSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelector" + ); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAny") + ); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMatchSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeach") + ); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargets" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditions" + ); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidatePodSecurity" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelAuditAnnotations" + ) + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamKind" + ); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamRef" + ); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelVariables" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelector" + ); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachDeny" + ); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditions" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsDryRun" + ); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFields" + ) + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImages" = { + options = { + "additionalExtensions" = mkOption { + description = "Deprecated."; + type = types.nullOr (types.attrsOf types.str); + }; + "annotations" = mkOption { + description = "Deprecated. Use annotations per Attestor instead."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestors") + ); + }; + "image" = mkOption { + description = "Deprecated. Use ImageReferences instead."; + type = types.nullOr types.str; + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" + ); + }; + "issuer" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "key" = mkOption { + description = "Deprecated. Use StaticKeyAttestor instead."; + type = types.nullOr types.str; + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "roots" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "subject" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule."; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "annotations" = mkOverride 1002 null; + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "image" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "key" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" + ) + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditions" + ) + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.ClusterPolicyStatusRulecount" = { + options = { + "generate" = mkOption { + description = "Count for generate rules in policy"; + type = types.int; + }; + "mutate" = mkOption { + description = "Count for mutate rules in policy"; + type = types.int; + }; + "validate" = mkOption { + description = "Count for validate rules in policy"; + type = types.int; + }; + "verifyimages" = mkOption { + description = "Count for verify image rules in policy"; + type = types.int; + }; + }; + + config = { }; + }; + "kyverno.io.v1.ClusterPolicyStatusValidatingadmissionpolicy" = { + options = { + "generated" = mkOption { + description = "Generated indicates whether a validating admission policy is generated from the policy or not"; + type = types.bool; + }; + "message" = mkOption { + description = "Message is a human readable message indicating details about the generation of validating admission policy\nIt is an empty string when validating admission policy is successfully generated."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.Policy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec defines policy behaviors and contains one or more rules."; + type = submoduleOf "kyverno.io.v1.PolicySpec"; + }; + "status" = mkOption { + description = "Deprecated. Policy metrics are available via the metrics endpoint"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpec" = { + options = { + "admission" = mkOption { + description = "Admission controls if rules are applied during admission.\nOptional. Default value is \"true\"."; + type = types.nullOr types.bool; + }; + "applyRules" = mkOption { + description = "ApplyRules controls how rules in a policy are applied. Rule are processed in\nthe order of declaration. When set to `One` processing stops after a rule has\nbeen applied i.e. the rule matches and results in a pass, fail, or error. When\nset to `All` all rules in the policy are processed. The default is `All`."; + type = types.nullOr types.str; + }; + "background" = mkOption { + description = "Background controls if rules are applied to existing resources during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "failurePolicy" = mkOption { + description = "FailurePolicy defines how unexpected policy errors and webhook response timeout errors are handled.\nRules within the same policy share the same failure behavior.\nThis field should not be accessed directly, instead `GetFailurePolicy()` should be used.\nAllowed values are Ignore or Fail. Defaults to Fail."; + type = types.nullOr types.str; + }; + "generateExisting" = mkOption { + description = "GenerateExisting controls whether to trigger generate rule in existing resources\nIf is set to \"true\" generate rule will be triggered and applied to existing matched resources.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "generateExistingOnPolicyUpdate" = mkOption { + description = "Deprecated, use generateExisting instead"; + type = types.nullOr types.bool; + }; + "mutateExistingOnPolicyUpdate" = mkOption { + description = "MutateExistingOnPolicyUpdate controls if a mutateExisting policy is applied on policy events.\nDefault value is \"false\"."; + type = types.nullOr types.bool; + }; + "rules" = mkOption { + description = "Rules is a list of Rule instances. A Policy contains multiple rules and\neach rule can validate, mutate, or generate resources."; + type = types.nullOr (coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRules" "name" [ ]); + apply = attrsToList; + }; + "schemaValidation" = mkOption { + description = "Deprecated."; + type = types.nullOr types.bool; + }; + "useServerSideApply" = mkOption { + description = "UseServerSideApply controls whether to use server-side apply for generate rules\nIf is set to \"true\" create & update for generate rules will use apply instead of create/update.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "validationFailureAction" = mkOption { + description = "ValidationFailureAction defines if a validation policy rule violation should block\nthe admission review request (enforce), or allow (audit) the admission review request\nand report an error in a policy report. Optional.\nAllowed values are audit or enforce. The default value is \"Audit\"."; + type = types.nullOr types.str; + }; + "validationFailureActionOverrides" = mkOption { + description = "ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction\nnamespace-wise. It overrides ValidationFailureAction for the specified namespaces."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecValidationFailureActionOverrides") + ); + }; + "webhookConfiguration" = mkOption { + description = "WebhookConfiguration specifies the custom configuration for Kubernetes admission webhookconfiguration.\nRequires Kubernetes 1.27 or later."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecWebhookConfiguration"); + }; + "webhookTimeoutSeconds" = mkOption { + description = "WebhookTimeoutSeconds specifies the maximum time in seconds allowed to apply this policy.\nAfter the configured time expires, the admission request may fail, or may simply ignore the policy results,\nbased on the failure policy. The default timeout is 10s, the value must be between 1 and 30 seconds."; + type = types.nullOr types.int; + }; + }; + + config = { + "admission" = mkOverride 1002 null; + "applyRules" = mkOverride 1002 null; + "background" = mkOverride 1002 null; + "failurePolicy" = mkOverride 1002 null; + "generateExisting" = mkOverride 1002 null; + "generateExistingOnPolicyUpdate" = mkOverride 1002 null; + "mutateExistingOnPolicyUpdate" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "schemaValidation" = mkOverride 1002 null; + "useServerSideApply" = mkOverride 1002 null; + "validationFailureAction" = mkOverride 1002 null; + "validationFailureActionOverrides" = mkOverride 1002 null; + "webhookConfiguration" = mkOverride 1002 null; + "webhookTimeoutSeconds" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesCelPreconditions" "name" [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImages")); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesContextApiCallData")); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAny")); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesExcludeSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesExcludeAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesExcludeAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeResourcesNamespaceSelector"); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesExcludeResourcesSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesExcludeSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesGenerateCloneListSelector"); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesGenerateCloneListSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAny")); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesMatchSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesMatchAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAllResourcesNamespaceSelector"); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAllResourcesSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesMatchAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesNamespaceSelector"); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchResourcesNamespaceSelector"); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMatchResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMatchResourcesSelectorMatchExpressions") + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMatchSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeach")); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesMutateTargets" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesMutateForeachContext" "name" [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachPreconditions"); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesMutateTargetsContext" "name" [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeach")); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidatePodSecurity"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCelAuditAnnotations") + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCelParamKind"); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCelParamRef"); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesValidateCelVariables" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCelParamRefSelector"); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecRulesValidateForeachContext" "name" [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachDeny"); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachPreconditions"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsDryRun"); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsIgnoreFields") + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.PolicySpecRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImages" = { + options = { + "additionalExtensions" = mkOption { + description = "Deprecated."; + type = types.nullOr (types.attrsOf types.str); + }; + "annotations" = mkOption { + description = "Deprecated. Use annotations per Attestor instead."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestors") + ); + }; + "image" = mkOption { + description = "Deprecated. Use ImageReferences instead."; + type = types.nullOr types.str; + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesImageRegistryCredentials" + ); + }; + "issuer" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "key" = mkOption { + description = "Deprecated. Use StaticKeyAttestor instead."; + type = types.nullOr types.str; + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "roots" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "subject" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule."; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "annotations" = mkOverride 1002 null; + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "image" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "key" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestors") + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsConditions") + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeys"); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicySpecRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecValidationFailureActionOverrides" = { + options = { + "action" = mkOption { + description = "ValidationFailureAction defines the policy validation failure action"; + type = types.nullOr types.str; + }; + "namespaceSelector" = mkOption { + description = "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicySpecValidationFailureActionOverridesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "action" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecValidationFailureActionOverridesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecWebhookConfiguration" = { + options = { + "matchConditions" = mkOption { + description = "MatchCondition configures admission webhook matchConditions."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicySpecWebhookConfigurationMatchConditions" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "matchConditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicySpecWebhookConfigurationMatchConditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatus" = { + options = { + "autogen" = mkOption { + description = "AutogenStatus contains autogen status information."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogen"); + }; + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusConditions")); + }; + "ready" = mkOption { + description = "Deprecated in favor of Conditions"; + type = types.bool; + }; + "rulecount" = mkOption { + description = "RuleCountStatus contains four variables which describes counts for\nvalidate, generate, mutate and verify images rules"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusRulecount"); + }; + "validatingadmissionpolicy" = mkOption { + description = "ValidatingAdmissionPolicy contains status information"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusValidatingadmissionpolicy"); + }; + }; + + config = { + "autogen" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "rulecount" = mkOverride 1002 null; + "validatingadmissionpolicy" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogen" = { + options = { + "rules" = mkOption { + description = "Rules is a list of Rule instances. It contains auto generated rules added for pod controllers"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRules" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "rules" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesCelPreconditions" "name" + [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImages") + ); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAny")); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesExcludeSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesExcludeSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesGenerateCloneListSelector"); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAny")); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesMatchSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMatchSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeach") + ); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargets" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachPreconditions" + ); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidatePodSecurity"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelAuditAnnotations") + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamKind"); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamRef"); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelVariables" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamRefSelector" + ); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachDeny"); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachPreconditions" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsDryRun"); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsIgnoreFields") + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImages" = { + options = { + "additionalExtensions" = mkOption { + description = "Deprecated."; + type = types.nullOr (types.attrsOf types.str); + }; + "annotations" = mkOption { + description = "Deprecated. Use annotations per Attestor instead."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestors") + ); + }; + "image" = mkOption { + description = "Deprecated. Use ImageReferences instead."; + type = types.nullOr types.str; + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" + ); + }; + "issuer" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "key" = mkOption { + description = "Deprecated. Use StaticKeyAttestor instead."; + type = types.nullOr types.str; + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "roots" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "subject" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule."; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "annotations" = mkOverride 1002 null; + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "image" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "key" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestors") + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditions" + ) + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1.PolicyStatusRulecount" = { + options = { + "generate" = mkOption { + description = "Count for generate rules in policy"; + type = types.int; + }; + "mutate" = mkOption { + description = "Count for mutate rules in policy"; + type = types.int; + }; + "validate" = mkOption { + description = "Count for validate rules in policy"; + type = types.int; + }; + "verifyimages" = mkOption { + description = "Count for verify image rules in policy"; + type = types.int; + }; + }; + + config = { }; + }; + "kyverno.io.v1.PolicyStatusValidatingadmissionpolicy" = { + options = { + "generated" = mkOption { + description = "Generated indicates whether a validating admission policy is generated from the policy or not"; + type = types.bool; + }; + "message" = mkOption { + description = "Message is a human readable message indicating details about the generation of validating admission policy\nIt is an empty string when validating admission policy is successfully generated."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1beta1.UpdateRequest" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "ResourceSpec is the information to identify the trigger resource."; + type = types.nullOr (submoduleOf "kyverno.io.v1beta1.UpdateRequestSpec"); + }; + "status" = mkOption { + description = "Status contains statistics related to update request."; + type = types.nullOr (submoduleOf "kyverno.io.v1beta1.UpdateRequestStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "spec" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpec" = { + options = { + "context" = mkOption { + description = "Context ..."; + type = submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContext"; + }; + "deleteDownstream" = mkOption { + description = "DeleteDownstream represents whether the downstream needs to be deleted."; + type = types.bool; + }; + "policy" = mkOption { + description = "Specifies the name of the policy."; + type = types.str; + }; + "requestType" = mkOption { + description = "Type represents request type for background processing"; + type = types.nullOr types.str; + }; + "resource" = mkOption { + description = "ResourceSpec is the information to identify the trigger resource."; + type = submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecResource"; + }; + "rule" = mkOption { + description = "Rule is the associate rule name of the current UR."; + type = types.str; + }; + "synchronize" = mkOption { + description = "Synchronize represents the sync behavior of the corresponding rule\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + }; + + config = { + "requestType" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContext" = { + options = { + "admissionRequestInfo" = mkOption { + description = "AdmissionRequestInfoObject stores the admission request and operation details"; + type = types.nullOr (submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfo"); + }; + "userInfo" = mkOption { + description = "RequestInfo contains permission info carried in an admission request."; + type = types.nullOr (submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextUserInfo"); + }; + }; + + config = { + "admissionRequestInfo" = mkOverride 1002 null; + "userInfo" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfo" = { + options = { + "admissionRequest" = mkOption { + description = "AdmissionRequest describes the admission.Attributes for the admission request."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequest" + ); + }; + "operation" = mkOption { + description = "Operation is the type of resource operation being checked for admission control"; + type = types.nullOr types.str; + }; + }; + + config = { + "admissionRequest" = mkOverride 1002 null; + "operation" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequest" = { + options = { + "dryRun" = mkOption { + description = "DryRun indicates that modifications will definitely not be persisted for this request.\nDefaults to false."; + type = types.nullOr types.bool; + }; + "kind" = mkOption { + description = "Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)"; + type = submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestKind"; + }; + "name" = mkOption { + description = "Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and\nrely on the server to generate the name. If that is the case, this field will contain an empty string."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace associated with the request (if any)."; + type = types.nullOr types.str; + }; + "object" = mkOption { + description = "Object is the object from the incoming request."; + type = types.nullOr types.attrs; + }; + "oldObject" = mkOption { + description = "OldObject is the existing object. Only populated for DELETE and UPDATE requests."; + type = types.nullOr types.attrs; + }; + "operation" = mkOption { + description = "Operation is the operation being performed. This may be different than the operation\nrequested. e.g. a patch can result in either a CREATE or UPDATE Operation."; + type = types.str; + }; + "options" = mkOption { + description = "Options is the operation option structure of the operation being performed.\ne.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be\ndifferent than the options the caller provided. e.g. for a patch request the performed\nOperation might be a CREATE, in which case the Options will a\n`meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`."; + type = types.nullOr types.attrs; + }; + "requestKind" = mkOption { + description = "RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).\nIf this is specified and differs from the value in \"kind\", an equivalent match and conversion was performed.\n\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of\n`apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`,\nan API request to apps/v1beta1 deployments would be converted and sent to the webhook\nwith `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (matching the rule the webhook registered for),\nand `requestKind: {group:\"apps\", version:\"v1beta1\", kind:\"Deployment\"}` (indicating the kind of the original API request).\n\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type for more details."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestKind" + ); + }; + "requestResource" = mkOption { + description = "RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).\nIf this is specified and differs from the value in \"resource\", an equivalent match and conversion was performed.\n\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of\n`apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`,\nan API request to apps/v1beta1 deployments would be converted and sent to the webhook\nwith `resource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (matching the resource the webhook registered for),\nand `requestResource: {group:\"apps\", version:\"v1beta1\", resource:\"deployments\"}` (indicating the resource of the original API request).\n\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type."; + type = types.nullOr ( + submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestResource" + ); + }; + "requestSubResource" = mkOption { + description = "RequestSubResource is the name of the subresource of the original API request, if any (for example, \"status\" or \"scale\")\nIf this is specified and differs from the value in \"subResource\", an equivalent match and conversion was performed.\nSee documentation for the \"matchPolicy\" field in the webhook configuration type."; + type = types.nullOr types.str; + }; + "resource" = mkOption { + description = "Resource is the fully-qualified resource being requested (for example, v1.pods)"; + type = submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestResource"; + }; + "subResource" = mkOption { + description = "SubResource is the subresource being requested, if any (for example, \"status\" or \"scale\")"; + type = types.nullOr types.str; + }; + "uid" = mkOption { + description = "UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are\notherwise identical (parallel requests, requests when earlier requests did not modify etc)\nThe UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.\nIt is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging."; + type = types.str; + }; + "userInfo" = mkOption { + description = "UserInfo is information about the requesting user"; + type = submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestUserInfo"; + }; + }; + + config = { + "dryRun" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "object" = mkOverride 1002 null; + "oldObject" = mkOverride 1002 null; + "options" = mkOverride 1002 null; + "requestKind" = mkOverride 1002 null; + "requestResource" = mkOverride 1002 null; + "requestSubResource" = mkOverride 1002 null; + "subResource" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestKind" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "kind" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestKind" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "kind" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestResource" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "resource" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestResource" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "resource" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestUserInfo" = { + options = { + "extra" = mkOption { + description = "Any additional information provided by the authenticator."; + type = types.nullOr (types.loaOf types.str); + }; + "groups" = mkOption { + description = "The names of groups this user is a part of."; + type = types.nullOr (types.listOf types.str); + }; + "uid" = mkOption { + description = "A unique value that identifies this user across time. If this user is\ndeleted and another user by the same name is added, they will have\ndifferent UIDs."; + type = types.nullOr types.str; + }; + "username" = mkOption { + description = "The name that uniquely identifies this user among all active users."; + type = types.nullOr types.str; + }; + }; + + config = { + "extra" = mkOverride 1002 null; + "groups" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + "username" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextUserInfo" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is a list of possible clusterRoles send the request."; + type = types.nullOr (types.listOf types.str); + }; + "roles" = mkOption { + description = "Roles is a list of possible role send the request."; + type = types.nullOr (types.listOf types.str); + }; + "userInfo" = mkOption { + description = "UserInfo is the userInfo carried in the admission request."; + type = types.nullOr (submoduleOf "kyverno.io.v1beta1.UpdateRequestSpecContextUserInfoUserInfo"); + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "userInfo" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecContextUserInfoUserInfo" = { + options = { + "extra" = mkOption { + description = "Any additional information provided by the authenticator."; + type = types.nullOr (types.loaOf types.str); + }; + "groups" = mkOption { + description = "The names of groups this user is a part of."; + type = types.nullOr (types.listOf types.str); + }; + "uid" = mkOption { + description = "A unique value that identifies this user across time. If this user is\ndeleted and another user by the same name is added, they will have\ndifferent UIDs."; + type = types.nullOr types.str; + }; + "username" = mkOption { + description = "The name that uniquely identifies this user among all active users."; + type = types.nullOr types.str; + }; + }; + + config = { + "extra" = mkOverride 1002 null; + "groups" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + "username" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestSpecResource" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestStatus" = { + options = { + "generatedResources" = mkOption { + description = "This will track the resources that are updated by the generate Policy.\nWill be used during clean up resources."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v1beta1.UpdateRequestStatusGeneratedResources" "name" + [ ] + ); + apply = attrsToList; + }; + "handler" = mkOption { + description = "Deprecated"; + type = types.nullOr types.str; + }; + "message" = mkOption { + description = "Specifies request status message."; + type = types.nullOr types.str; + }; + "retryCount" = mkOption { + description = ""; + type = types.nullOr types.int; + }; + "state" = mkOption { + description = "State represents state of the update request."; + type = types.str; + }; + }; + + config = { + "generatedResources" = mkOverride 1002 null; + "handler" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "retryCount" = mkOverride 1002 null; + }; + }; + "kyverno.io.v1beta1.UpdateRequestStatusGeneratedResources" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2.CleanupPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpec" = { + options = { + "conditions" = mkOption { + description = "Conditions defines the conditions used to select the resources which will be cleaned up."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecConditions"); + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.CleanupPolicySpecContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when cleanuppolicy should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecExclude"); + }; + "match" = mkOption { + description = "MatchResources defines when cleanuppolicy should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatch"); + }; + "schedule" = mkOption { + description = "The schedule in Cron format"; + type = types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecConditionsAll")); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecConditionsAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2.CleanupPolicySpecContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.CleanupPolicySpecExcludeAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.CleanupPolicySpecExcludeAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.CleanupPolicySpecMatchAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.CleanupPolicySpecMatchAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicySpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.CleanupPolicyStatusConditions")); + }; + "lastExecutionTime" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastExecutionTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.CleanupPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpec" = { + options = { + "conditions" = mkOption { + description = "Conditions defines the conditions used to select the resources which will be cleaned up."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecConditions"); + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.ClusterCleanupPolicySpecContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when cleanuppolicy should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExclude"); + }; + "match" = mkOption { + description = "MatchResources defines when cleanuppolicy should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatch"); + }; + "schedule" = mkOption { + description = "The schedule in Cron format"; + type = types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicySpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2.ClusterCleanupPolicyStatusConditions") + ); + }; + "lastExecutionTime" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastExecutionTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.ClusterCleanupPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyException" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy exception behaviors."; + type = submoduleOf "kyverno.io.v2.PolicyExceptionSpec"; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpec" = { + options = { + "background" = mkOption { + description = "Background controls if exceptions are applied to existing policies during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "conditions" = mkOption { + description = "Conditions are used to determine if a resource applies to the exception by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements."; + type = types.nullOr (submoduleOf "kyverno.io.v2.PolicyExceptionSpecConditions"); + }; + "exceptions" = mkOption { + description = "Exceptions is a list policy/rules to be excluded"; + type = types.listOf (submoduleOf "kyverno.io.v2.PolicyExceptionSpecExceptions"); + }; + "match" = mkOption { + description = "Match defines match clause used to check if a resource applies to the exception"; + type = submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatch"; + }; + "podSecurity" = mkOption { + description = "PodSecurity specifies the Pod Security Standard controls to be excluded.\nApplicable only to policies that have validate.podSecurity subrule."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.PolicyExceptionSpecPodSecurity")); + }; + }; + + config = { + "background" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.PolicyExceptionSpecConditionsAll")); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.PolicyExceptionSpecConditionsAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecExceptions" = { + options = { + "policyName" = mkOption { + description = "PolicyName identifies the policy to which the exception is applied.\nThe policy name uses the format / unless it\nreferences a ClusterPolicy."; + type = types.str; + }; + "ruleNames" = mkOption { + description = "RuleNames identifies the rules to which the exception is applied."; + type = types.listOf types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.PolicyExceptionSpecMatchAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.PolicyExceptionSpecMatchAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.PolicyExceptionSpecPodSecurity" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequest" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "ResourceSpec is the information to identify the trigger resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2.UpdateRequestSpec"); + }; + "status" = mkOption { + description = "Status contains statistics related to update request."; + type = types.nullOr (submoduleOf "kyverno.io.v2.UpdateRequestStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "spec" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpec" = { + options = { + "context" = mkOption { + description = "Context ..."; + type = submoduleOf "kyverno.io.v2.UpdateRequestSpecContext"; + }; + "deleteDownstream" = mkOption { + description = "DeleteDownstream represents whether the downstream needs to be deleted."; + type = types.bool; + }; + "policy" = mkOption { + description = "Specifies the name of the policy."; + type = types.str; + }; + "requestType" = mkOption { + description = "Type represents request type for background processing"; + type = types.nullOr types.str; + }; + "resource" = mkOption { + description = "ResourceSpec is the information to identify the trigger resource."; + type = submoduleOf "kyverno.io.v2.UpdateRequestSpecResource"; + }; + "rule" = mkOption { + description = "Rule is the associate rule name of the current UR."; + type = types.str; + }; + "synchronize" = mkOption { + description = "Synchronize represents the sync behavior of the corresponding rule\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + }; + + config = { + "requestType" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecContext" = { + options = { + "admissionRequestInfo" = mkOption { + description = "AdmissionRequestInfoObject stores the admission request and operation details"; + type = types.nullOr (submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfo"); + }; + "userInfo" = mkOption { + description = "RequestInfo contains permission info carried in an admission request."; + type = types.nullOr (submoduleOf "kyverno.io.v2.UpdateRequestSpecContextUserInfo"); + }; + }; + + config = { + "admissionRequestInfo" = mkOverride 1002 null; + "userInfo" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfo" = { + options = { + "admissionRequest" = mkOption { + description = "AdmissionRequest describes the admission.Attributes for the admission request."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequest" + ); + }; + "operation" = mkOption { + description = "Operation is the type of resource operation being checked for admission control"; + type = types.nullOr types.str; + }; + }; + + config = { + "admissionRequest" = mkOverride 1002 null; + "operation" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequest" = { + options = { + "dryRun" = mkOption { + description = "DryRun indicates that modifications will definitely not be persisted for this request.\nDefaults to false."; + type = types.nullOr types.bool; + }; + "kind" = mkOption { + description = "Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)"; + type = submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestKind"; + }; + "name" = mkOption { + description = "Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and\nrely on the server to generate the name. If that is the case, this field will contain an empty string."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace is the namespace associated with the request (if any)."; + type = types.nullOr types.str; + }; + "object" = mkOption { + description = "Object is the object from the incoming request."; + type = types.nullOr types.attrs; + }; + "oldObject" = mkOption { + description = "OldObject is the existing object. Only populated for DELETE and UPDATE requests."; + type = types.nullOr types.attrs; + }; + "operation" = mkOption { + description = "Operation is the operation being performed. This may be different than the operation\nrequested. e.g. a patch can result in either a CREATE or UPDATE Operation."; + type = types.str; + }; + "options" = mkOption { + description = "Options is the operation option structure of the operation being performed.\ne.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be\ndifferent than the options the caller provided. e.g. for a patch request the performed\nOperation might be a CREATE, in which case the Options will a\n`meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`."; + type = types.nullOr types.attrs; + }; + "requestKind" = mkOption { + description = "RequestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale).\nIf this is specified and differs from the value in \"kind\", an equivalent match and conversion was performed.\n\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of\n`apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`,\nan API request to apps/v1beta1 deployments would be converted and sent to the webhook\nwith `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (matching the rule the webhook registered for),\nand `requestKind: {group:\"apps\", version:\"v1beta1\", kind:\"Deployment\"}` (indicating the kind of the original API request).\n\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type for more details."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestKind" + ); + }; + "requestResource" = mkOption { + description = "RequestResource is the fully-qualified resource of the original API request (for example, v1.pods).\nIf this is specified and differs from the value in \"resource\", an equivalent match and conversion was performed.\n\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of\n`apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`,\nan API request to apps/v1beta1 deployments would be converted and sent to the webhook\nwith `resource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (matching the resource the webhook registered for),\nand `requestResource: {group:\"apps\", version:\"v1beta1\", resource:\"deployments\"}` (indicating the resource of the original API request).\n\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestResource" + ); + }; + "requestSubResource" = mkOption { + description = "RequestSubResource is the name of the subresource of the original API request, if any (for example, \"status\" or \"scale\")\nIf this is specified and differs from the value in \"subResource\", an equivalent match and conversion was performed.\nSee documentation for the \"matchPolicy\" field in the webhook configuration type."; + type = types.nullOr types.str; + }; + "resource" = mkOption { + description = "Resource is the fully-qualified resource being requested (for example, v1.pods)"; + type = submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestResource"; + }; + "subResource" = mkOption { + description = "SubResource is the subresource being requested, if any (for example, \"status\" or \"scale\")"; + type = types.nullOr types.str; + }; + "uid" = mkOption { + description = "UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are\notherwise identical (parallel requests, requests when earlier requests did not modify etc)\nThe UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request.\nIt is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging."; + type = types.str; + }; + "userInfo" = mkOption { + description = "UserInfo is information about the requesting user"; + type = submoduleOf "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestUserInfo"; + }; + }; + + config = { + "dryRun" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "object" = mkOverride 1002 null; + "oldObject" = mkOverride 1002 null; + "options" = mkOverride 1002 null; + "requestKind" = mkOverride 1002 null; + "requestResource" = mkOverride 1002 null; + "requestSubResource" = mkOverride 1002 null; + "subResource" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestKind" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "kind" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestKind" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "kind" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestRequestResource" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "resource" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestResource" = { + options = { + "group" = mkOption { + description = ""; + type = types.str; + }; + "resource" = mkOption { + description = ""; + type = types.str; + }; + "version" = mkOption { + description = ""; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2.UpdateRequestSpecContextAdmissionRequestInfoAdmissionRequestUserInfo" = { + options = { + "extra" = mkOption { + description = "Any additional information provided by the authenticator."; + type = types.nullOr (types.loaOf types.str); + }; + "groups" = mkOption { + description = "The names of groups this user is a part of."; + type = types.nullOr (types.listOf types.str); + }; + "uid" = mkOption { + description = "A unique value that identifies this user across time. If this user is\ndeleted and another user by the same name is added, they will have\ndifferent UIDs."; + type = types.nullOr types.str; + }; + "username" = mkOption { + description = "The name that uniquely identifies this user among all active users."; + type = types.nullOr types.str; + }; + }; + + config = { + "extra" = mkOverride 1002 null; + "groups" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + "username" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecContextUserInfo" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is a list of possible clusterRoles send the request."; + type = types.nullOr (types.listOf types.str); + }; + "roles" = mkOption { + description = "Roles is a list of possible role send the request."; + type = types.nullOr (types.listOf types.str); + }; + "userInfo" = mkOption { + description = "UserInfo is the userInfo carried in the admission request."; + type = types.nullOr (submoduleOf "kyverno.io.v2.UpdateRequestSpecContextUserInfoUserInfo"); + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "userInfo" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecContextUserInfoUserInfo" = { + options = { + "extra" = mkOption { + description = "Any additional information provided by the authenticator."; + type = types.nullOr (types.loaOf types.str); + }; + "groups" = mkOption { + description = "The names of groups this user is a part of."; + type = types.nullOr (types.listOf types.str); + }; + "uid" = mkOption { + description = "A unique value that identifies this user across time. If this user is\ndeleted and another user by the same name is added, they will have\ndifferent UIDs."; + type = types.nullOr types.str; + }; + "username" = mkOption { + description = "The name that uniquely identifies this user among all active users."; + type = types.nullOr types.str; + }; + }; + + config = { + "extra" = mkOverride 1002 null; + "groups" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + "username" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestSpecResource" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestStatus" = { + options = { + "generatedResources" = mkOption { + description = "This will track the resources that are updated by the generate Policy.\nWill be used during clean up resources."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2.UpdateRequestStatusGeneratedResources" "name" [ ] + ); + apply = attrsToList; + }; + "message" = mkOption { + description = "Specifies request status message."; + type = types.nullOr types.str; + }; + "retryCount" = mkOption { + description = ""; + type = types.nullOr types.int; + }; + "state" = mkOption { + description = "State represents state of the update request."; + type = types.str; + }; + }; + + config = { + "generatedResources" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "retryCount" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2.UpdateRequestStatusGeneratedResources" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpec" = { + options = { + "conditions" = mkOption { + description = "Conditions defines the conditions used to select the resources which will be cleaned up."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecConditions"); + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.CleanupPolicySpecContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when cleanuppolicy should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExclude"); + }; + "match" = mkOption { + description = "MatchResources defines when cleanuppolicy should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatch"); + }; + "schedule" = mkOption { + description = "The schedule in Cron format"; + type = types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicySpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.CleanupPolicyStatusConditions") + ); + }; + "lastExecutionTime" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastExecutionTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.CleanupPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpec" = { + options = { + "conditions" = mkOption { + description = "Conditions defines the conditions used to select the resources which will be cleaned up."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecConditions"); + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when cleanuppolicy should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExclude"); + }; + "match" = mkOption { + description = "MatchResources defines when cleanuppolicy should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatch"); + }; + "schedule" = mkOption { + description = "The schedule in Cron format"; + type = types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicySpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.ClusterCleanupPolicyStatusConditions") + ); + }; + "lastExecutionTime" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastExecutionTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.ClusterCleanupPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntry" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy exception behaviors."; + type = submoduleOf "kyverno.io.v2alpha1.GlobalContextEntrySpec"; + }; + "status" = mkOption { + description = "Status contains globalcontextentry runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.GlobalContextEntryStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntrySpec" = { + options = { + "apiCall" = mkOption { + description = "Stores results from an API call which will be cached.\nMutually exclusive with KubernetesResource.\nThis can be used to make calls to external (non-Kubernetes API server) services.\nIt can also be used to make calls to the Kubernetes API server in such cases:\n1. A POST is needed to create a resource.\n2. Finer-grained control is needed. Example: To restrict the number of resources cached."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.GlobalContextEntrySpecApiCall"); + }; + "kubernetesResource" = mkOption { + description = "Stores a list of Kubernetes resources which will be cached.\nMutually exclusive with APICall."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.GlobalContextEntrySpecKubernetesResource"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "kubernetesResource" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntrySpecApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.GlobalContextEntrySpecApiCallData") + ); + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "refreshInterval" = mkOption { + description = "RefreshInterval defines the interval in duration at which to poll the APICall.\nThe duration is a sequence of decimal numbers, each with optional fraction and a unit suffix,\nsuch as \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"u00b5s\"), \"ms\", \"s\", \"m\", \"h\"."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.GlobalContextEntrySpecApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "refreshInterval" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntrySpecApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2alpha1.GlobalContextEntrySpecApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntrySpecKubernetesResource" = { + options = { + "group" = mkOption { + description = "Group defines the group of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace defines the namespace of the resource. Leave empty for cluster scoped resources.\nIf left empty for namespaced resources, all resources from all namespaces will be cached."; + type = types.nullOr types.str; + }; + "resource" = mkOption { + description = "Resource defines the type of the resource.\nRequires the pluralized form of the resource kind in lowercase. (Ex., \"deployments\")"; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the version of the resource."; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "resource" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntryStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.GlobalContextEntryStatusConditions") + ); + }; + "lastRefreshTime" = mkOption { + description = "Indicates the time when the globalcontextentry was last refreshed successfully for the API Call"; + type = types.nullOr types.str; + }; + "ready" = mkOption { + description = "Deprecated in favor of Conditions"; + type = types.bool; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastRefreshTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.GlobalContextEntryStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyException" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy exception behaviors."; + type = submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpec"; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpec" = { + options = { + "background" = mkOption { + description = "Background controls if exceptions are applied to existing policies during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "conditions" = mkOption { + description = "Conditions are used to determine if a resource applies to the exception by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecConditions"); + }; + "exceptions" = mkOption { + description = "Exceptions is a list policy/rules to be excluded"; + type = types.listOf (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecExceptions"); + }; + "match" = mkOption { + description = "Match defines match clause used to check if a resource applies to the exception"; + type = submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatch"; + }; + "podSecurity" = mkOption { + description = "PodSecurity specifies the Pod Security Standard controls to be excluded.\nApplicable only to policies that have validate.podSecurity subrule."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecPodSecurity") + ); + }; + }; + + config = { + "background" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecExceptions" = { + options = { + "policyName" = mkOption { + description = "PolicyName identifies the policy to which the exception is applied.\nThe policy name uses the format / unless it\nreferences a ClusterPolicy."; + type = types.str; + }; + "ruleNames" = mkOption { + description = "RuleNames identifies the rules to which the exception is applied."; + type = types.listOf types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2alpha1.PolicyExceptionSpecPodSecurity" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2beta1.CleanupPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpec" = { + options = { + "conditions" = mkOption { + description = "Conditions defines the conditions used to select the resources which will be cleaned up."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecConditions"); + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.CleanupPolicySpecContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when cleanuppolicy should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExclude"); + }; + "match" = mkOption { + description = "MatchResources defines when cleanuppolicy should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatch"); + }; + "schedule" = mkOption { + description = "The schedule in Cron format"; + type = types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.CleanupPolicySpecMatchAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.CleanupPolicySpecMatchAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicySpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.CleanupPolicyStatusConditions")); + }; + "lastExecutionTime" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastExecutionTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.CleanupPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpec" = { + options = { + "conditions" = mkOption { + description = "Conditions defines the conditions used to select the resources which will be cleaned up."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecConditions"); + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterCleanupPolicySpecContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when cleanuppolicy should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExclude"); + }; + "match" = mkOption { + description = "MatchResources defines when cleanuppolicy should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatch"); + }; + "schedule" = mkOption { + description = "The schedule in Cron format"; + type = types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicySpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicyStatus" = { + options = { + "conditions" = mkOption { + description = ""; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterCleanupPolicyStatusConditions") + ); + }; + "lastExecutionTime" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + "lastExecutionTime" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterCleanupPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy behaviors."; + type = submoduleOf "kyverno.io.v2beta1.ClusterPolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpec" = { + options = { + "admission" = mkOption { + description = "Admission controls if rules are applied during admission.\nOptional. Default value is \"true\"."; + type = types.nullOr types.bool; + }; + "applyRules" = mkOption { + description = "ApplyRules controls how rules in a policy are applied. Rule are processed in\nthe order of declaration. When set to `One` processing stops after a rule has\nbeen applied i.e. the rule matches and results in a pass, fail, or error. When\nset to `All` all rules in the policy are processed. The default is `All`."; + type = types.nullOr types.str; + }; + "background" = mkOption { + description = "Background controls if rules are applied to existing resources during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "failurePolicy" = mkOption { + description = "FailurePolicy defines how unexpected policy errors and webhook response timeout errors are handled.\nRules within the same policy share the same failure behavior.\nAllowed values are Ignore or Fail. Defaults to Fail."; + type = types.nullOr types.str; + }; + "generateExisting" = mkOption { + description = "GenerateExisting controls whether to trigger generate rule in existing resources\nIf is set to \"true\" generate rule will be triggered and applied to existing matched resources.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "generateExistingOnPolicyUpdate" = mkOption { + description = "Deprecated, use generateExisting instead"; + type = types.nullOr types.bool; + }; + "mutateExistingOnPolicyUpdate" = mkOption { + description = "MutateExistingOnPolicyUpdate controls if a mutateExisting policy is applied on policy events.\nDefault value is \"false\"."; + type = types.nullOr types.bool; + }; + "rules" = mkOption { + description = "Rules is a list of Rule instances. A Policy contains multiple rules and\neach rule can validate, mutate, or generate resources."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRules" "name" [ ] + ); + apply = attrsToList; + }; + "schemaValidation" = mkOption { + description = "Deprecated."; + type = types.nullOr types.bool; + }; + "useServerSideApply" = mkOption { + description = "UseServerSideApply controls whether to use server-side apply for generate rules\nIf is set to \"true\" create & update for generate rules will use apply instead of create/update.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "validationFailureAction" = mkOption { + description = "ValidationFailureAction defines if a validation policy rule violation should block\nthe admission review request (enforce), or allow (audit) the admission review request\nand report an error in a policy report. Optional.\nAllowed values are audit or enforce. The default value is \"Audit\"."; + type = types.nullOr types.str; + }; + "validationFailureActionOverrides" = mkOption { + description = "ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction\nnamespace-wise. It overrides ValidationFailureAction for the specified namespaces."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecValidationFailureActionOverrides") + ); + }; + "webhookConfiguration" = mkOption { + description = "WebhookConfiguration specifies the custom configuration for Kubernetes admission webhookconfiguration.\nRequires Kubernetes 1.27 or later."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecWebhookConfiguration"); + }; + "webhookTimeoutSeconds" = mkOption { + description = "WebhookTimeoutSeconds specifies the maximum time in seconds allowed to apply this policy.\nAfter the configured time expires, the admission request may fail, or may simply ignore the policy results,\nbased on the failure policy. The default timeout is 10s, the value must be between 1 and 30 seconds."; + type = types.nullOr types.int; + }; + }; + + config = { + "admission" = mkOverride 1002 null; + "applyRules" = mkOverride 1002 null; + "background" = mkOverride 1002 null; + "failurePolicy" = mkOverride 1002 null; + "generateExisting" = mkOverride 1002 null; + "generateExistingOnPolicyUpdate" = mkOverride 1002 null; + "mutateExistingOnPolicyUpdate" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "schemaValidation" = mkOverride 1002 null; + "useServerSideApply" = mkOverride 1002 null; + "validationFailureAction" = mkOverride 1002 null; + "validationFailureActionOverrides" = mkOverride 1002 null; + "webhookConfiguration" = mkOverride 1002 null; + "webhookTimeoutSeconds" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesCelPreconditions" + "name" + [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesPreconditions"); + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImages") + ); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateCloneListSelector" + ); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeach") + ); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargets" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachPreconditions" + ); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidatePodSecurity"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelAuditAnnotations") + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamKind"); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamRef"); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelVariables" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamRefSelector" + ); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDenyConditions"); + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDenyConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDenyConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDenyConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDenyConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateDenyConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachDeny"); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachPreconditions" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsDryRun" + ); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsIgnoreFields") + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImages" = { + options = { + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestors") + ); + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesImageRegistryCredentials" + ); + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule"; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestors" + ) + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsConditions" + ) + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecValidationFailureActionOverrides" = { + options = { + "action" = mkOption { + description = "ValidationFailureAction defines the policy validation failure action"; + type = types.nullOr types.str; + }; + "namespaceSelector" = mkOption { + description = "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "action" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecWebhookConfiguration" = { + options = { + "matchConditions" = mkOption { + description = "MatchCondition configures admission webhook matchConditions."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicySpecWebhookConfigurationMatchConditions" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "matchConditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicySpecWebhookConfigurationMatchConditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatus" = { + options = { + "autogen" = mkOption { + description = "AutogenStatus contains autogen status information."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogen"); + }; + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusConditions")); + }; + "ready" = mkOption { + description = "Deprecated in favor of Conditions"; + type = types.bool; + }; + "rulecount" = mkOption { + description = "RuleCountStatus contains four variables which describes counts for\nvalidate, generate, mutate and verify images rules"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusRulecount"); + }; + "validatingadmissionpolicy" = mkOption { + description = "ValidatingAdmissionPolicy contains status information"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusValidatingadmissionpolicy"); + }; + }; + + config = { + "autogen" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "rulecount" = mkOverride 1002 null; + "validatingadmissionpolicy" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogen" = { + options = { + "rules" = mkOption { + description = "Rules is a list of Rule instances. It contains auto generated rules added for pod controllers"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRules" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "rules" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesCelPreconditions" + "name" + [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImages") + ); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAny") + ); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesExcludeSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateCloneList" + ); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelector" + ); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAny") + ); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResources" + ); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMatchSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeach") + ); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargets" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditions" + ); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifests" + ); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidatePodSecurity" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelAuditAnnotations" + ) + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelExpressions" + ) + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamKind" + ); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamRef" + ); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelVariables" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelector" + ); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachDeny" + ); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditions" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestors" + ) + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsDryRun" + ); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFields" + ) + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidatePodSecurityExclude" + ) + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImages" = { + options = { + "additionalExtensions" = mkOption { + description = "Deprecated."; + type = types.nullOr (types.attrsOf types.str); + }; + "annotations" = mkOption { + description = "Deprecated. Use annotations per Attestor instead."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestations" + ) + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestors") + ); + }; + "image" = mkOption { + description = "Deprecated. Use ImageReferences instead."; + type = types.nullOr types.str; + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" + ); + }; + "issuer" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "key" = mkOption { + description = "Deprecated. Use StaticKeyAttestor instead."; + type = types.nullOr types.str; + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "roots" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "subject" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule."; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "annotations" = mkOverride 1002 null; + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "image" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "key" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" + ) + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditions" + ) + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusRulecount" = { + options = { + "generate" = mkOption { + description = "Count for generate rules in policy"; + type = types.int; + }; + "mutate" = mkOption { + description = "Count for mutate rules in policy"; + type = types.int; + }; + "validate" = mkOption { + description = "Count for validate rules in policy"; + type = types.int; + }; + "verifyimages" = mkOption { + description = "Count for verify image rules in policy"; + type = types.int; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.ClusterPolicyStatusValidatingadmissionpolicy" = { + options = { + "generated" = mkOption { + description = "Generated indicates whether a validating admission policy is generated from the policy or not"; + type = types.bool; + }; + "message" = mkOption { + description = "Message is a human readable message indicating details about the generation of validating admission policy\nIt is an empty string when validating admission policy is successfully generated."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.Policy" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec defines policy behaviors and contains one or more rules."; + type = submoduleOf "kyverno.io.v2beta1.PolicySpec"; + }; + "status" = mkOption { + description = "Status contains policy runtime data."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatus"); + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + "status" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyException" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"; + type = types.nullOr types.str; + }; + "metadata" = mkOption { + description = "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"; + type = types.nullOr (globalSubmoduleOf "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"); + }; + "spec" = mkOption { + description = "Spec declares policy exception behaviors."; + type = submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpec"; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "metadata" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpec" = { + options = { + "background" = mkOption { + description = "Background controls if exceptions are applied to existing policies during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "conditions" = mkOption { + description = "Conditions are used to determine if a resource applies to the exception by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecConditions"); + }; + "exceptions" = mkOption { + description = "Exceptions is a list policy/rules to be excluded"; + type = types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecExceptions"); + }; + "match" = mkOption { + description = "Match defines match clause used to check if a resource applies to the exception"; + type = submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatch"; + }; + "podSecurity" = mkOption { + description = "PodSecurity specifies the Pod Security Standard controls to be excluded.\nApplicable only to policies that have validate.podSecurity subrule."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecPodSecurity") + ); + }; + }; + + config = { + "background" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecExceptions" = { + options = { + "policyName" = mkOption { + description = "PolicyName identifies the policy to which the exception is applied.\nThe policy name uses the format / unless it\nreferences a ClusterPolicy."; + type = types.str; + }; + "ruleNames" = mkOption { + description = "RuleNames identifies the rules to which the exception is applied."; + type = types.listOf types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnySubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyExceptionSpecPodSecurity" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpec" = { + options = { + "admission" = mkOption { + description = "Admission controls if rules are applied during admission.\nOptional. Default value is \"true\"."; + type = types.nullOr types.bool; + }; + "applyRules" = mkOption { + description = "ApplyRules controls how rules in a policy are applied. Rule are processed in\nthe order of declaration. When set to `One` processing stops after a rule has\nbeen applied i.e. the rule matches and results in a pass, fail, or error. When\nset to `All` all rules in the policy are processed. The default is `All`."; + type = types.nullOr types.str; + }; + "background" = mkOption { + description = "Background controls if rules are applied to existing resources during a background scan.\nOptional. Default value is \"true\". The value must be set to \"false\" if the policy rule\nuses variables that are only available in the admission review request (e.g. user name)."; + type = types.nullOr types.bool; + }; + "failurePolicy" = mkOption { + description = "FailurePolicy defines how unexpected policy errors and webhook response timeout errors are handled.\nRules within the same policy share the same failure behavior.\nAllowed values are Ignore or Fail. Defaults to Fail."; + type = types.nullOr types.str; + }; + "generateExisting" = mkOption { + description = "GenerateExisting controls whether to trigger generate rule in existing resources\nIf is set to \"true\" generate rule will be triggered and applied to existing matched resources.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "generateExistingOnPolicyUpdate" = mkOption { + description = "Deprecated, use generateExisting instead"; + type = types.nullOr types.bool; + }; + "mutateExistingOnPolicyUpdate" = mkOption { + description = "MutateExistingOnPolicyUpdate controls if a mutateExisting policy is applied on policy events.\nDefault value is \"false\"."; + type = types.nullOr types.bool; + }; + "rules" = mkOption { + description = "Rules is a list of Rule instances. A Policy contains multiple rules and\neach rule can validate, mutate, or generate resources."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRules" "name" [ ] + ); + apply = attrsToList; + }; + "schemaValidation" = mkOption { + description = "Deprecated."; + type = types.nullOr types.bool; + }; + "useServerSideApply" = mkOption { + description = "UseServerSideApply controls whether to use server-side apply for generate rules\nIf is set to \"true\" create & update for generate rules will use apply instead of create/update.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "validationFailureAction" = mkOption { + description = "ValidationFailureAction defines if a validation policy rule violation should block\nthe admission review request (enforce), or allow (audit) the admission review request\nand report an error in a policy report. Optional.\nAllowed values are audit or enforce. The default value is \"Audit\"."; + type = types.nullOr types.str; + }; + "validationFailureActionOverrides" = mkOption { + description = "ValidationFailureActionOverrides is a Cluster Policy attribute that specifies ValidationFailureAction\nnamespace-wise. It overrides ValidationFailureAction for the specified namespaces."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecValidationFailureActionOverrides") + ); + }; + "webhookConfiguration" = mkOption { + description = "WebhookConfiguration specifies the custom configuration for Kubernetes admission webhookconfiguration.\nRequires Kubernetes 1.27 or later."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecWebhookConfiguration"); + }; + "webhookTimeoutSeconds" = mkOption { + description = "WebhookTimeoutSeconds specifies the maximum time in seconds allowed to apply this policy.\nAfter the configured time expires, the admission request may fail, or may simply ignore the policy results,\nbased on the failure policy. The default timeout is 10s, the value must be between 1 and 30 seconds."; + type = types.nullOr types.int; + }; + }; + + config = { + "admission" = mkOverride 1002 null; + "applyRules" = mkOverride 1002 null; + "background" = mkOverride 1002 null; + "failurePolicy" = mkOverride 1002 null; + "generateExisting" = mkOverride 1002 null; + "generateExistingOnPolicyUpdate" = mkOverride 1002 null; + "mutateExistingOnPolicyUpdate" = mkOverride 1002 null; + "rules" = mkOverride 1002 null; + "schemaValidation" = mkOverride 1002 null; + "useServerSideApply" = mkOverride 1002 null; + "validationFailureAction" = mkOverride 1002 null; + "validationFailureActionOverrides" = mkOverride 1002 null; + "webhookConfiguration" = mkOverride 1002 null; + "webhookTimeoutSeconds" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesCelPreconditions" "name" [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesPreconditions"); + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImages")); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextGlobalReference"); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextApiCallService"); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesExcludeAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesExcludeAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesGenerateCloneListSelector"); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAll")); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAny")); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesMatchAllSubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesMatchAnySubjects" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesSelector"); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeach")); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesMutateTargets" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContext" "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachPreconditions"); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContext" "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidatePodSecurity"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCelAuditAnnotations") + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamKind"); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamRef"); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesValidateCelVariables" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamRefSelector"); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateDenyConditions"); + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateDenyConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateDenyConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateDenyConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateDenyConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateDenyConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContext" "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachDeny"); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachPreconditions"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachPreconditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateForeachPreconditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsDryRun"); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsIgnoreFields") + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImages" = { + options = { + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestors") + ); + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesImageRegistryCredentials" + ); + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule"; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestors") + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsConditions") + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsConditionsAll") + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsConditionsAny") + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicySpecRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecValidationFailureActionOverrides" = { + options = { + "action" = mkOption { + description = "ValidationFailureAction defines the policy validation failure action"; + type = types.nullOr types.str; + }; + "namespaceSelector" = mkOption { + description = "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicySpecValidationFailureActionOverridesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "action" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecValidationFailureActionOverridesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecValidationFailureActionOverridesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecWebhookConfiguration" = { + options = { + "matchConditions" = mkOption { + description = "MatchCondition configures admission webhook matchConditions."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.PolicySpecWebhookConfigurationMatchConditions" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "matchConditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicySpecWebhookConfigurationMatchConditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatus" = { + options = { + "autogen" = mkOption { + description = "AutogenStatus contains autogen status information."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogen"); + }; + "conditions" = mkOption { + description = ""; + type = types.nullOr (types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusConditions")); + }; + "ready" = mkOption { + description = "Deprecated in favor of Conditions"; + type = types.bool; + }; + "rulecount" = mkOption { + description = "RuleCountStatus contains four variables which describes counts for\nvalidate, generate, mutate and verify images rules"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusRulecount"); + }; + "validatingadmissionpolicy" = mkOption { + description = "ValidatingAdmissionPolicy contains status information"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusValidatingadmissionpolicy"); + }; + }; + + config = { + "autogen" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "rulecount" = mkOverride 1002 null; + "validatingadmissionpolicy" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogen" = { + options = { + "rules" = mkOption { + description = "Rules is a list of Rule instances. It contains auto generated rules added for pod controllers"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRules" "name" [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "rules" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRules" = { + options = { + "celPreconditions" = mkOption { + description = "CELPreconditions are used to determine if a policy rule should be applied by evaluating a\nset of CEL conditions. It can only be used with the validate.cel subrule"; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesCelPreconditions" + "name" + [ ] + ); + apply = attrsToList; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesContext" "name" [ ] + ); + apply = attrsToList; + }; + "exclude" = mkOption { + description = "ExcludeResources defines when this policy rule should not be applied. The exclude\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the name or role."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExclude"); + }; + "generate" = mkOption { + description = "Generation is used to create new resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerate"); + }; + "imageExtractors" = mkOption { + description = "ImageExtractors defines a mapping from kinds to ImageExtractorConfigs.\nThis config is only valid for verifyImages rules."; + type = types.nullOr (types.loaOf types.attrs); + }; + "match" = mkOption { + description = "MatchResources defines when this policy rule should be applied. The match\ncriteria can include resource information (e.g. kind, name, namespace, labels)\nand admission review request information like the user name or role.\nAt least one kind is required."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatch"); + }; + "mutate" = mkOption { + description = "Mutation is used to modify matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutate"); + }; + "name" = mkOption { + description = "Name is a label to identify the rule, It must be unique within the policy."; + type = types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "skipBackgroundRequests" = mkOption { + description = "SkipBackgroundRequests bypasses admission requests that are sent by the background controller.\nThe default value is set to \"true\", it must be set to \"false\" to apply\ngenerate and mutateExisting rules to those requests."; + type = types.nullOr types.bool; + }; + "validate" = mkOption { + description = "Validation is used to validate matching resources."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidate"); + }; + "verifyImages" = mkOption { + description = "VerifyImages is used to verify image signatures and mutate them to add a digest"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImages") + ); + }; + }; + + config = { + "celPreconditions" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "exclude" = mkOverride 1002 null; + "generate" = mkOverride 1002 null; + "imageExtractors" = mkOverride 1002 null; + "match" = mkOverride 1002 null; + "mutate" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "skipBackgroundRequests" = mkOverride 1002 null; + "validate" = mkOverride 1002 null; + "verifyImages" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesCelPreconditions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool.\nCEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n\n'object' - The object from the incoming request. The value is null for DELETE requests.\n'oldObject' - The existing object. The value is null for CREATE requests.\n'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest).\n'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\n\nRequired."; + type = types.str; + }; + "name" = mkOption { + description = "Name is an identifier for this match condition, used for strategic merging of MatchConditions,\nas well as providing an identifier for logging purposes. A good name should be descriptive of\nthe associated expression.\nName must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and\nmust start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or\n'123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an\noptional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextApiCall"); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextConfigMap"); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextImageRegistry"); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextVariable"); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextApiCallData") + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExclude" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAny") + ); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesExcludeSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerate" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "clone" = mkOption { + description = "Clone specifies the source resource used to populate each generated resource.\nAt most one of Data or Clone can be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateClone"); + }; + "cloneList" = mkOption { + description = "CloneList specifies the list of source resource used to populate each generated resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateCloneList"); + }; + "data" = mkOption { + description = "Data provides the resource declaration used to populate each generated resource.\nAt most one of Data or Clone must be specified. If neither are provided, the generated\nresource will be created with default data only."; + type = types.nullOr types.attrs; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "orphanDownstreamOnPolicyDelete" = mkOption { + description = "OrphanDownstreamOnPolicyDelete controls whether generated resources should be deleted when the rule that generated\nthem is deleted with synchronization enabled. This option is only applicable to generate rules of the data type.\nSee https://kyverno.io/docs/writing-policies/generate/#data-examples.\nDefaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "synchronize" = mkOption { + description = "Synchronize controls if generated resources should be kept in-sync with their source resource.\nIf Synchronize is set to \"true\" changes to generated resources will be overwritten with resource\ndata from Data or the resource specified in the Clone declaration.\nOptional. Defaults to \"false\" if not specified."; + type = types.nullOr types.bool; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "clone" = mkOverride 1002 null; + "cloneList" = mkOverride 1002 null; + "data" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "orphanDownstreamOnPolicyDelete" = mkOverride 1002 null; + "synchronize" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateClone" = { + options = { + "name" = mkOption { + description = "Name specifies name of the resource."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateCloneList" = { + options = { + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "namespace" = mkOption { + description = "Namespace specifies source resource namespace."; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels`.\nwildcard characters are not supported."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateCloneListSelector" + ); + }; + }; + + config = { + "kinds" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateCloneListSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesGenerateCloneListSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatch" = { + options = { + "all" = mkOption { + description = "All allows specifying resources which will be ANDed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAll") + ); + }; + "any" = mkOption { + description = "Any allows specifying resources which will be ORed"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAny") + ); + }; + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified.\nRequires at least one tag to be specified when under MatchResources.\nSpecifying ResourceDescription directly under match is being deprecated.\nPlease specify under \"any\" or \"all\" instead."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchSubjects" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAll" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllSubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAllSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAny" = { + options = { + "clusterRoles" = mkOption { + description = "ClusterRoles is the list of cluster-wide role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "resources" = mkOption { + description = "ResourceDescription contains information about the resource being created or modified."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResources"); + }; + "roles" = mkOption { + description = "Roles is the list of namespaced role names for the user."; + type = types.nullOr (types.listOf types.str); + }; + "subjects" = mkOption { + description = "Subjects is the list of subject names like users, user groups, and service accounts."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnySubjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "clusterRoles" = mkOverride 1002 null; + "resources" = mkOverride 1002 null; + "roles" = mkOverride 1002 null; + "subjects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnyResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchAnySubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResources" = { + options = { + "annotations" = mkOption { + description = "Annotations is a map of annotations (key-value pairs of type string). Annotation keys\nand values support the wildcard characters \"*\" (matches zero or many characters) and\n\"?\" (matches at least one character)."; + type = types.nullOr (types.attrsOf types.str); + }; + "kinds" = mkOption { + description = "Kinds is a list of resource kinds."; + type = types.nullOr (types.listOf types.str); + }; + "name" = mkOption { + description = "Name is the name of the resource. The name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character).\nNOTE: \"Name\" is being deprecated in favor of \"Names\"."; + type = types.nullOr types.str; + }; + "names" = mkOption { + description = "Names are the names of the resources. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "namespaceSelector" = mkOption { + description = "NamespaceSelector is a label selector for the resource namespace. Label keys and values\nin `matchLabels` support the wildcard characters `*` (matches zero or many characters)\nand `?` (matches one character).Wildcards allows writing label selectors like\n[\"storage.k8s.io/*\": \"*\"]. Note that using [\"*\" : \"*\"] matches any key and value but\ndoes not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelector" + ); + }; + "namespaces" = mkOption { + description = "Namespaces is a list of namespaces names. Each name supports wildcard characters\n\"*\" (matches zero or many characters) and \"?\" (at least one character)."; + type = types.nullOr (types.listOf types.str); + }; + "operations" = mkOption { + description = "Operations can contain values [\"CREATE, \"UPDATE\", \"CONNECT\", \"DELETE\"], which are used to match a specific action."; + type = types.nullOr (types.listOf types.str); + }; + "selector" = mkOption { + description = "Selector is a label selector. Label keys and values in `matchLabels` support the wildcard\ncharacters `*` (matches zero or many characters) and `?` (matches one character).\nWildcards allows writing label selectors like [\"storage.k8s.io/*\": \"*\"]. Note that\nusing [\"*\" : \"*\"] matches any key and value but does not match an empty label set."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesSelector" + ); + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "kinds" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "names" = mkOverride 1002 null; + "namespaceSelector" = mkOverride 1002 null; + "namespaces" = mkOverride 1002 null; + "operations" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesNamespaceSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchResourcesSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMatchSubjects" = { + options = { + "apiGroup" = mkOption { + description = "APIGroup holds the API group of the referenced subject.\nDefaults to \"\" for ServiceAccount subjects.\nDefaults to \"rbac.authorization.k8s.io\" for User and Group subjects."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\".\nIf the Authorizer does not recognized the kind value, the Authorizer should report an error."; + type = types.str; + }; + "name" = mkOption { + description = "Name of the object being referenced."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty\nthe Authorizer should report an error."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiGroup" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutate" = { + options = { + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeach") + ); + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "targets" = mkOption { + description = "Targets defines the target resources to be mutated."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargets" "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "foreach" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "targets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeach" = { + options = { + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "order" = mkOption { + description = "Order defines the iteration order on the list.\nCan be Ascending to iterate from first to last element or Descending to iterate in from last to first element."; + type = types.nullOr types.str; + }; + "patchStrategicMerge" = mkOption { + description = "PatchStrategicMerge is a strategic merge patch used to modify resources.\nSee https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/\nand https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/."; + type = types.nullOr types.attrs; + }; + "patchesJson6902" = mkOption { + description = "PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources.\nSee https://tools.ietf.org/html/rfc6902 and https://kubectl.docs.kubernetes.io/references/kustomize/patchesjson6902/."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachPreconditions" + ); + }; + }; + + config = { + "context" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "order" = mkOverride 1002 null; + "patchStrategicMerge" = mkOverride 1002 null; + "patchesJson6902" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargets" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion specifies resource apiVersion."; + type = types.nullOr types.str; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "kind" = mkOption { + description = "Kind specifies resource kind."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name specifies the resource name."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "Namespace specifies resource namespace."; + type = types.nullOr types.str; + }; + "preconditions" = mkOption { + description = "Preconditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements. A direct list\nof conditions (without `any` or `all` statements is supported for backwards compatibility but\nwill be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr types.attrs; + }; + "uid" = mkOption { + description = "UID specifies the resource uid."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + "uid" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesMutateTargetsContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidate" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "cel" = mkOption { + description = "CEL allows validation checks using the Common Expression Language (https://kubernetes.io/docs/reference/using-api/cel/)."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCel"); + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateDeny"); + }; + "foreach" = mkOption { + 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."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeach") + ); + }; + "manifests" = mkOption { + description = "Manifest specifies conditions for manifest verification"; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifests"); + }; + "message" = mkOption { + description = "Message specifies a custom message to be displayed on failure."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "podSecurity" = mkOption { + description = "PodSecurity applies exemptions for Kubernetes Pod Security admission\nby specifying exclusions for Pod Security Standards controls."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidatePodSecurity"); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "cel" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "manifests" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "podSecurity" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCel" = { + options = { + "auditAnnotations" = mkOption { + description = "AuditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelAuditAnnotations") + ); + }; + "expressions" = mkOption { + description = "Expressions is a list of CELExpression types."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelExpressions") + ); + }; + "paramKind" = mkOption { + description = "ParamKind is a tuple of Group Kind and Version."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamKind"); + }; + "paramRef" = mkOption { + description = "ParamRef references a parameter resource."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamRef"); + }; + "variables" = mkOption { + description = "Variables contain definitions of variables that can be used in composition of other expressions.\nEach variable is defined as a named CEL expression.\nThe variables defined here will be available under `variables` in other expressions of the policy."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelVariables" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "auditAnnotations" = mkOverride 1002 null; + "expressions" = mkOverride 1002 null; + "paramKind" = mkOverride 1002 null; + "paramRef" = mkOverride 1002 null; + "variables" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelAuditAnnotations" = { + options = { + "key" = mkOption { + description = "key specifies the audit annotation key. The audit annotation keys of\na ValidatingAdmissionPolicy must be unique. The key must be a qualified\nname ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\n\nThe key is combined with the resource name of the\nValidatingAdmissionPolicy to construct an audit annotation key:\n\"{ValidatingAdmissionPolicy name}/{key}\".\n\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy\nand the same audit annotation key, the annotation key will be identical.\nIn this case, the first annotation written with the key will be included\nin the audit event and all subsequent annotations with the same key\nwill be discarded.\n\n\nRequired."; + type = types.str; + }; + "valueExpression" = mkOption { + description = "valueExpression represents the expression which is evaluated by CEL to\nproduce an audit annotation value. The expression must evaluate to either\na string or null value. If the expression evaluates to a string, the\naudit annotation is included with the string value. If the expression\nevaluates to null or empty string the audit annotation will be omitted.\nThe valueExpression may be no longer than 5kb in length.\nIf the result of the valueExpression is more than 10kb in length, it\nwill be truncated to 10kb.\n\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an\nAPI request, then the valueExpression will be evaluated for\neach binding. All unique values produced by the valueExpressions\nwill be joined together in a comma-separated list.\n\n\nRequired."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelExpressions" = { + options = { + "expression" = mkOption { + description = "Expression represents the expression which will be evaluated by CEL.\nref: https://github.com/google/cel-spec\nCEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests.\n- 'oldObject' - The existing object. The value is null for CREATE requests.\n- 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)).\n- 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind.\n- 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources.\n- 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the\nobject. No other metadata properties are accessible.\n\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible.\nAccessible property names are escaped according to the following rules when accessed in the expression:\n- '__' escapes to '__underscores__'\n- '.' escapes to '__dot__'\n- '-' escapes to '__dash__'\n- '/' escapes to '__slash__'\n- Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1].\nConcatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired."; + type = types.str; + }; + "message" = mkOption { + description = "Message represents the message displayed when validation fails. The message is required if the Expression contains\nline breaks. The message must not contain line breaks.\nIf unset, the message is \"failed rule: {Rule}\".\ne.g. \"must be a URL with the host matching spec.host\"\nIf the Expression contains line breaks. Message is required.\nThe message must not contain line breaks.\nIf unset, the message is \"failed Expression: {Expression}\"."; + type = types.nullOr types.str; + }; + "messageExpression" = mkOption { + description = "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.\nSince messageExpression is used as a failure message, it must evaluate to a string.\nIf both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.\nIf messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced\nas if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string\nthat contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and\nthe fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.\nmessageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.\nExample:\n\"object.x must be less than max (\"+string(params.max)+\")\""; + type = types.nullOr types.str; + }; + "reason" = mkOption { + description = "Reason represents a machine-readable description of why this validation failed.\nIf this is the first validation in the list to fail, this reason, as well as the\ncorresponding HTTP response code, are used in the\nHTTP response to the client.\nThe currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\".\nIf not set, StatusReasonInvalid is used in the response to the client."; + type = types.nullOr types.str; + }; + }; + + config = { + "message" = mkOverride 1002 null; + "messageExpression" = mkOverride 1002 null; + "reason" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamKind" = { + options = { + "apiVersion" = mkOption { + description = "APIVersion is the API group version the resources belong to.\nIn format of \"group/version\".\nRequired."; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = "Kind is the API kind the resources belong to.\nRequired."; + type = types.nullOr types.str; + }; + }; + + config = { + "apiVersion" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamRef" = { + options = { + "name" = mkOption { + description = "`name` is the name of the resource being referenced.\n\n\n`name` and `selector` are mutually exclusive properties. If one is set,\nthe other must be unset."; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = "namespace is the namespace of the referenced resource. Allows limiting\nthe search for params to a specific namespace. Applies to both `name` and\n`selector` fields.\n\n\nA per-namespace parameter may be used by specifying a namespace-scoped\n`paramKind` in the policy and leaving this field empty.\n\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this\nfield results in a configuration error.\n\n\n- If `paramKind` is namespace-scoped, the namespace of the object being\nevaluated for admission will be used when this field is left unset. Take\ncare that if this is left empty the binding must not match any cluster-scoped\nresources, which will result in an error."; + type = types.nullOr types.str; + }; + "parameterNotFoundAction" = mkOption { + description = "`parameterNotFoundAction` controls the behavior of the binding when the resource\nexists, and name or selector is valid, but there are no parameters\nmatched by the binding. If the value is set to `Allow`, then no\nmatched parameters will be treated as successful validation by the binding.\nIf set to `Deny`, then no matched parameters will be subject to the\n`failurePolicy` of the policy.\n\n\nAllowed values are `Allow` or `Deny`\nDefault to `Deny`"; + type = types.nullOr types.str; + }; + "selector" = mkOption { + description = "selector can be used to match multiple param objects based on their labels.\nSupply selector: {} to match all resources of the ParamKind.\n\n\nIf multiple params are found, they are all evaluated with the policy expressions\nand the results are ANDed together.\n\n\nOne of `name` or `selector` must be set, but `name` and `selector` are\nmutually exclusive properties. If one is set, the other must be unset."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamRefSelector" + ); + }; + }; + + config = { + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "parameterNotFoundAction" = mkOverride 1002 null; + "selector" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamRefSelector" = { + options = { + "matchExpressions" = mkOption { + description = "matchExpressions is a list of label selector requirements. The requirements are ANDed."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" + ) + ); + }; + "matchLabels" = mkOption { + description = "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed."; + type = types.nullOr (types.attrsOf types.str); + }; + }; + + config = { + "matchExpressions" = mkOverride 1002 null; + "matchLabels" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelParamRefSelectorMatchExpressions" = { + options = { + "key" = mkOption { + description = "key is the label key that the selector applies to."; + type = types.str; + }; + "operator" = mkOption { + description = "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist."; + type = types.str; + }; + "values" = mkOption { + description = "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateCelVariables" = { + options = { + "expression" = mkOption { + description = "Expression is the expression that will be evaluated as the value of the variable.\nThe CEL expression has access to the same identifiers as the CEL expressions in Validation."; + type = types.str; + }; + "name" = mkOption { + description = "Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables.\nThe variable can be accessed in other expressions through `variables`\nFor example, if name is \"foo\", the variable will be available as `variables.foo`"; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeach" = { + options = { + "anyPattern" = mkOption { + description = "AnyPattern specifies list of validation patterns. At least one of the patterns\nmust be satisfied for the validation rule to succeed."; + type = types.nullOr types.attrs; + }; + "context" = mkOption { + description = "Context defines variables and data sources that can be used during rule execution."; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContext" + "name" + [ ] + ); + apply = attrsToList; + }; + "deny" = mkOption { + description = "Deny defines conditions used to pass or fail a validation rule."; + type = types.nullOr (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachDeny"); + }; + "elementScope" = mkOption { + description = "ElementScope specifies whether to use the current list element as the scope for validation. Defaults to \"true\" if not specified.\nWhen set to \"false\", \"request.object\" is used as the validation scope within the foreach\nblock to allow referencing other elements in the subtree."; + type = types.nullOr types.bool; + }; + "foreach" = mkOption { + description = "Foreach declares a nested foreach iterator"; + type = types.nullOr types.attrs; + }; + "list" = mkOption { + description = "List specifies a JMESPath expression that results in one or more elements\nto which the validation logic is applied."; + type = types.nullOr types.str; + }; + "pattern" = mkOption { + description = "Pattern specifies an overlay-style pattern used to check resources."; + type = types.nullOr types.attrs; + }; + "preconditions" = mkOption { + description = "AnyAllConditions are used to determine if a policy rule should be applied by evaluating a\nset of conditions. The declaration can contain nested `any` or `all` statements.\nSee: https://kyverno.io/docs/writing-policies/preconditions/"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachPreconditions" + ); + }; + }; + + config = { + "anyPattern" = mkOverride 1002 null; + "context" = mkOverride 1002 null; + "deny" = mkOverride 1002 null; + "elementScope" = mkOverride 1002 null; + "foreach" = mkOverride 1002 null; + "list" = mkOverride 1002 null; + "pattern" = mkOverride 1002 null; + "preconditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContext" = { + options = { + "apiCall" = mkOption { + description = "APICall is an HTTP request to the Kubernetes API server, or other JSON web service.\nThe data returned is stored in the context with the name for the context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextApiCall" + ); + }; + "configMap" = mkOption { + description = "ConfigMap is the ConfigMap reference."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextConfigMap" + ); + }; + "globalReference" = mkOption { + description = "GlobalContextEntryReference is a reference to a cached global context entry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextGlobalReference" + ); + }; + "imageRegistry" = mkOption { + description = "ImageRegistry defines requests to an OCI/Docker V2 registry to fetch image\ndetails."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextImageRegistry" + ); + }; + "name" = mkOption { + description = "Name is the variable name."; + type = types.nullOr types.str; + }; + "variable" = mkOption { + description = "Variable defines an arbitrary JMESPath context variable that can be defined inline."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextVariable" + ); + }; + }; + + config = { + "apiCall" = mkOverride 1002 null; + "configMap" = mkOverride 1002 null; + "globalReference" = mkOverride 1002 null; + "imageRegistry" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "variable" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextApiCall" = { + options = { + "data" = mkOption { + description = "The data object specifies the POST data sent to the server.\nOnly applicable when the method field is set to POST."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextApiCallData" + ) + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "method" = mkOption { + description = "Method is the HTTP request type (GET or POST)."; + type = types.nullOr types.str; + }; + "service" = mkOption { + description = "Service is an API call to a JSON web service.\nThis is used for non-Kubernetes API server calls.\nIt's mutually exclusive with the URLPath field."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextApiCallService" + ); + }; + "urlPath" = mkOption { + description = "URLPath is the URL path to be used in the HTTP GET or POST request to the\nKubernetes API server (e.g. \"/api/v1/namespaces\" or \"/apis/apps/v1/deployments\").\nThe format required is the same format used by the `kubectl get --raw` command.\nSee https://kyverno.io/docs/writing-policies/external-data-sources/#variables-from-kubernetes-api-server-calls\nfor details.\nIt's mutually exclusive with the Service field."; + type = types.nullOr types.str; + }; + }; + + config = { + "data" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "method" = mkOverride 1002 null; + "service" = mkOverride 1002 null; + "urlPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextApiCallData" = { + options = { + "key" = mkOption { + description = "Key is a unique identifier for the data value"; + type = types.str; + }; + "value" = mkOption { + description = "Value is the data value"; + type = types.attrs; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextApiCallService" = { + options = { + "caBundle" = mkOption { + description = "CABundle is a PEM encoded CA bundle which will be used to validate\nthe server certificate."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the JSON web service URL. A typical form is\n`https://{service}.{namespace}:{port}/{path}`."; + type = types.str; + }; + }; + + config = { + "caBundle" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextConfigMap" = { + options = { + "name" = mkOption { + description = "Name is the ConfigMap name."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace is the ConfigMap namespace."; + type = types.nullOr types.str; + }; + }; + + config = { + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextGlobalReference" = { + options = { + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the JSON response returned from the server. For example\na JMESPath of \"items | length(@)\" applied to the API server response\nfor the URLPath \"/apis/apps/v1/deployments\" will return the total count\nof deployments across all namespaces."; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = "Name of the global context entry"; + type = types.nullOr types.str; + }; + }; + + config = { + "jmesPath" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextImageRegistry" = { + options = { + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" + ); + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JSON Match Expression that can be used to\ntransform the ImageData struct returned as a result of processing\nthe image reference."; + type = types.nullOr types.str; + }; + "reference" = mkOption { + description = "Reference is image reference to a container image in the registry.\nExample: ghcr.io/kyverno/kyverno:latest"; + type = types.str; + }; + }; + + config = { + "imageRegistryCredentials" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextImageRegistryImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachContextVariable" = { + options = { + "default" = mkOption { + description = "Default is an optional arbitrary JSON object that the variable may take if the JMESPath\nexpression evaluates to nil"; + type = types.nullOr types.attrs; + }; + "jmesPath" = mkOption { + description = "JMESPath is an optional JMESPath Expression that can be used to\ntransform the variable."; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is any arbitrary JSON object representable in YAML or JSON form."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "default" = mkOverride 1002 null; + "jmesPath" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachDeny" = { + options = { + "conditions" = mkOption { + description = "Multiple conditions can be declared under an `any` or `all` statement. A direct list\nof conditions (without `any` or `all` statements) is also supported for backwards compatibility\nbut will be deprecated in the next major release.\nSee: https://kyverno.io/docs/writing-policies/validate/#deny-rules"; + type = types.nullOr types.attrs; + }; + }; + + config = { + "conditions" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachPreconditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachPreconditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachPreconditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachPreconditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateForeachPreconditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifests" = { + options = { + "annotationDomain" = mkOption { + description = "AnnotationDomain is custom domain of annotation for message and signature. Default is \"cosign.sigstore.dev\"."; + type = types.nullOr types.str; + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestors") + ); + }; + "dryRun" = mkOption { + description = "DryRun configuration"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsDryRun" + ); + }; + "ignoreFields" = mkOption { + description = "Fields which will be ignored while comparing manifests."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsIgnoreFields" + ) + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for resource bundle reference.\nThe repository can be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotationDomain" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "dryRun" = mkOverride 1002 null; + "ignoreFields" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsDryRun" = { + options = { + "enable" = mkOption { + description = ""; + type = types.nullOr types.bool; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "enable" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsIgnoreFields" = { + options = { + "fields" = mkOption { + description = ""; + type = types.nullOr (types.listOf types.str); + }; + "objects" = mkOption { + description = ""; + type = types.nullOr ( + coerceAttrsOfSubmodulesToListByKey + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" + "name" + [ ] + ); + apply = attrsToList; + }; + }; + + config = { + "fields" = mkOverride 1002 null; + "objects" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidateManifestsIgnoreFieldsObjects" = { + options = { + "group" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "kind" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "name" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "namespace" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = ""; + type = types.nullOr types.str; + }; + }; + + config = { + "group" = mkOverride 1002 null; + "kind" = mkOverride 1002 null; + "name" = mkOverride 1002 null; + "namespace" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidatePodSecurity" = { + options = { + "exclude" = mkOption { + description = "Exclude specifies the Pod Security Standard controls to be excluded."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidatePodSecurityExclude") + ); + }; + "level" = mkOption { + description = "Level defines the Pod Security Standard level to be applied to workloads.\nAllowed values are privileged, baseline, and restricted."; + type = types.nullOr types.str; + }; + "version" = mkOption { + description = "Version defines the Pod Security Standard versions that Kubernetes supports.\nAllowed values are v1.19, v1.20, v1.21, v1.22, v1.23, v1.24, v1.25, v1.26, v1.27, v1.28, v1.29, latest. Defaults to latest."; + type = types.nullOr types.str; + }; + }; + + config = { + "exclude" = mkOverride 1002 null; + "level" = mkOverride 1002 null; + "version" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesValidatePodSecurityExclude" = { + options = { + "controlName" = mkOption { + description = "ControlName specifies the name of the Pod Security Standard control.\nSee: https://kubernetes.io/docs/concepts/security/pod-security-standards/"; + type = types.str; + }; + "images" = mkOption { + description = "Images selects matching containers and applies the container level PSS.\nEach image is the image name consisting of the registry address, repository, image, and tag.\nEmpty list matches no containers, PSS checks are applied at the pod level only.\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "restrictedField" = mkOption { + description = "RestrictedField selects the field for the given Pod Security Standard control.\nWhen not set, all restricted fields for the control are selected."; + type = types.nullOr types.str; + }; + "values" = mkOption { + description = "Values defines the allowed values that can be excluded."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "images" = mkOverride 1002 null; + "restrictedField" = mkOverride 1002 null; + "values" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImages" = { + options = { + "additionalExtensions" = mkOption { + description = "Deprecated."; + type = types.nullOr (types.attrsOf types.str); + }; + "annotations" = mkOption { + description = "Deprecated. Use annotations per Attestor instead."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestations" = mkOption { + description = "Attestations are optional checks for signed in-toto Statements used to verify the image.\nSee https://github.com/in-toto/attestation. Kyverno fetches signed attestations from the\nOCI registry and decodes them into a list of Statement declarations."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestations") + ); + }; + "attestors" = mkOption { + description = "Attestors specified the required attestors (i.e. authorities)"; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestors") + ); + }; + "image" = mkOption { + description = "Deprecated. Use ImageReferences instead."; + type = types.nullOr types.str; + }; + "imageReferences" = mkOption { + description = "ImageReferences is a list of matching image reference patterns. At least one pattern in the\nlist must match the image for the rule to apply. Each image reference consists of a registry\naddress (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "imageRegistryCredentials" = mkOption { + description = "ImageRegistryCredentials provides credentials that will be used for authentication with registry."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" + ); + }; + "issuer" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "key" = mkOption { + description = "Deprecated. Use StaticKeyAttestor instead."; + type = types.nullOr types.str; + }; + "mutateDigest" = mkOption { + description = "MutateDigest enables replacement of image tags with digests.\nDefaults to true."; + type = types.nullOr types.bool; + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for image signatures and attestations that match this rule.\nIf specified Repository will override the default OCI image repository configured for the installation.\nThe repository can also be overridden per Attestor or Attestation."; + type = types.nullOr types.str; + }; + "required" = mkOption { + description = "Required validates that images are verified i.e. have matched passed a signature or attestation check."; + type = types.nullOr types.bool; + }; + "roots" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "skipImageReferences" = mkOption { + description = "SkipImageReferences is a list of matching image reference patterns that should be skipped.\nAt least one pattern in the list must match the image for the rule to be skipped. Each image reference\nconsists of a registry address (defaults to docker.io), repository, image, and tag (defaults to latest).\nWildcards ('*' and '?') are allowed. See: https://kubernetes.io/docs/concepts/containers/images."; + type = types.nullOr (types.listOf types.str); + }; + "subject" = mkOption { + description = "Deprecated. Use KeylessAttestor instead."; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type specifies the method of signature validation. The allowed options\nare Cosign and Notary. By default Cosign is used if a type is not specified."; + type = types.nullOr types.str; + }; + "useCache" = mkOption { + description = "UseCache enables caching of image verify responses for this rule."; + type = types.nullOr types.bool; + }; + "verifyDigest" = mkOption { + description = "VerifyDigest validates that images have a digest."; + type = types.nullOr types.bool; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "annotations" = mkOverride 1002 null; + "attestations" = mkOverride 1002 null; + "attestors" = mkOverride 1002 null; + "image" = mkOverride 1002 null; + "imageReferences" = mkOverride 1002 null; + "imageRegistryCredentials" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "key" = mkOverride 1002 null; + "mutateDigest" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + "required" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "skipImageReferences" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + "useCache" = mkOverride 1002 null; + "verifyDigest" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestations" = { + options = { + "attestors" = mkOption { + description = "Attestors specify the required attestors (i.e. authorities)."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" + ) + ); + }; + "conditions" = mkOption { + description = "Conditions are used to verify attributes within a Predicate. If no Conditions are specified\nthe attestation check is satisfied as long there are predicates that match the predicate type."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditions" + ) + ); + }; + "predicateType" = mkOption { + description = "Deprecated in favour of 'Type', to be removed soon"; + type = types.nullOr types.str; + }; + "type" = mkOption { + description = "Type defines the type of attestation contained within the Statement."; + type = types.nullOr types.str; + }; + }; + + config = { + "attestors" = mkOverride 1002 null; + "conditions" = mkOverride 1002 null; + "predicateType" = mkOverride 1002 null; + "type" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" + ) + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditions" = { + options = { + "all" = mkOption { + description = "AllConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, all of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" + ) + ); + }; + "any" = mkOption { + description = "AnyConditions enable variable-based conditional rule execution. This is useful for\nfiner control of when an rule is applied. A condition can reference object data\nusing JMESPath notation.\nHere, at least one of the conditions need to pass"; + type = types.nullOr ( + types.listOf ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" + ) + ); + }; + }; + + config = { + "all" = mkOverride 1002 null; + "any" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAll" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestationsConditionsAny" = { + options = { + "key" = mkOption { + description = "Key is the context entry (using JMESPath) for conditional rule evaluation."; + type = types.nullOr types.attrs; + }; + "message" = mkOption { + description = "Message is an optional display message"; + type = types.nullOr types.str; + }; + "operator" = mkOption { + description = "Operator is the conditional operation to perform. Valid operators are:\nEquals, NotEquals, In, AnyIn, AllIn, NotIn, AnyNotIn, AllNotIn, GreaterThanOrEquals,\nGreaterThan, LessThanOrEquals, LessThan, DurationGreaterThanOrEquals, DurationGreaterThan,\nDurationLessThanOrEquals, DurationLessThan"; + type = types.nullOr types.str; + }; + "value" = mkOption { + description = "Value is the conditional value, or set of values. The values can be fixed set\nor can be variables declared using JMESPath."; + type = types.nullOr types.attrs; + }; + }; + + config = { + "key" = mkOverride 1002 null; + "message" = mkOverride 1002 null; + "operator" = mkOverride 1002 null; + "value" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestors" = { + options = { + "count" = mkOption { + description = "Count specifies the required number of entries that must match. If the count is null, all entries must match\n(a logical AND). If the count is 1, at least one entry must match (a logical OR). If the count contains a\nvalue N, then N must be less than or equal to the size of entries, and at least N entries must match."; + type = types.nullOr types.int; + }; + "entries" = mkOption { + description = "Entries contains the available attestors. An attestor can be a static key,\nattributes for keyless verification, or a nested attestor declaration."; + type = types.nullOr ( + types.listOf (submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntries") + ); + }; + }; + + config = { + "count" = mkOverride 1002 null; + "entries" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntries" = { + options = { + "annotations" = mkOption { + description = "Annotations are used for image verification.\nEvery specified key-value pair must exist and match in the verified payload.\nThe payload may contain other key-value pairs."; + type = types.nullOr (types.attrsOf types.str); + }; + "attestor" = mkOption { + description = "Attestor is a nested set of Attestor used to specify a more complex set of match authorities."; + type = types.nullOr types.attrs; + }; + "certificates" = mkOption { + description = "Certificates specifies one or more certificates."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" + ); + }; + "keyless" = mkOption { + description = "Keyless is a set of attribute used to verify a Sigstore keyless attestor.\nSee https://github.com/sigstore/cosign/blob/main/KEYLESS.md."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" + ); + }; + "keys" = mkOption { + description = "Keys specifies one or more public keys."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" + ); + }; + "repository" = mkOption { + description = "Repository is an optional alternate OCI repository to use for signatures and attestations that match this rule.\nIf specified Repository will override other OCI image repository locations for this Attestor."; + type = types.nullOr types.str; + }; + }; + + config = { + "annotations" = mkOverride 1002 null; + "attestor" = mkOverride 1002 null; + "certificates" = mkOverride 1002 null; + "keyless" = mkOverride 1002 null; + "keys" = mkOverride 1002 null; + "repository" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificates" = { + options = { + "cert" = mkOption { + description = "Cert is an optional PEM-encoded public certificate."; + type = types.nullOr types.str; + }; + "certChain" = mkOption { + description = "CertChain is an optional PEM encoded set of certificates used to verify."; + type = types.nullOr types.str; + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" + ); + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" + ); + }; + }; + + config = { + "cert" = mkOverride 1002 null; + "certChain" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesCertificatesRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeyless" = { + options = { + "additionalExtensions" = mkOption { + description = "AdditionalExtensions are certificate-extensions used for keyless signing."; + type = types.nullOr (types.attrsOf types.str); + }; + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" + ); + }; + "issuer" = mkOption { + description = "Issuer is the certificate issuer used for keyless signing."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" + ); + }; + "roots" = mkOption { + description = "Roots is an optional set of PEM encoded trusted root certificates.\nIf not provided, the system roots are used."; + type = types.nullOr types.str; + }; + "subject" = mkOption { + description = "Subject is the verified identity used for keyless signing, for example the email address."; + type = types.nullOr types.str; + }; + }; + + config = { + "additionalExtensions" = mkOverride 1002 null; + "ctlog" = mkOverride 1002 null; + "issuer" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "roots" = mkOverride 1002 null; + "subject" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeylessRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeys" = { + options = { + "ctlog" = mkOption { + description = "CTLog (certificate timestamp log) provides a configuration for validation of Signed Certificate\nTimestamps (SCTs). If the value is unset, the default behavior by Cosign is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" + ); + }; + "kms" = mkOption { + description = "KMS provides the URI to the public key stored in a Key Management System. See:\nhttps://github.com/sigstore/cosign/blob/main/KMS.md"; + type = types.nullOr types.str; + }; + "publicKeys" = mkOption { + description = "Keys is a set of X.509 public keys used to verify image signatures. The keys can be directly\nspecified or can be a variable reference to a key specified in a ConfigMap (see\nhttps://kyverno.io/docs/writing-policies/variables/), or reference a standard Kubernetes Secret\nelsewhere in the cluster by specifying it in the format \"k8s:///\".\nThe named Secret must specify a key `cosign.pub` containing the public key used for\nverification, (see https://github.com/sigstore/cosign/blob/main/KMS.md#kubernetes-secret).\nWhen multiple keys are specified each key is processed as a separate staticKey entry\n(.attestors[*].entries.keys) within the set of attestors and the count is applied across the keys."; + type = types.nullOr types.str; + }; + "rekor" = mkOption { + description = "Rekor provides configuration for the Rekor transparency log service. If an empty object\nis provided the public instance of Rekor (https://rekor.sigstore.dev) is used."; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" + ); + }; + "secret" = mkOption { + description = "Reference to a Secret resource that contains a public key"; + type = types.nullOr ( + submoduleOf "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" + ); + }; + "signatureAlgorithm" = mkOption { + description = "Specify signature algorithm for public keys. Supported values are sha224, sha256, sha384 and sha512."; + type = types.nullOr types.str; + }; + }; + + config = { + "ctlog" = mkOverride 1002 null; + "kms" = mkOverride 1002 null; + "publicKeys" = mkOverride 1002 null; + "rekor" = mkOverride 1002 null; + "secret" = mkOverride 1002 null; + "signatureAlgorithm" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysCtlog" = { + options = { + "ignoreSCT" = mkOption { + description = "IgnoreSCT defines whether to use the Signed Certificate Timestamp (SCT) log to check for a certificate\ntimestamp. Default is false. Set to true if this was opted out during signing."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "PubKey, if set, is used to validate SCTs against a custom source."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreSCT" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysRekor" = { + options = { + "ignoreTlog" = mkOption { + description = "IgnoreTlog skips transparency log verification."; + type = types.nullOr types.bool; + }; + "pubkey" = mkOption { + description = "RekorPubKey is an optional PEM-encoded public key to use for a custom Rekor.\nIf set, this will be used to validate transparency log signatures from a custom Rekor."; + type = types.nullOr types.str; + }; + "url" = mkOption { + description = "URL is the address of the transparency log. Defaults to the public Rekor log instance https://rekor.sigstore.dev."; + type = types.nullOr types.str; + }; + }; + + config = { + "ignoreTlog" = mkOverride 1002 null; + "pubkey" = mkOverride 1002 null; + "url" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesAttestorsEntriesKeysSecret" = { + options = { + "name" = mkOption { + description = "Name of the secret. The provided secret must contain a key named cosign.pub."; + type = types.str; + }; + "namespace" = mkOption { + description = "Namespace name where the Secret exists."; + type = types.str; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusAutogenRulesVerifyImagesImageRegistryCredentials" = { + options = { + "allowInsecureRegistry" = mkOption { + description = "AllowInsecureRegistry allows insecure access to a registry."; + type = types.nullOr types.bool; + }; + "providers" = mkOption { + description = "Providers specifies a list of OCI Registry names, whose authentication providers are provided.\nIt can be of one of these values: default,google,azure,amazon,github."; + type = types.nullOr (types.listOf types.str); + }; + "secrets" = mkOption { + description = "Secrets specifies a list of secrets that are provided for credentials.\nSecrets must live in the Kyverno namespace."; + type = types.nullOr (types.listOf types.str); + }; + }; + + config = { + "allowInsecureRegistry" = mkOverride 1002 null; + "providers" = mkOverride 1002 null; + "secrets" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusConditions" = { + options = { + "lastTransitionTime" = mkOption { + description = "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."; + type = types.str; + }; + "message" = mkOption { + description = "message is a human readable message indicating details about the transition.\nThis may be an empty string."; + type = types.str; + }; + "observedGeneration" = mkOption { + description = "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance."; + type = types.nullOr types.int; + }; + "reason" = mkOption { + description = "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty."; + type = types.str; + }; + "status" = mkOption { + description = "status of the condition, one of True, False, Unknown."; + type = types.str; + }; + "type" = mkOption { + description = "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)"; + type = types.str; + }; + }; + + config = { + "observedGeneration" = mkOverride 1002 null; + }; + }; + "kyverno.io.v2beta1.PolicyStatusRulecount" = { + options = { + "generate" = mkOption { + description = "Count for generate rules in policy"; + type = types.int; + }; + "mutate" = mkOption { + description = "Count for mutate rules in policy"; + type = types.int; + }; + "validate" = mkOption { + description = "Count for validate rules in policy"; + type = types.int; + }; + "verifyimages" = mkOption { + description = "Count for verify image rules in policy"; + type = types.int; + }; + }; + + config = { }; + }; + "kyverno.io.v2beta1.PolicyStatusValidatingadmissionpolicy" = { + options = { + "generated" = mkOption { + description = "Generated indicates whether a validating admission policy is generated from the policy or not"; + type = types.bool; + }; + "message" = mkOption { + description = "Message is a human readable message indicating details about the generation of validating admission policy\nIt is an empty string when validating admission policy is successfully generated."; + type = types.str; + }; + }; + + config = { }; + }; + }; +in +{ + # all resource versions + options = { + resources = + { + "kyverno.io"."v1"."ClusterPolicy" = mkOption { + description = "ClusterPolicy declares validation, mutation, and generation behaviors for matching resources."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v1.ClusterPolicy" "clusterpolicies" "ClusterPolicy" "kyverno.io" + "v1" + ); + default = { }; + }; + "kyverno.io"."v1"."Policy" = mkOption { + description = "Policy declares validation, mutation, and generation behaviors for matching resources.\nSee: https://kyverno.io/docs/writing-policies/ for more information."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v1.Policy" "policies" "Policy" "kyverno.io" "v1" + ); + default = { }; + }; + "kyverno.io"."v1beta1"."UpdateRequest" = mkOption { + description = "UpdateRequest is a request to process mutate and generate rules in background."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v1beta1.UpdateRequest" "updaterequests" "UpdateRequest" + "kyverno.io" + "v1beta1" + ); + default = { }; + }; + "kyverno.io"."v2"."CleanupPolicy" = mkOption { + description = "CleanupPolicy defines a rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.CleanupPolicy" "cleanuppolicies" "CleanupPolicy" "kyverno.io" + "v2" + ); + default = { }; + }; + "kyverno.io"."v2"."ClusterCleanupPolicy" = mkOption { + description = "ClusterCleanupPolicy defines rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.ClusterCleanupPolicy" "clustercleanuppolicies" + "ClusterCleanupPolicy" + "kyverno.io" + "v2" + ); + default = { }; + }; + "kyverno.io"."v2"."PolicyException" = mkOption { + description = "PolicyException declares resources to be excluded from specified policies."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.PolicyException" "policyexceptions" "PolicyException" + "kyverno.io" + "v2" + ); + default = { }; + }; + "kyverno.io"."v2"."UpdateRequest" = mkOption { + description = "UpdateRequest is a request to process mutate and generate rules in background."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.UpdateRequest" "updaterequests" "UpdateRequest" "kyverno.io" + "v2" + ); + default = { }; + }; + "kyverno.io"."v2alpha1"."CleanupPolicy" = mkOption { + description = "CleanupPolicy defines a rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2alpha1.CleanupPolicy" "cleanuppolicies" "CleanupPolicy" + "kyverno.io" + "v2alpha1" + ); + default = { }; + }; + "kyverno.io"."v2alpha1"."ClusterCleanupPolicy" = mkOption { + description = "ClusterCleanupPolicy defines rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2alpha1.ClusterCleanupPolicy" "clustercleanuppolicies" + "ClusterCleanupPolicy" + "kyverno.io" + "v2alpha1" + ); + default = { }; + }; + "kyverno.io"."v2alpha1"."GlobalContextEntry" = mkOption { + description = "GlobalContextEntry declares resources to be cached."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2alpha1.GlobalContextEntry" "globalcontextentries" + "GlobalContextEntry" + "kyverno.io" + "v2alpha1" + ); + default = { }; + }; + "kyverno.io"."v2alpha1"."PolicyException" = mkOption { + description = "PolicyException declares resources to be excluded from specified policies."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2alpha1.PolicyException" "policyexceptions" "PolicyException" + "kyverno.io" + "v2alpha1" + ); + default = { }; + }; + "kyverno.io"."v2beta1"."CleanupPolicy" = mkOption { + description = "CleanupPolicy defines a rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.CleanupPolicy" "cleanuppolicies" "CleanupPolicy" + "kyverno.io" + "v2beta1" + ); + default = { }; + }; + "kyverno.io"."v2beta1"."ClusterCleanupPolicy" = mkOption { + description = "ClusterCleanupPolicy defines rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.ClusterCleanupPolicy" "clustercleanuppolicies" + "ClusterCleanupPolicy" + "kyverno.io" + "v2beta1" + ); + default = { }; + }; + "kyverno.io"."v2beta1"."ClusterPolicy" = mkOption { + description = "ClusterPolicy declares validation, mutation, and generation behaviors for matching resources."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.ClusterPolicy" "clusterpolicies" "ClusterPolicy" + "kyverno.io" + "v2beta1" + ); + default = { }; + }; + "kyverno.io"."v2beta1"."Policy" = mkOption { + description = "Policy declares validation, mutation, and generation behaviors for matching resources.\nSee: https://kyverno.io/docs/writing-policies/ for more information."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.Policy" "policies" "Policy" "kyverno.io" "v2beta1" + ); + default = { }; + }; + "kyverno.io"."v2beta1"."PolicyException" = mkOption { + description = "PolicyException declares resources to be excluded from specified policies."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.PolicyException" "policyexceptions" "PolicyException" + "kyverno.io" + "v2beta1" + ); + default = { }; + }; + } + // { + "cleanupPolicies" = mkOption { + description = "CleanupPolicy defines a rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.CleanupPolicy" "cleanuppolicies" "CleanupPolicy" "kyverno.io" + "v2" + ); + default = { }; + }; + "clusterCleanupPolicies" = mkOption { + description = "ClusterCleanupPolicy defines rule for resource cleanup."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.ClusterCleanupPolicy" "clustercleanuppolicies" + "ClusterCleanupPolicy" + "kyverno.io" + "v2" + ); + default = { }; + }; + "clusterPolicies" = mkOption { + description = "ClusterPolicy declares validation, mutation, and generation behaviors for matching resources."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.ClusterPolicy" "clusterpolicies" "ClusterPolicy" + "kyverno.io" + "v2beta1" + ); + default = { }; + }; + "globalContextEntries" = mkOption { + description = "GlobalContextEntry declares resources to be cached."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2alpha1.GlobalContextEntry" "globalcontextentries" + "GlobalContextEntry" + "kyverno.io" + "v2alpha1" + ); + default = { }; + }; + "policies" = mkOption { + description = "Policy declares validation, mutation, and generation behaviors for matching resources.\nSee: https://kyverno.io/docs/writing-policies/ for more information."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2beta1.Policy" "policies" "Policy" "kyverno.io" "v2beta1" + ); + default = { }; + }; + "policyExceptions" = mkOption { + description = "PolicyException declares resources to be excluded from specified policies."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.PolicyException" "policyexceptions" "PolicyException" + "kyverno.io" + "v2" + ); + default = { }; + }; + "updateRequests" = mkOption { + description = "UpdateRequest is a request to process mutate and generate rules in background."; + type = types.attrsOf ( + submoduleForDefinition "kyverno.io.v2.UpdateRequest" "updaterequests" "UpdateRequest" "kyverno.io" + "v2" + ); + default = { }; + }; + }; + }; + + config = { + # expose resource definitions + inherit definitions; + + # register resource types + types = [ + { + name = "clusterpolicies"; + group = "kyverno.io"; + version = "v1"; + kind = "ClusterPolicy"; + attrName = "clusterPolicies"; + } + { + name = "policies"; + group = "kyverno.io"; + version = "v1"; + kind = "Policy"; + attrName = "policies"; + } + { + name = "updaterequests"; + group = "kyverno.io"; + version = "v1beta1"; + kind = "UpdateRequest"; + attrName = "updateRequests"; + } + { + name = "cleanuppolicies"; + group = "kyverno.io"; + version = "v2"; + kind = "CleanupPolicy"; + attrName = "cleanupPolicies"; + } + { + name = "clustercleanuppolicies"; + group = "kyverno.io"; + version = "v2"; + kind = "ClusterCleanupPolicy"; + attrName = "clusterCleanupPolicies"; + } + { + name = "policyexceptions"; + group = "kyverno.io"; + version = "v2"; + kind = "PolicyException"; + attrName = "policyExceptions"; + } + { + name = "updaterequests"; + group = "kyverno.io"; + version = "v2"; + kind = "UpdateRequest"; + attrName = "updateRequests"; + } + { + name = "cleanuppolicies"; + group = "kyverno.io"; + version = "v2alpha1"; + kind = "CleanupPolicy"; + attrName = "cleanupPolicies"; + } + { + name = "clustercleanuppolicies"; + group = "kyverno.io"; + version = "v2alpha1"; + kind = "ClusterCleanupPolicy"; + attrName = "clusterCleanupPolicies"; + } + { + name = "globalcontextentries"; + group = "kyverno.io"; + version = "v2alpha1"; + kind = "GlobalContextEntry"; + attrName = "globalContextEntries"; + } + { + name = "policyexceptions"; + group = "kyverno.io"; + version = "v2alpha1"; + kind = "PolicyException"; + attrName = "policyExceptions"; + } + { + name = "cleanuppolicies"; + group = "kyverno.io"; + version = "v2beta1"; + kind = "CleanupPolicy"; + attrName = "cleanupPolicies"; + } + { + name = "clustercleanuppolicies"; + group = "kyverno.io"; + version = "v2beta1"; + kind = "ClusterCleanupPolicy"; + attrName = "clusterCleanupPolicies"; + } + { + name = "clusterpolicies"; + group = "kyverno.io"; + version = "v2beta1"; + kind = "ClusterPolicy"; + attrName = "clusterPolicies"; + } + { + name = "policies"; + group = "kyverno.io"; + version = "v2beta1"; + kind = "Policy"; + attrName = "policies"; + } + { + name = "policyexceptions"; + group = "kyverno.io"; + version = "v2beta1"; + kind = "PolicyException"; + attrName = "policyExceptions"; + } + ]; + + resources = { + "kyverno.io"."v2"."CleanupPolicy" = mkAliasDefinitions options.resources."cleanupPolicies"; + "kyverno.io"."v2"."ClusterCleanupPolicy" = + mkAliasDefinitions + options.resources."clusterCleanupPolicies"; + "kyverno.io"."v2beta1"."ClusterPolicy" = mkAliasDefinitions options.resources."clusterPolicies"; + "kyverno.io"."v2alpha1"."GlobalContextEntry" = + mkAliasDefinitions + options.resources."globalContextEntries"; + "kyverno.io"."v2beta1"."Policy" = mkAliasDefinitions options.resources."policies"; + "kyverno.io"."v2"."PolicyException" = mkAliasDefinitions options.resources."policyExceptions"; + "kyverno.io"."v2"."UpdateRequest" = mkAliasDefinitions options.resources."updateRequests"; + }; + + defaults = [ + { + group = "kyverno.io"; + version = "v1"; + kind = "Policy"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v1beta1"; + kind = "UpdateRequest"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2"; + kind = "CleanupPolicy"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2"; + kind = "PolicyException"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2"; + kind = "UpdateRequest"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2alpha1"; + kind = "CleanupPolicy"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2alpha1"; + kind = "PolicyException"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2beta1"; + kind = "CleanupPolicy"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2beta1"; + kind = "Policy"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + { + group = "kyverno.io"; + version = "v2beta1"; + kind = "PolicyException"; + default.metadata.namespace = lib.mkDefault config.namespace; + } + ]; + }; +} diff --git a/resources/oceanbox-cluster/kyverno-policies/add-ingress-whitelist.yaml b/policies/oceanbox/kyverno/add-ingress-whitelist.yaml similarity index 100% rename from resources/oceanbox-cluster/kyverno-policies/add-ingress-whitelist.yaml rename to policies/oceanbox/kyverno/add-ingress-whitelist.yaml diff --git a/resources/oceanbox-cluster/kyverno-policies/remove-argocd-tracking-id.yaml b/policies/oceanbox/kyverno/remove-argocd-tracking-id.yaml similarity index 100% rename from resources/oceanbox-cluster/kyverno-policies/remove-argocd-tracking-id.yaml rename to policies/oceanbox/kyverno/remove-argocd-tracking-id.yaml diff --git a/resources/oceanbox-cluster/kyverno-policies/sync-atlantis-secrets.yaml b/policies/oceanbox/kyverno/sync-atlantis-secrets.yaml similarity index 100% rename from resources/oceanbox-cluster/kyverno-policies/sync-atlantis-secrets.yaml rename to policies/oceanbox/kyverno/sync-atlantis-secrets.yaml diff --git a/resources/oceanbox-cluster/kyverno-policies/sync-oceanbox-regcred.yaml b/policies/oceanbox/kyverno/sync-regcred.yaml similarity index 100% rename from resources/oceanbox-cluster/kyverno-policies/sync-oceanbox-regcred.yaml rename to policies/oceanbox/kyverno/sync-regcred.yaml diff --git a/resources/oceanbox-cluster/network-policies/allow-ceph-egress.yaml b/policies/oceanbox/network/allow-ceph-egress.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/allow-ceph-egress.yaml rename to policies/oceanbox/network/allow-ceph-egress.yaml diff --git a/resources/oceanbox-cluster/network-policies/allow-microsoft-oidc-login.yaml b/policies/oceanbox/network/allow-microsoft-oidc-login.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/allow-microsoft-oidc-login.yaml rename to policies/oceanbox/network/allow-microsoft-oidc-login.yaml diff --git a/resources/oceanbox-cluster/network-policies/atlantis/allow-api-server.yaml b/policies/oceanbox/network/atlantis/allow-api-server.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/atlantis/allow-api-server.yaml rename to policies/oceanbox/network/atlantis/allow-api-server.yaml diff --git a/charts/atlantis/templates/networkpolicies.yaml b/policies/oceanbox/network/atlantis/atlantis-policies.yaml similarity index 100% rename from charts/atlantis/templates/networkpolicies.yaml rename to policies/oceanbox/network/atlantis/atlantis-policies.yaml diff --git a/resources/oceanbox-cluster/network-policies/clusterpolicy-allow-api-server.yaml b/policies/oceanbox/network/clusterpolicy-allow-api-server.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/clusterpolicy-allow-api-server.yaml rename to policies/oceanbox/network/clusterpolicy-allow-api-server.yaml diff --git a/resources/oceanbox-cluster/network-policies/clusterpolicy-allow-ekman-egress.yaml b/policies/oceanbox/network/clusterpolicy-allow-ekman-egress.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/clusterpolicy-allow-ekman-egress.yaml rename to policies/oceanbox/network/clusterpolicy-allow-ekman-egress.yaml diff --git a/resources/oceanbox-cluster/network-policies/clusterpolicy-allow-namespace-traffic.yaml b/policies/oceanbox/network/clusterpolicy-allow-namespace-traffic.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/clusterpolicy-allow-namespace-traffic.yaml rename to policies/oceanbox/network/clusterpolicy-allow-namespace-traffic.yaml diff --git a/resources/oceanbox-cluster/network-policies/clusterpolicy-allow-oceanboxio.yaml b/policies/oceanbox/network/clusterpolicy-allow-oceanboxio.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/clusterpolicy-allow-oceanboxio.yaml rename to policies/oceanbox/network/clusterpolicy-allow-oceanboxio.yaml diff --git a/resources/oceanbox-cluster/network-policies/clusterpolicy-allow-remote-node.yaml b/policies/oceanbox/network/clusterpolicy-allow-remote-node.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/clusterpolicy-allow-remote-node.yaml rename to policies/oceanbox/network/clusterpolicy-allow-remote-node.yaml diff --git a/resources/oceanbox-cluster/network-policies/csi-addons-controller/allow-9070-host.yaml b/policies/oceanbox/network/csi-addons-controller/allow-9070-host.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/csi-addons-controller/allow-9070-host.yaml rename to policies/oceanbox/network/csi-addons-controller/allow-9070-host.yaml diff --git a/resources/oceanbox-cluster/network-policies/dapr/allow-api-server.yaml b/policies/oceanbox/network/dapr/allow-api-server.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/dapr/allow-api-server.yaml rename to policies/oceanbox/network/dapr/allow-api-server.yaml diff --git a/resources/oceanbox-cluster/network-policies/dapr/allow-remote-node.yaml b/policies/oceanbox/network/dapr/allow-remote-node.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/dapr/allow-remote-node.yaml rename to policies/oceanbox/network/dapr/allow-remote-node.yaml diff --git a/policies/oceanbox/network/default.nix b/policies/oceanbox/network/default.nix new file mode 100644 index 00000000..ba5245d5 --- /dev/null +++ b/policies/oceanbox/network/default.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + imports = [ + ./external-ceph.nix + ./microsoftonline.nix + ]; +} diff --git a/policies/oceanbox/network/external-ceph.nix b/policies/oceanbox/network/external-ceph.nix new file mode 100644 index 00000000..5d88d90e --- /dev/null +++ b/policies/oceanbox/network/external-ceph.nix @@ -0,0 +1,22 @@ +{ ... }: +{ + applications.netpol-external-ceph = { + resources = { + ciliumClusterwideNetworkPolicies = { + allow-external-ceph-egress.spec = { + egress = [ + { + toCIDR = [ + "10.255.241.30/32" + "10.255.241.31/32" + "10.255.241.32/32" + "10.255.244.0/24" + ]; + } + ]; + endpointSelector = { }; + }; + }; + }; + }; +} diff --git a/resources/oceanbox-cluster/network-policies/geoserver/allow-geoserver-ingress.yaml b/policies/oceanbox/network/geoserver/allow-geoserver-ingress.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/geoserver/allow-geoserver-ingress.yaml rename to policies/oceanbox/network/geoserver/allow-geoserver-ingress.yaml diff --git a/resources/oceanbox-cluster/network-policies/idp/allow-api-server.yaml b/policies/oceanbox/network/idp/allow-api-server.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/idp/allow-api-server.yaml rename to policies/oceanbox/network/idp/allow-api-server.yaml diff --git a/resources/oceanbox-cluster/network-policies/idp/allow-gitlab.yaml b/policies/oceanbox/network/idp/allow-gitlab.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/idp/allow-gitlab.yaml rename to policies/oceanbox/network/idp/allow-gitlab.yaml diff --git a/resources/oceanbox-cluster/network-policies/allow-idp-external-access.yaml b/policies/oceanbox/network/idp/allow-idp-external-access.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/allow-idp-external-access.yaml rename to policies/oceanbox/network/idp/allow-idp-external-access.yaml diff --git a/resources/oceanbox-cluster/network-policies/idp/allow-itp-smtpgw.yaml b/policies/oceanbox/network/idp/allow-itp-smtpgw.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/idp/allow-itp-smtpgw.yaml rename to policies/oceanbox/network/idp/allow-itp-smtpgw.yaml diff --git a/resources/oceanbox-cluster/network-policies/idp/allow-keycloak.yaml b/policies/oceanbox/network/idp/allow-keycloak.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/idp/allow-keycloak.yaml rename to policies/oceanbox/network/idp/allow-keycloak.yaml diff --git a/resources/oceanbox-cluster/network-policies/jaeger/allow-api-server.yaml b/policies/oceanbox/network/jaeger/allow-api-server.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/jaeger/allow-api-server.yaml rename to policies/oceanbox/network/jaeger/allow-api-server.yaml diff --git a/resources/oceanbox-cluster/network-policies/jaeger/allow-remote-node.yaml b/policies/oceanbox/network/jaeger/allow-remote-node.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/jaeger/allow-remote-node.yaml rename to policies/oceanbox/network/jaeger/allow-remote-node.yaml diff --git a/policies/oceanbox/network/microsoftonline.nix b/policies/oceanbox/network/microsoftonline.nix new file mode 100644 index 00000000..67e0b36e --- /dev/null +++ b/policies/oceanbox/network/microsoftonline.nix @@ -0,0 +1,21 @@ +{ ... }: +{ + applications.netpol-microsoftonline = { + project = "netpol"; + resources = { + ciliumClusterwideNetworkPolicies = { + allow-microsoftonline.spec = { + endpointSelector = { }; + egress = [ + { + toFQDNs = [ + { matchName = "login.microsoftonline.com"; } + { matchPattern = "*.microsoftonline.com"; } + ]; + } + ]; + }; + }; + }; + }; +} diff --git a/resources/oceanbox-cluster/network-policies/policy-allow-rabbitmq.yaml b/policies/oceanbox/network/rabbitmq/policy-allow-rabbitmq.yaml similarity index 100% rename from resources/oceanbox-cluster/network-policies/policy-allow-rabbitmq.yaml rename to policies/oceanbox/network/rabbitmq/policy-allow-rabbitmq.yaml diff --git a/policies/oceanbox/network/templ.nix b/policies/oceanbox/network/templ.nix new file mode 100644 index 00000000..18cd3759 --- /dev/null +++ b/policies/oceanbox/network/templ.nix @@ -0,0 +1,11 @@ +{ ... }: +{ + applications.xxx = { + resources = { + ciliumClusterwideNetworkPolicies = { + xxx.spec = { + }; + }; + }; + }; +} diff --git a/resources/oceanbox-cluster/ingress/hubble-ui-ingress.yaml b/resources/oceanbox/ingress/hubble-ui-ingress.yaml similarity index 100% rename from resources/oceanbox-cluster/ingress/hubble-ui-ingress.yaml rename to resources/oceanbox/ingress/hubble-ui-ingress.yaml diff --git a/resources/oceanbox-cluster/redis-sso-sync-cronjob.yaml b/resources/oceanbox/redis-sso-sync-cronjob.yaml similarity index 100% rename from resources/oceanbox-cluster/redis-sso-sync-cronjob.yaml rename to resources/oceanbox/redis-sso-sync-cronjob.yaml diff --git a/resources/oceanbox-cluster/vcluster-rabc.yaml b/resources/oceanbox/vcluster-rabc.yaml similarity index 100% rename from resources/oceanbox-cluster/vcluster-rabc.yaml rename to resources/oceanbox/vcluster-rabc.yaml diff --git a/statix.toml b/statix.toml new file mode 100644 index 00000000..fdbac046 --- /dev/null +++ b/statix.toml @@ -0,0 +1,7 @@ +disabled = [ + # I think enforcing this can often produce + # code that is harder to read. + "manual_inherit_from" + # Does not improve readability + "repeated_keys" +] \ No newline at end of file