shard_param validation pattern

k8s uses re2, which does not support lookaround, so this rather
complicated pattern is what I came up with to forbid vcl and
vk8s prefixes.
parent 60e37559
......@@ -136,6 +136,7 @@ spec:
pattern: '^\d+(\.\d+)?(ms|[smhdwy])$'
shard_param:
type: string
pattern: '^([a-uw-zA-UW-Z]|v[-abd-jl-zABD-J-ZABD-JL-Z0-9_]|vc[-a-km-zA-KM-Z0-9_]|vk[-a-zA-Z0-79_]|vk8[-a-rt-zA-Rt-z0-9_])[-a-zA-Z0-9_]*$'
tls:
type: object
properties:
......
......@@ -277,6 +277,11 @@ used from custom VCL to control the behaviour of the
director. Multiple directors can share the same ``shard_param``
object.
The ``shard_param`` name can not start with ``vcl`` or ``vk8s`` and
otherwise must only contain characters valid for vcl synbols: It must
start with an alphabetical character and only contain alphanumerical
characters plus ``-`` and ``_``.
For example:
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment