Skip to content

Commit

Permalink
Allowing direct CEL reserved keyword usage in CRD (#126188)
Browse files Browse the repository at this point in the history
* automatically escape reserved keywords for direct usage

* Add reserved keyword support in a ratcheting way, add tests.

---------

Co-authored-by: Wenxue Zhao <[email protected]>

Kubernetes-commit: a48a92c72ec7d4e2a8da396309abff9360faae75
  • Loading branch information
cici37 authored and k8s-publishing-bot committed Jul 24, 2024
1 parent 10c707f commit 4940c42
Show file tree
Hide file tree
Showing 5 changed files with 364 additions and 27 deletions.
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ require (
go.etcd.io/etcd/client/v3 v3.5.14
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
gopkg.in/evanphx/json-patch.v4 v4.12.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.0.0-20240723194852-871340c2e998
k8s.io/api v0.0.0-20240724010313-f04ea0bc861d
k8s.io/apimachinery v0.0.0-20240720202316-95b78024e3fe
k8s.io/apiserver v0.0.0-20240723210659-c90207143c20
k8s.io/client-go v0.0.0-20240723200359-dcfcc90795cc
k8s.io/apiserver v0.0.0-20240724012351-92ee9330ce6a
k8s.io/client-go v0.0.0-20240724010704-ac9204c6195b
k8s.io/code-generator v0.0.0-20240720023521-ec3cc888df4c
k8s.io/component-base v0.0.0-20240722183709-6cc953a9d440
k8s.io/klog/v2 v2.130.1
Expand Down Expand Up @@ -117,6 +116,7 @@ require (
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
Expand All @@ -125,3 +125,5 @@ require (
k8s.io/kms v0.0.0-20240707024556-6e3528fa4c33 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect
)

replace k8s.io/api => k8s.io/api v0.0.0-20240724010313-a789efa287e8
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,14 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.0.0-20240723194852-871340c2e998 h1:XvMrEqepRsNkn8Bl60PB5TO4ZEOgr70bYrpAedjvTV8=
k8s.io/api v0.0.0-20240723194852-871340c2e998/go.mod h1:ytlEzqC2wOTwYET71W7+J+k7O2V7vrDuzmNLBSpgT+k=
k8s.io/api v0.0.0-20240724010313-a789efa287e8 h1:TISAHWnfAdn420WpN+fEHG6snbLbfaCAp3kHDoAkxIc=
k8s.io/api v0.0.0-20240724010313-a789efa287e8/go.mod h1:ytlEzqC2wOTwYET71W7+J+k7O2V7vrDuzmNLBSpgT+k=
k8s.io/apimachinery v0.0.0-20240720202316-95b78024e3fe h1:V9MwpYUwbKlfLKVrhpVuKWiat/LBIhm1pGB9/xdHm5Q=
k8s.io/apimachinery v0.0.0-20240720202316-95b78024e3fe/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/apiserver v0.0.0-20240723210659-c90207143c20 h1:32/qwZM293YJ71bcGQD2PhnPOLQBqQoDf6WvzQ/kpxI=
k8s.io/apiserver v0.0.0-20240723210659-c90207143c20/go.mod h1:NQDM9jV7nUGYBnMcr1Wm1zo17QIrCW1RWoD1kcuH/80=
k8s.io/client-go v0.0.0-20240723200359-dcfcc90795cc h1:qe0SREEjfE5w3ANvrSURWv00J/ISlqa9Sa3FCBYKRlg=
k8s.io/client-go v0.0.0-20240723200359-dcfcc90795cc/go.mod h1:XfEsPNNFOR0wNkr3BtkPUN668l7Sx1W4ECSUolQ0mA4=
k8s.io/apiserver v0.0.0-20240724012351-92ee9330ce6a h1:hbHaTqnKJ9RTFAgGkhffQR1+O6RgxZnCMGIJe6paWrw=
k8s.io/apiserver v0.0.0-20240724012351-92ee9330ce6a/go.mod h1:evDFvWJ5AkEQ1nRZOHulw/OKntvjsYuxyZtZQNPhz5o=
k8s.io/client-go v0.0.0-20240724010704-ac9204c6195b h1:NTLYx38CAu+VstHvPLosqB6uSQUtSM+3Mqz2D/C5JpE=
k8s.io/client-go v0.0.0-20240724010704-ac9204c6195b/go.mod h1:Y6CzOT21oLI4O66cjiV5oSSUgOL7gG/VCG9n8XI8OxU=
k8s.io/code-generator v0.0.0-20240720023521-ec3cc888df4c h1:oiNPH9Y/YrQfxo8eTW/w71aBrSyr9MX/wGBKTwDSZsc=
k8s.io/code-generator v0.0.0-20240720023521-ec3cc888df4c/go.mod h1:TVAwbna2B36D+IsWJ5oHqKZKSU8ZBtxeiMTb7uKM6Z0=
k8s.io/component-base v0.0.0-20240722183709-6cc953a9d440 h1:14X+5sRQRsul6tLxIKTP0/DotvWlMd9DFCgMqHP1hZY=
Expand Down
Loading

0 comments on commit 4940c42

Please sign in to comment.