From 62afa2efee1b83caef7800efbc219c21e7e4decf Mon Sep 17 00:00:00 2001
From: Qiming Teng
Resources is a list of resources this rule applies to.
-For example: -'pods' matches pods. -'pods/log' matches the log subresource of pods. -'' matches all resources and their subresources. -'pods/' matches all subresources of pods. -'*/scale' matches all scale subresources.
+For example:
+pods matches pods.pods/log matches the log subresource of pods.* matches all resources and their subresources.pods/* matches all subresources of pods.*/scale matches all scale subresources.If wildcard is present, the validation rule will ensure resources do not overlap with each other.
An empty list implies all resources and subresources in this API groups apply.
@@ -501,10 +503,12 @@ An empty list implies every namespace.NonResourceURLs is a set of URL paths that should be audited. -s are allowed, but only as the full, final step in the path. -Examples: -"/metrics" - Log requests for apiserver metrics -"/healthz" - Log all health checks
+*s are allowed, but only as the full, final step in the path.
+Examples:
+
+- "/metrics" - Log requests for apiserver metrics
+- "/healthz*" - Log all health checks
+
omitStagesEach entry in matchImages is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported -as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. -Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match -a single subdomain segment, so *.io does not match *.k8s.io.
+as subdomains like*.k8s.io or k8s.*.io, and top-level-domains such as k8s.*.
+Matching partial subdomains like app*.k8s.io is also supported. Each glob can only match
+a single subdomain segment, so *.io does not match *.k8s.io.
A match exists between an image and a matchImage when all of the below are true:
- Both contain the same number of domain parts and each part matches.
@@ -93,9 +93,9 @@ a single subdomain segment, so *.io does not match *.k8s.io.
Example values of matchImages:
- 123456789.dkr.ecr.us-east-1.amazonaws.com
-- *.azurecr.io
+- *.azurecr.io
- gcr.io
-- *.registry.io
+- *.*.registry.io
- registry.io:8080/path
Each entry in matchImages is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported -as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. -Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match -a single subdomain segment, so *.io does not match *.k8s.io.
+as subdomains like*.k8s.io or k8s.*.io, and top-level-domains such as k8s.*.
+Matching partial subdomains like app*.k8s.io is also supported. Each glob can only match
+a single subdomain segment, so *.io does not match *.k8s.io.
A match exists between an image and a matchImage when all of the below are true:
Example values of matchImages:
Each key in the map is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported -as subdomains like '.k8s.io' or 'k8s..io', and top-level-domains such as 'k8s.'. -Matching partial subdomains like 'app.k8s.io' is also supported. Each glob can only match -a single subdomain segment, so *.io does not match *.k8s.io.
+as subdomains like*.k8s.io or k8s.*.io, and top-level-domains such as k8s.*.
+Matching partial subdomains like app*.k8s.io is also supported. Each glob can only match
+a single subdomain segment, so *.io does not match *.k8s.io.
The kubelet will match images against the key when all of the below are true:
Example keys:
Each key in the map is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported -as subdomains like '.k8s.io' or 'k8s..io', and top-level-domains such as 'k8s.'. -Matching partial subdomains like 'app.k8s.io' is also supported. Each glob can only match -a single subdomain segment, so *.io does not match *.k8s.io.
+as subdomains like*.k8s.io or k8s.*.io, and top-level-domains such as k8s.*.
+Matching partial subdomains like app*.k8s.io is also supported. Each glob can only match
+a single subdomain segment, so *.io does not match *.k8s.io.
The kubelet will match images against the key when all of the below are true:
Example keys:
Each key in the map is a pattern which can optionally contain a port and a path. Globs can be used in the domain, but not in the port or the path. Globs are supported -as subdomains like '.k8s.io' or 'k8s..io', and top-level-domains such as 'k8s.'. -Matching partial subdomains like 'app.k8s.io' is also supported. Each glob can only match -a single subdomain segment, so *.io does not match *.k8s.io.
+as subdomains like*.k8s.io or k8s.*.io, and top-level-domains such as k8s.*.
+Matching partial subdomains like app*.k8s.io is also supported. Each glob can only match
+a single subdomain segment, so *.io does not match *.k8s.io.
The kubelet will match images against the key when all of the below are true:
Example keys: