Skip to content

Commit 6b71de2

Browse files
authored
Fix validation for Kubernetes keys (#257)
The existing regex validates DNS names.
1 parent 37f6803 commit 6b71de2

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

gen/go/qdrant/cloud/common/v1/common.pb.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/python/qdrant/cloud/common/v1/common_pb2.py

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/typescript/qdrant/cloud/common/v1/common_pb.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/qdrant/cloud/common/v1/common.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ message SecretKeyRef {
127127
message KeyValue {
128128
// The key part of a key-value pair
129129
string key = 1 [(buf.validate.field).string = {
130-
max_len: 63
131-
pattern: "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$"
130+
max_len: 253
131+
pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
132132
}];
133133
// The value part of a key-value pair
134134
string value = 2 [(buf.validate.field).string = {max_len: 1024}];

0 commit comments

Comments
 (0)