Skip to content

Commit

Permalink
Update pattern limitations in comment
Browse files Browse the repository at this point in the history
open-policy-agent#1796 (comment)

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
  • Loading branch information
Sunghoon Kang committed Jan 20, 2022
1 parent 17fa858 commit 4a821e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/target/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ import (
// - A typical namespace must end in an alphanumeric character. A prefixed wildcard
// can end in "*" (like `kube*`) or "-*" (like `kube-*`), and a suffixed wildcard
// can start with "*" (like `*system`) or "*-" (like `*-system`).
// - To implement this, we add the following (\*|\*-)? as a prefix and (\*|-\*)? as a suffix.
// - To implement this, we add either (\*|\*-)? as a prefix or (\*|-\*)? as a suffix.
// Using both prefixed wildcards and suffixed wildcards at once is not supported. Therefore,
// this _does not_ allow the value to start _and_ end in a wildcard (like `*-*`).
// - Crucially, this _does not_ allow the value to start or end in a dash (like `-system` or `kube-`).
// That is not a valid namespace and not a wildcard, so it's disallowed
// That is not a valid namespace and not a wildcard, so it's disallowed.
//
// Notably, this disallows other uses of the "*" character like:
// - *
Expand Down

0 comments on commit 4a821e8

Please sign in to comment.