mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-18 02:39:30 +00:00
Merge pull request #325 from red-hat-storage/sync_ds--devel
Syncing latest changes from devel for ceph-csi
This commit is contained in:
commit
346d66f184
@ -6,7 +6,7 @@ require (
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/openshift/api v0.0.0-20240115183315-0793e918179d
|
||||
github.com/stretchr/testify v1.9.0
|
||||
k8s.io/api v0.30.1
|
||||
k8s.io/api v0.30.2
|
||||
)
|
||||
|
||||
require (
|
||||
@ -23,7 +23,7 @@ require (
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/apimachinery v0.30.1 // indirect
|
||||
k8s.io/apimachinery v0.30.2 // indirect
|
||||
k8s.io/klog/v2 v2.120.1 // indirect
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
|
10
api/go.sum
10
api/go.sum
@ -5,8 +5,6 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
@ -81,10 +79,10 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY=
|
||||
k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM=
|
||||
k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U=
|
||||
k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
|
||||
k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI=
|
||||
k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI=
|
||||
k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg=
|
||||
k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
|
||||
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
|
||||
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
||||
|
4
api/vendor/modules.txt
vendored
4
api/vendor/modules.txt
vendored
@ -55,12 +55,12 @@ gopkg.in/yaml.v2
|
||||
# gopkg.in/yaml.v3 v3.0.1
|
||||
## explicit
|
||||
gopkg.in/yaml.v3
|
||||
# k8s.io/api v0.30.1
|
||||
# k8s.io/api v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/api/core/v1
|
||||
k8s.io/api/rbac/v1
|
||||
k8s.io/api/storage/v1
|
||||
# k8s.io/apimachinery v0.30.1
|
||||
# k8s.io/apimachinery v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/apimachinery/pkg/api/resource
|
||||
k8s.io/apimachinery/pkg/apis/meta/v1
|
||||
|
78
go.mod
78
go.mod
@ -4,10 +4,10 @@ go 1.22.0
|
||||
|
||||
require (
|
||||
github.com/IBM/keyprotect-go-client v0.12.2
|
||||
github.com/aws/aws-sdk-go v1.51.12
|
||||
github.com/aws/aws-sdk-go v1.53.14
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.1
|
||||
github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000
|
||||
github.com/ceph/go-ceph v0.27.0
|
||||
github.com/ceph/go-ceph v0.28.0
|
||||
github.com/container-storage-interface/spec v1.9.0
|
||||
github.com/csi-addons/spec v0.2.1-0.20230606140122-d20966d2e444
|
||||
github.com/gemalto/kmip-go v0.0.10
|
||||
@ -29,18 +29,18 @@ require (
|
||||
golang.org/x/net v0.26.0
|
||||
golang.org/x/sys v0.21.0
|
||||
google.golang.org/grpc v1.64.0
|
||||
google.golang.org/protobuf v1.34.1
|
||||
google.golang.org/protobuf v1.34.2
|
||||
//
|
||||
// when updating k8s.io/kubernetes, make sure to update the replace section too
|
||||
//
|
||||
k8s.io/api v0.30.1
|
||||
k8s.io/apimachinery v0.30.1
|
||||
k8s.io/api v0.30.2
|
||||
k8s.io/apimachinery v0.30.2
|
||||
k8s.io/client-go v12.0.0+incompatible
|
||||
k8s.io/cloud-provider v0.30.1
|
||||
k8s.io/cloud-provider v0.30.2
|
||||
k8s.io/klog/v2 v2.120.1
|
||||
k8s.io/kubernetes v1.30.1
|
||||
k8s.io/mount-utils v0.29.3
|
||||
k8s.io/pod-security-admission v0.30.1
|
||||
k8s.io/mount-utils v0.30.2
|
||||
k8s.io/pod-security-admission v0.30.2
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
sigs.k8s.io/controller-runtime v0.18.4
|
||||
)
|
||||
@ -175,11 +175,11 @@ require (
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.30.1 // indirect
|
||||
k8s.io/apiserver v0.30.1 // indirect
|
||||
k8s.io/component-base v0.30.1 // indirect
|
||||
k8s.io/component-helpers v0.30.1 // indirect
|
||||
k8s.io/controller-manager v0.30.1 // indirect
|
||||
k8s.io/kms v0.30.1 // indirect
|
||||
k8s.io/apiserver v0.30.2 // indirect
|
||||
k8s.io/component-base v0.30.2 // indirect
|
||||
k8s.io/component-helpers v0.30.2 // indirect
|
||||
k8s.io/controller-manager v0.30.2 // indirect
|
||||
k8s.io/kms v0.30.2 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
|
||||
k8s.io/kubectl v0.0.0 // indirect
|
||||
k8s.io/kubelet v0.0.0 // indirect
|
||||
@ -199,35 +199,35 @@ replace (
|
||||
//
|
||||
// k8s.io/kubernetes depends on these k8s.io packages, but unversioned
|
||||
//
|
||||
k8s.io/api => k8s.io/api v0.30.1
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.1
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.30.1
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.30.1
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.1
|
||||
k8s.io/client-go => k8s.io/client-go v0.30.1
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.1
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.1
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.30.1
|
||||
k8s.io/component-base => k8s.io/component-base v0.30.1
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.30.1
|
||||
k8s.io/controller-manager => k8s.io/controller-manager v0.30.1
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.30.1
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.1
|
||||
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.1
|
||||
k8s.io/endpointslice => k8s.io/endpointslice v0.30.1
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.1
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.1
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.1
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.1
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.30.1
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.30.1
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.1
|
||||
k8s.io/metrics => k8s.io/metrics v0.30.1
|
||||
k8s.io/api => k8s.io/api v0.30.2
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.2
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.30.2
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.30.2
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.2
|
||||
k8s.io/client-go => k8s.io/client-go v0.30.2
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.2
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.2
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.30.2
|
||||
k8s.io/component-base => k8s.io/component-base v0.30.2
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.30.2
|
||||
k8s.io/controller-manager => k8s.io/controller-manager v0.30.2
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.30.2
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.2
|
||||
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.2
|
||||
k8s.io/endpointslice => k8s.io/endpointslice v0.30.2
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.2
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.2
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.2
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.2
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.30.2
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.30.2
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.2
|
||||
k8s.io/metrics => k8s.io/metrics v0.30.2
|
||||
|
||||
// TODO: replace with latest once https://github.com/ceph/ceph-csi/issues/4633 is fixed
|
||||
k8s.io/mount-utils => k8s.io/mount-utils v0.29.3
|
||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.1
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.1
|
||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.2
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.2
|
||||
// layeh.com seems to be misbehaving
|
||||
layeh.com/radius => github.com/layeh/radius v0.0.0-20190322222518-890bc1058917
|
||||
)
|
||||
|
70
go.sum
70
go.sum
@ -834,8 +834,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/aws/aws-sdk-go v1.44.164/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
|
||||
github.com/aws/aws-sdk-go v1.51.12 h1:DvuhIHZXwnjaR1/Gu19gUe1EGPw4J0qSJw4Qs/5PA8g=
|
||||
github.com/aws/aws-sdk-go v1.51.12/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go v1.53.14 h1:SzhkC2Pzag0iRW8WBb80RzKdGXDydJR9LAMs2GyKJ2M=
|
||||
github.com/aws/aws-sdk-go v1.53.14/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8=
|
||||
@ -871,8 +871,8 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
|
||||
github.com/ceph/go-ceph v0.27.0 h1:5rUTIun/EtUFTH2qb6UokCyw9zul1Vr8iKgJo/VBYr8=
|
||||
github.com/ceph/go-ceph v0.27.0/go.mod h1:GFlSfPG6JNhliRTZtI4oWbu1QGUMFner9bba1ecNAnk=
|
||||
github.com/ceph/go-ceph v0.28.0 h1:ZjlDV9XiVmBQIe9bKbT5j2Ft/bse3Jm+Ui65yE/oFFU=
|
||||
github.com/ceph/go-ceph v0.28.0/go.mod h1:EwEITEDpuFCMnFrPLbV+/Vyi59jUihgCxBKvlTWGot0=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
@ -2561,8 +2561,8 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
|
||||
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
|
||||
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
|
||||
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
@ -2609,27 +2609,27 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
|
||||
k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY=
|
||||
k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM=
|
||||
k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws=
|
||||
k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4=
|
||||
k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U=
|
||||
k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
|
||||
k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8=
|
||||
k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo=
|
||||
k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q=
|
||||
k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc=
|
||||
k8s.io/cloud-provider v0.30.1 h1:OslHpog97zG9Kr7/vV1ki8nLKq8xTPUkN/kepCxBqKI=
|
||||
k8s.io/cloud-provider v0.30.1/go.mod h1:1uZp+FSskXQoeAAIU91/XCO8X/9N1U3z5usYeSLT4MI=
|
||||
k8s.io/code-generator v0.30.1/go.mod h1:hFgxRsvOUg79mbpbVKfjJvRhVz1qLoe40yZDJ/hwRH4=
|
||||
k8s.io/component-base v0.30.1 h1:bvAtlPh1UrdaZL20D9+sWxsJljMi0QZ3Lmw+kmZAaxQ=
|
||||
k8s.io/component-base v0.30.1/go.mod h1:e/X9kDiOebwlI41AvBHuWdqFriSRrX50CdwA9TFaHLI=
|
||||
k8s.io/component-helpers v0.30.1 h1:/UcxSLzZ0owluTE2WMDrFfZl2L+WVXKdYYYm68qnH7U=
|
||||
k8s.io/component-helpers v0.30.1/go.mod h1:b1Xk27UJ3p/AmPqDx7khrnSxrdwQy9gTP7O1y6MZ6rg=
|
||||
k8s.io/controller-manager v0.30.1 h1:vrpfinHQWGf40U08Zmrt+QxK/2yTgjJl/9DKtjaB1gI=
|
||||
k8s.io/controller-manager v0.30.1/go.mod h1:8rTEPbn8LRKC/vS+If+JAKBfsftCfTMaF8/n4SJC+PQ=
|
||||
k8s.io/csi-translation-lib v0.30.1 h1:fIBtNMQjyr7HFv3xGSSH9cWOQS1K1kIBmZ1zRsHuVKs=
|
||||
k8s.io/csi-translation-lib v0.30.1/go.mod h1:l0HrIBIxUKRvqnNWqn6AXTYgUa2mAFLT6bjo1lU+55U=
|
||||
k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI=
|
||||
k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI=
|
||||
k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE=
|
||||
k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw=
|
||||
k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg=
|
||||
k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
|
||||
k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw=
|
||||
k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8=
|
||||
k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50=
|
||||
k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs=
|
||||
k8s.io/cloud-provider v0.30.2 h1:yov6r02v7sMUNNvzEz51LtL2krn2c1wsC+dy/8BxKQI=
|
||||
k8s.io/cloud-provider v0.30.2/go.mod h1:w69t2dSjDtI9BYK6SEqj6HmMKIojEk08fXRoUzjFN2I=
|
||||
k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA=
|
||||
k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII=
|
||||
k8s.io/component-base v0.30.2/go.mod h1:yQLkQDrkK8J6NtP+MGJOws+/PPeEXNpwFixsUI7h/OE=
|
||||
k8s.io/component-helpers v0.30.2 h1:kDMYLiWEYeWU7H6jBI+Ua1i2hqNh0DzqDHNIppFC3po=
|
||||
k8s.io/component-helpers v0.30.2/go.mod h1:tI0anfS6AbRqooaICkGg7UVAQLedOauVSQW9srDBnJw=
|
||||
k8s.io/controller-manager v0.30.2 h1:tC7V7IdGUW2I4de3bXx4m2fS3naP7VlCYlECCajK9fU=
|
||||
k8s.io/controller-manager v0.30.2/go.mod h1:CYltIHGhCgldEkXT5vS2JHCCWM1WyBI4kA2UfP9cZvY=
|
||||
k8s.io/csi-translation-lib v0.30.2 h1:ZcFVMWDHg7feW3mtdl+xClgmw1Yxv7m9ysOKt8h3K8Y=
|
||||
k8s.io/csi-translation-lib v0.30.2/go.mod h1:jFT8vquP6eSDUwDHk0mKT6uKFWlZp60ecUEUhmlGsOY=
|
||||
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
@ -2639,22 +2639,22 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
|
||||
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kms v0.30.1 h1:gEIbEeCbFiaN2tNfp/EUhFdGr5/CSj8Eyq6Mkr7cCiY=
|
||||
k8s.io/kms v0.30.1/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4=
|
||||
k8s.io/kms v0.30.2 h1:VSZILO/tkzrz5Tu2j+yFQZ2Dc5JerQZX2GqhFJbQrfw=
|
||||
k8s.io/kms v0.30.2/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4=
|
||||
k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
|
||||
k8s.io/kubectl v0.30.1 h1:sHFIRI3oP0FFZmBAVEE8ErjnTyXDPkBcvO88mH9RjuY=
|
||||
k8s.io/kubectl v0.30.1/go.mod h1:7j+L0Cc38RYEcx+WH3y44jRBe1Q1jxdGPKkX0h4iDq0=
|
||||
k8s.io/kubelet v0.30.1 h1:6gS1gWjrefUGfC/9n0ITOzxnKyt89FfkIhom70Bola4=
|
||||
k8s.io/kubelet v0.30.1/go.mod h1:5IUeAt3YlIfLNdT/YfRuCCONfEefm7qfcqz81b002Z8=
|
||||
k8s.io/kubectl v0.30.2 h1:cgKNIvsOiufgcs4yjvgkK0+aPCfa8pUwzXdJtkbhsH8=
|
||||
k8s.io/kubectl v0.30.2/go.mod h1:rz7GHXaxwnigrqob0lJsiA07Df8RE3n1TSaC2CTeuB4=
|
||||
k8s.io/kubelet v0.30.2 h1:Ck4E/pHndI20IzDXxS57dElhDGASPO5pzXF7BcKfmCY=
|
||||
k8s.io/kubelet v0.30.2/go.mod h1:DSwwTbLQmdNkebAU7ypIALR4P9aXZNFwgRmedojUE94=
|
||||
k8s.io/kubernetes v1.30.1 h1:XlqS6KslLEA5mQzLK2AJrhr4Z1m8oJfkhHiWJ5lue+I=
|
||||
k8s.io/kubernetes v1.30.1/go.mod h1:yPbIk3MhmhGigX62FLJm+CphNtjxqCvAIFQXup6RKS0=
|
||||
k8s.io/mount-utils v0.29.3 h1:iEcqPP7Vv8UClH8nnMfovtmy/04fIloRW9JuSXykoZ0=
|
||||
k8s.io/mount-utils v0.29.3/go.mod h1:9IWJTMe8tG0MYMLEp60xK9GYVeCdA3g4LowmnVi+t9Y=
|
||||
k8s.io/pod-security-admission v0.30.1 h1:r2NQSNXfnZDnm6KvLv1sYgai1ZXuO+m0qn11/Xymkf8=
|
||||
k8s.io/pod-security-admission v0.30.1/go.mod h1:O5iry5U8N0CvtfI5kfe0CZ0Ct/KYj057j6Pa+QIwp24=
|
||||
k8s.io/pod-security-admission v0.30.2 h1:UlHnkvvOr+rgQplOqD+SHzLUF8EgKIOCpDU8kaMeTQQ=
|
||||
k8s.io/pod-security-admission v0.30.2/go.mod h1:gMUJUG9zOgNBk0VIz5BS7uIYiYPEoXkBSeHh6rG2m8c=
|
||||
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
|
@ -461,11 +461,13 @@ func (cs *ControllerServer) createSnapshotAndAddMapping(
|
||||
}
|
||||
defer j.Destroy()
|
||||
// Add the snapshot to the volume group journal
|
||||
err = j.AddVolumeSnapshotMapping(ctx,
|
||||
err = j.AddVolumesMapping(ctx,
|
||||
vgo.MetadataPool,
|
||||
vgs.ReservedID,
|
||||
req.GetSourceVolumeId(),
|
||||
resp.GetSnapshot().GetSnapshotId())
|
||||
map[string]string{
|
||||
req.GetSourceVolumeId(): resp.GetSnapshot().GetSnapshotId(),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed to add volume snapshot mapping: %v", err)
|
||||
// Delete the last created snapshot as its still not added to the
|
||||
@ -640,11 +642,11 @@ func (cs *ControllerServer) deleteSnapshotsAndUndoReservation(ctx context.Contex
|
||||
return err
|
||||
}
|
||||
// remove the entry from the omap
|
||||
err = j.RemoveVolumeSnapshotMapping(
|
||||
err = j.RemoveVolumesMapping(
|
||||
ctx,
|
||||
vgo.MetadataPool,
|
||||
vgsi.ReservedID,
|
||||
volID)
|
||||
[]string{volID})
|
||||
j.Destroy()
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed to remove volume snapshot mapping: %v", err)
|
||||
|
@ -169,7 +169,7 @@ func NewVolumeGroupOptionsFromID(
|
||||
vgs.RequestName = groupAttributes.RequestName
|
||||
vgs.FsVolumeGroupSnapshotName = groupAttributes.GroupName
|
||||
vgs.VolumeGroupSnapshotID = volumeGroupSnapshotID
|
||||
vgs.VolumeSnapshotMap = groupAttributes.VolumeSnapshotMap
|
||||
vgs.VolumeSnapshotMap = groupAttributes.VolumeMap
|
||||
|
||||
return volOptions, &vgs, nil
|
||||
}
|
||||
@ -208,7 +208,7 @@ func CheckVolumeGroupSnapExists(
|
||||
vgs.RequestName = volOptions.RequestName
|
||||
vgs.ReservedID = volGroupData.GroupUUID
|
||||
vgs.FsVolumeGroupSnapshotName = volGroupData.GroupName
|
||||
vgs.VolumeSnapshotMap = volGroupData.VolumeGroupAttributes.VolumeSnapshotMap
|
||||
vgs.VolumeSnapshotMap = volGroupData.VolumeGroupAttributes.VolumeMap
|
||||
|
||||
// found a snapshot already available, process and return it!
|
||||
vgs.VolumeGroupSnapshotID, err = util.GenerateVolID(ctx, volOptions.Monitors, cr, volOptions.FscID,
|
||||
|
@ -74,6 +74,12 @@ const (
|
||||
// (optional) StartTime is the time the snapshot schedule
|
||||
// begins, can be specified using the ISO 8601 time format.
|
||||
schedulingStartTimeKey = "schedulingStartTime"
|
||||
|
||||
// flattenModeKey to get the flattenMode from the parameters.
|
||||
// (optional) flattenMode decides how to handle images with parent.
|
||||
// (default) If set to "never", the image with parent will not be flattened.
|
||||
// If set to "force", the image with parent will be flattened.
|
||||
flattenModeKey = "flattenMode"
|
||||
)
|
||||
|
||||
// ReplicationServer struct of rbd CSI driver with supported methods of Replication
|
||||
@ -115,6 +121,27 @@ func getForceOption(ctx context.Context, parameters map[string]string) (bool, er
|
||||
return force, nil
|
||||
}
|
||||
|
||||
// getFlattenMode gets flatten mode from the input GRPC request parameters.
|
||||
// flattenMode is the key to check the mode in the parameters.
|
||||
func getFlattenMode(ctx context.Context, parameters map[string]string) (corerbd.FlattenMode, error) {
|
||||
val, ok := parameters[flattenModeKey]
|
||||
if !ok {
|
||||
log.DebugLog(ctx, "%q is not set in parameters, setting to default (%v)",
|
||||
flattenModeKey, corerbd.FlattenModeNever)
|
||||
|
||||
return corerbd.FlattenModeNever, nil
|
||||
}
|
||||
|
||||
mode := corerbd.FlattenMode(val)
|
||||
switch mode {
|
||||
case corerbd.FlattenModeForce, corerbd.FlattenModeNever:
|
||||
return mode, nil
|
||||
}
|
||||
log.ErrorLog(ctx, "%q=%q is not supported", flattenModeKey, val)
|
||||
|
||||
return mode, status.Errorf(codes.InvalidArgument, "%q=%q is not supported", flattenModeKey, val)
|
||||
}
|
||||
|
||||
// getMirroringMode gets the mirroring mode from the input GRPC request parameters.
|
||||
// mirroringMode is the key to check the mode in the parameters.
|
||||
func getMirroringMode(ctx context.Context, parameters map[string]string) (librbd.ImageMirrorMode, error) {
|
||||
@ -265,6 +292,11 @@ func (rs *ReplicationServer) EnableVolumeReplication(ctx context.Context,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// extract the flatten mode
|
||||
flattenMode, err := getFlattenMode(ctx, req.GetParameters())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
mirroringInfo, err := rbdVol.GetImageMirroringInfo()
|
||||
if err != nil {
|
||||
@ -274,6 +306,12 @@ func (rs *ReplicationServer) EnableVolumeReplication(ctx context.Context,
|
||||
}
|
||||
|
||||
if mirroringInfo.State != librbd.MirrorImageEnabled {
|
||||
err = rbdVol.HandleParentImageExistence(ctx, flattenMode)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
|
||||
return nil, getGRPCError(err)
|
||||
}
|
||||
err = rbdVol.EnableImageMirroring(mirroringMode)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, err.Error())
|
||||
@ -777,6 +815,7 @@ func getGRPCError(err error) error {
|
||||
|
||||
errorStatusMap := map[error]codes.Code{
|
||||
corerbd.ErrInvalidArgument: codes.InvalidArgument,
|
||||
corerbd.ErrFlattenInProgress: codes.Aborted,
|
||||
corerbd.ErrAborted: codes.Aborted,
|
||||
corerbd.ErrFailedPrecondition: codes.FailedPrecondition,
|
||||
corerbd.ErrUnavailable: codes.Unavailable,
|
||||
|
@ -641,3 +641,69 @@ func Test_timestampFromString(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_getFlattenMode(t *testing.T) {
|
||||
t.Parallel()
|
||||
type args struct {
|
||||
ctx context.Context
|
||||
parameters map[string]string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want corerbd.FlattenMode
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "flattenMode option not set",
|
||||
args: args{
|
||||
ctx: context.TODO(),
|
||||
parameters: map[string]string{},
|
||||
},
|
||||
want: corerbd.FlattenModeNever,
|
||||
},
|
||||
{
|
||||
name: "flattenMode option set to never",
|
||||
args: args{
|
||||
ctx: context.TODO(),
|
||||
parameters: map[string]string{
|
||||
flattenModeKey: string(corerbd.FlattenModeNever),
|
||||
},
|
||||
},
|
||||
want: corerbd.FlattenModeNever,
|
||||
},
|
||||
{
|
||||
name: "flattenMode option set to force",
|
||||
args: args{
|
||||
ctx: context.TODO(),
|
||||
parameters: map[string]string{
|
||||
flattenModeKey: string(corerbd.FlattenModeForce),
|
||||
},
|
||||
},
|
||||
want: corerbd.FlattenModeForce,
|
||||
},
|
||||
|
||||
{
|
||||
name: "flattenMode option set to invalid value",
|
||||
args: args{
|
||||
ctx: context.TODO(),
|
||||
parameters: map[string]string{
|
||||
flattenModeKey: "invalid123",
|
||||
},
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
got, err := getFlattenMode(tt.args.ctx, tt.args.parameters)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("getFlattenMode() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
if !tt.wantErr && !reflect.DeepEqual(got, tt.want) {
|
||||
t.Errorf("getFlattenMode() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -131,6 +131,10 @@ type Config struct {
|
||||
// of this Ceph volume
|
||||
csiImageIDKey string
|
||||
|
||||
// CSI GroupName is per Ceph volume object omap, contains the group ID of
|
||||
// this Ceph volume
|
||||
csiGroupIDKey string
|
||||
|
||||
// CSI image-name key in per Ceph volume object map, containing RBD image-name
|
||||
// of this Ceph volume
|
||||
csiImageKey string
|
||||
@ -174,6 +178,7 @@ func NewCSIVolumeJournal(suffix string) *Config {
|
||||
cephSnapSourceKey: "",
|
||||
namespace: "",
|
||||
csiImageIDKey: "csi.imageid",
|
||||
csiGroupIDKey: "csi.groupid",
|
||||
encryptKMSKey: "csi.volume.encryptKMS",
|
||||
encryptionType: "csi.volume.encryptionType",
|
||||
ownerKey: "csi.volume.owner",
|
||||
@ -686,6 +691,7 @@ type ImageAttributes struct {
|
||||
EncryptionType util.EncryptionType // Type of encryption used, if image encrypted
|
||||
Owner string // Contains the owner to be used in combination with KmsID (for some KMS)
|
||||
ImageID string // Contains the image id
|
||||
GroupID string // Contains the group id of the image
|
||||
JournalPoolID int64 // Pool ID of the CSI journal pool, stored in big endian format (on-disk data)
|
||||
BackingSnapshotID string // ID of the snapshot on which the CephFS snapshot-backed volume is based
|
||||
}
|
||||
@ -718,6 +724,7 @@ func (conn *Connection) GetImageAttributes(
|
||||
cj.csiImageIDKey,
|
||||
cj.ownerKey,
|
||||
cj.backingSnapshotIDKey,
|
||||
cj.csiGroupIDKey,
|
||||
}
|
||||
values, err := getOMapValues(
|
||||
ctx, conn, pool, cj.namespace, cj.cephUUIDDirectoryPrefix+objectUUID,
|
||||
@ -736,6 +743,7 @@ func (conn *Connection) GetImageAttributes(
|
||||
imageAttributes.Owner = values[cj.ownerKey]
|
||||
imageAttributes.ImageID = values[cj.csiImageIDKey]
|
||||
imageAttributes.BackingSnapshotID = values[cj.backingSnapshotIDKey]
|
||||
imageAttributes.GroupID = values[cj.csiGroupIDKey]
|
||||
|
||||
// image key was added at a later point, so not all volumes will have this
|
||||
// key set when ceph-csi was upgraded
|
||||
@ -795,6 +803,16 @@ func (conn *Connection) StoreAttribute(ctx context.Context, pool, reservedUUID,
|
||||
return nil
|
||||
}
|
||||
|
||||
// StoreGroupID stores an groupID in omap.
|
||||
func (conn *Connection) StoreGroupID(ctx context.Context, pool, reservedUUID, groupID string) error {
|
||||
err := conn.StoreAttribute(ctx, pool, reservedUUID, conn.config.csiGroupIDKey, groupID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to store groupID %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// FetchAttribute fetches an attribute (key) in omap.
|
||||
func (conn *Connection) FetchAttribute(ctx context.Context, pool, reservedUUID, attribute string) (string, error) {
|
||||
key := conn.config.commonPrefix + attribute
|
||||
|
@ -41,7 +41,7 @@ type VolumeGroupJournal interface {
|
||||
UndoReservation(
|
||||
ctx context.Context,
|
||||
csiJournalPool,
|
||||
snapshotGroupName,
|
||||
groupName,
|
||||
reqName string) error
|
||||
// GetGroupAttributes fetches all keys and their values, from a UUID directory,
|
||||
// returning VolumeGroupAttributes structure.
|
||||
@ -55,19 +55,22 @@ type VolumeGroupJournal interface {
|
||||
journalPoolID int64,
|
||||
reqName,
|
||||
namePrefix string) (string, string, error)
|
||||
// AddVolumeSnapshotMapping adds a volumeID and snapshotID mapping to the UUID directory.
|
||||
AddVolumeSnapshotMapping(
|
||||
// AddVolumesMapping adds a volumeMap map which contains volumeID's and its
|
||||
// corresponding values mapping which need to be added to the UUID
|
||||
// directory. value can be anything which needs mapping, in case of
|
||||
// volumegroupsnapshot its a snapshotID and its empty in case of
|
||||
// volumegroup.
|
||||
AddVolumesMapping(
|
||||
ctx context.Context,
|
||||
pool,
|
||||
reservedUUID,
|
||||
volumeID,
|
||||
snapshotID string) error
|
||||
// RemoveVolumeSnapshotMapping removes a volumeID and snapshotID mapping from the UUID directory.
|
||||
RemoveVolumeSnapshotMapping(
|
||||
reservedUUID string,
|
||||
volumeMap map[string]string) error
|
||||
// RemoveVolumesMapping removes volumeIDs mapping from the UUID directory.
|
||||
RemoveVolumesMapping(
|
||||
ctx context.Context,
|
||||
pool,
|
||||
reservedUUID,
|
||||
volumeID string) error
|
||||
reservedUUID string,
|
||||
volumeIDs []string) error
|
||||
}
|
||||
|
||||
// VolumeGroupJournalConfig contains the configuration.
|
||||
@ -222,7 +225,7 @@ func (vgjc *VolumeGroupJournalConnection) CheckReservation(ctx context.Context,
|
||||
volGroupData.GroupName = savedVolumeGroupAttributes.GroupName
|
||||
volGroupData.VolumeGroupAttributes = &VolumeGroupAttributes{}
|
||||
volGroupData.VolumeGroupAttributes.RequestName = savedVolumeGroupAttributes.RequestName
|
||||
volGroupData.VolumeGroupAttributes.VolumeSnapshotMap = savedVolumeGroupAttributes.VolumeSnapshotMap
|
||||
volGroupData.VolumeGroupAttributes.VolumeMap = savedVolumeGroupAttributes.VolumeMap
|
||||
|
||||
return volGroupData, nil
|
||||
}
|
||||
@ -363,7 +366,7 @@ func (vgjc *VolumeGroupJournalConnection) ReserveName(ctx context.Context,
|
||||
type VolumeGroupAttributes struct {
|
||||
RequestName string // Contains the request name for the passed in UUID
|
||||
GroupName string // Contains the group name
|
||||
VolumeSnapshotMap map[string]string // Contains the volumeID and the corresponding snapshotID mapping
|
||||
VolumeMap map[string]string // Contains the volumeID and the corresponding value mapping
|
||||
}
|
||||
|
||||
func (vgjc *VolumeGroupJournalConnection) GetVolumeGroupAttributes(
|
||||
@ -393,25 +396,24 @@ func (vgjc *VolumeGroupJournalConnection) GetVolumeGroupAttributes(
|
||||
// looking for volumeID/snapshotID mapping
|
||||
delete(values, cj.csiNameKey)
|
||||
delete(values, cj.csiImageKey)
|
||||
groupAttributes.VolumeSnapshotMap = map[string]string{}
|
||||
groupAttributes.VolumeMap = map[string]string{}
|
||||
for k, v := range values {
|
||||
groupAttributes.VolumeSnapshotMap[k] = v
|
||||
groupAttributes.VolumeMap[k] = v
|
||||
}
|
||||
|
||||
return groupAttributes, nil
|
||||
}
|
||||
|
||||
func (vgjc *VolumeGroupJournalConnection) AddVolumeSnapshotMapping(
|
||||
func (vgjc *VolumeGroupJournalConnection) AddVolumesMapping(
|
||||
ctx context.Context,
|
||||
pool,
|
||||
reservedUUID,
|
||||
volumeID,
|
||||
snapshotID string,
|
||||
reservedUUID string,
|
||||
volumeMap map[string]string,
|
||||
) error {
|
||||
err := setOMapKeys(ctx, vgjc.connection, pool, vgjc.config.namespace, vgjc.config.cephUUIDDirectoryPrefix+reservedUUID,
|
||||
map[string]string{volumeID: snapshotID})
|
||||
volumeMap)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed adding volume snapshot mapping: %v", err)
|
||||
log.ErrorLog(ctx, "failed to add volumeMap %v: %w ", volumeMap, err)
|
||||
|
||||
return err
|
||||
}
|
||||
@ -419,17 +421,17 @@ func (vgjc *VolumeGroupJournalConnection) AddVolumeSnapshotMapping(
|
||||
return nil
|
||||
}
|
||||
|
||||
func (vgjc *VolumeGroupJournalConnection) RemoveVolumeSnapshotMapping(
|
||||
func (vgjc *VolumeGroupJournalConnection) RemoveVolumesMapping(
|
||||
ctx context.Context,
|
||||
pool,
|
||||
reservedUUID,
|
||||
volumeID string,
|
||||
reservedUUID string,
|
||||
volumeIDs []string,
|
||||
) error {
|
||||
err := removeMapKeys(ctx, vgjc.connection, pool, vgjc.config.namespace,
|
||||
vgjc.config.cephUUIDDirectoryPrefix+reservedUUID,
|
||||
[]string{volumeID})
|
||||
volumeIDs)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed removing volume snapshot mapping: %v", err)
|
||||
log.ErrorLog(ctx, "failed removing volume mapping from group: key: %q %v", volumeIDs, err)
|
||||
|
||||
return err
|
||||
}
|
||||
|
@ -1020,22 +1020,12 @@ func cleanupRBDImage(ctx context.Context,
|
||||
|
||||
// delete the temporary rbd image created as part of volume clone during
|
||||
// create volume
|
||||
tempClone := rbdVol.generateTempClone()
|
||||
err = tempClone.deleteImage(ctx)
|
||||
err = rbdVol.DeleteTempImage(ctx)
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrImageNotFound) {
|
||||
err = tempClone.ensureImageCleanup(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
} else {
|
||||
// return error if it is not ErrImageNotFound
|
||||
log.ErrorLog(ctx, "failed to delete rbd image: %s with error: %v",
|
||||
tempClone, err)
|
||||
log.ErrorLog(ctx, "failed to delete temporary rbd image: %v", err)
|
||||
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// Deleting rbd image
|
||||
log.DebugLog(ctx, "deleting image %s", rbdVol.RbdImageName)
|
||||
|
@ -25,6 +25,69 @@ import (
|
||||
librbd "github.com/ceph/go-ceph/rbd"
|
||||
)
|
||||
|
||||
// FlattenMode is used to indicate the flatten mode for an RBD image.
|
||||
type FlattenMode string
|
||||
|
||||
const (
|
||||
// FlattenModeNever indicates that the image should never be flattened.
|
||||
FlattenModeNever FlattenMode = "never"
|
||||
// FlattenModeForce indicates that the image with the parent must be flattened.
|
||||
FlattenModeForce FlattenMode = "force"
|
||||
)
|
||||
|
||||
// HandleParentImageExistence checks the image's parent.
|
||||
// if the parent image does not exist and is not in trash, it returns nil.
|
||||
// if the flattenMode is FlattenModeForce, it flattens the image itself.
|
||||
// if the parent image is in trash, it returns an error.
|
||||
// if the parent image exists and is not enabled for mirroring, it returns an error.
|
||||
func (rv *rbdVolume) HandleParentImageExistence(
|
||||
ctx context.Context,
|
||||
flattenMode FlattenMode,
|
||||
) error {
|
||||
if rv.ParentName == "" && !rv.ParentInTrash {
|
||||
return nil
|
||||
}
|
||||
|
||||
if flattenMode == FlattenModeForce {
|
||||
// Delete temp image that exists for volume datasource since
|
||||
// it is no longer required when the live image is flattened.
|
||||
err := rv.DeleteTempImage(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to delete temporary rbd image: %w", err)
|
||||
}
|
||||
|
||||
err = rv.flattenRbdImage(ctx, true, 0, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if rv.ParentInTrash {
|
||||
return fmt.Errorf("%w: failed to enable mirroring on image %q:"+
|
||||
" parent is in trash",
|
||||
ErrFailedPrecondition, rv)
|
||||
}
|
||||
|
||||
parent, err := rv.getParent()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
parentMirroringInfo, err := parent.GetImageMirroringInfo()
|
||||
if err != nil {
|
||||
return fmt.Errorf(
|
||||
"failed to get mirroring info of parent %q of image %q: %w",
|
||||
parent, rv, err)
|
||||
}
|
||||
|
||||
if parentMirroringInfo.State != librbd.MirrorImageEnabled {
|
||||
return fmt.Errorf("%w: failed to enable mirroring on image %q: "+
|
||||
"parent image %q is not enabled for mirroring",
|
||||
ErrFailedPrecondition, rv, parent)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// EnableImageMirroring enables mirroring on an image.
|
||||
func (ri *rbdImage) EnableImageMirroring(mode librbd.ImageMirrorMode) error {
|
||||
image, err := ri.open()
|
||||
|
@ -703,6 +703,22 @@ func (ri *rbdImage) trashRemoveImage(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteTempImage deletes the temporary image created for volume datasource.
|
||||
func (rv *rbdVolume) DeleteTempImage(ctx context.Context) error {
|
||||
tempClone := rv.generateTempClone()
|
||||
err := tempClone.deleteImage(ctx)
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrImageNotFound) {
|
||||
return tempClone.ensureImageCleanup(ctx)
|
||||
} else {
|
||||
// return error if it is not ErrImageNotFound
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ri *rbdImage) getCloneDepth(ctx context.Context) (uint, error) {
|
||||
var depth uint
|
||||
vol := rbdVolume{}
|
||||
|
1408
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
1408
vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
generated
vendored
File diff suppressed because it is too large
Load Diff
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go/aws/version.go
generated
vendored
@ -5,4 +5,4 @@ package aws
|
||||
const SDKName = "aws-sdk-go"
|
||||
|
||||
// SDKVersion is the version of this SDK
|
||||
const SDKVersion = "1.51.12"
|
||||
const SDKVersion = "1.53.14"
|
||||
|
4
vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
generated
vendored
@ -122,8 +122,8 @@ func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix stri
|
||||
}
|
||||
|
||||
func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
|
||||
// If it's empty, generate an empty value
|
||||
if !value.IsNil() && value.Len() == 0 {
|
||||
// If it's empty, and not ec2, generate an empty value
|
||||
if !value.IsNil() && value.Len() == 0 && !q.isEC2 {
|
||||
v.Set(prefix, "")
|
||||
return nil
|
||||
}
|
||||
|
936
vendor/github.com/aws/aws-sdk-go/service/kms/api.go
generated
vendored
936
vendor/github.com/aws/aws-sdk-go/service/kms/api.go
generated
vendored
File diff suppressed because it is too large
Load Diff
8
vendor/github.com/aws/aws-sdk-go/service/kms/errors.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go/service/kms/errors.go
generated
vendored
@ -97,6 +97,13 @@ const (
|
||||
// operation.
|
||||
ErrCodeCloudHsmClusterNotRelatedException = "CloudHsmClusterNotRelatedException"
|
||||
|
||||
// ErrCodeConflictException for service response error code
|
||||
// "ConflictException".
|
||||
//
|
||||
// The request was rejected because an automatic rotation of this key is currently
|
||||
// in progress or scheduled to begin within the next 20 minutes.
|
||||
ErrCodeConflictException = "ConflictException"
|
||||
|
||||
// ErrCodeCustomKeyStoreHasCMKsException for service response error code
|
||||
// "CustomKeyStoreHasCMKsException".
|
||||
//
|
||||
@ -488,6 +495,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
|
||||
"CloudHsmClusterNotActiveException": newErrorCloudHsmClusterNotActiveException,
|
||||
"CloudHsmClusterNotFoundException": newErrorCloudHsmClusterNotFoundException,
|
||||
"CloudHsmClusterNotRelatedException": newErrorCloudHsmClusterNotRelatedException,
|
||||
"ConflictException": newErrorConflictException,
|
||||
"CustomKeyStoreHasCMKsException": newErrorCustomKeyStoreHasCMKsException,
|
||||
"CustomKeyStoreInvalidStateException": newErrorCustomKeyStoreInvalidStateException,
|
||||
"CustomKeyStoreNameInUseException": newErrorCustomKeyStoreNameInUseException,
|
||||
|
162
vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go
generated
vendored
162
vendor/github.com/aws/aws-sdk-go/service/ssooidc/api.go
generated
vendored
@ -179,8 +179,8 @@ func (c *SSOOIDC) CreateTokenWithIAMRequest(input *CreateTokenWithIAMInput) (req
|
||||
//
|
||||
// Creates and returns access and refresh tokens for clients and applications
|
||||
// that are authenticated using IAM entities. The access token can be used to
|
||||
// fetch short-term credentials for the assigned AWS accounts or to access application
|
||||
// APIs using bearer authentication.
|
||||
// fetch short-term credentials for the assigned Amazon Web Services accounts
|
||||
// or to access application APIs using bearer authentication.
|
||||
//
|
||||
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
|
||||
// with awserr.Error's Code and Message methods to get detailed information about
|
||||
@ -331,6 +331,13 @@ func (c *SSOOIDC) RegisterClientRequest(input *RegisterClientInput) (req *reques
|
||||
// Indicates that an error from the service occurred while trying to process
|
||||
// a request.
|
||||
//
|
||||
// - InvalidRedirectUriException
|
||||
// Indicates that one or more redirect URI in the request is not supported for
|
||||
// this operation.
|
||||
//
|
||||
// - UnsupportedGrantTypeException
|
||||
// Indicates that the grant type in the request is not supported by the service.
|
||||
//
|
||||
// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/RegisterClient
|
||||
func (c *SSOOIDC) RegisterClient(input *RegisterClientInput) (*RegisterClientOutput, error) {
|
||||
req, out := c.RegisterClientRequest(input)
|
||||
@ -619,6 +626,15 @@ type CreateTokenInput struct {
|
||||
// type is currently unsupported for the CreateToken API.
|
||||
Code *string `locationName:"code" type:"string"`
|
||||
|
||||
// Used only when calling this API for the Authorization Code grant type. This
|
||||
// value is generated by the client and presented to validate the original code
|
||||
// challenge value the client passed at authorization time.
|
||||
//
|
||||
// CodeVerifier is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenInput's
|
||||
// String and GoString methods.
|
||||
CodeVerifier *string `locationName:"codeVerifier" type:"string" sensitive:"true"`
|
||||
|
||||
// Used only when calling this API for the Device Code grant type. This short-term
|
||||
// code is used to identify this authorization request. This comes from the
|
||||
// result of the StartDeviceAuthorization API.
|
||||
@ -718,6 +734,12 @@ func (s *CreateTokenInput) SetCode(v string) *CreateTokenInput {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetCodeVerifier sets the CodeVerifier field's value.
|
||||
func (s *CreateTokenInput) SetCodeVerifier(v string) *CreateTokenInput {
|
||||
s.CodeVerifier = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetDeviceCode sets the DeviceCode field's value.
|
||||
func (s *CreateTokenInput) SetDeviceCode(v string) *CreateTokenInput {
|
||||
s.DeviceCode = &v
|
||||
@ -751,7 +773,8 @@ func (s *CreateTokenInput) SetScope(v []*string) *CreateTokenInput {
|
||||
type CreateTokenOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// A bearer token to access AWS accounts and applications assigned to a user.
|
||||
// A bearer token to access Amazon Web Services accounts and applications assigned
|
||||
// to a user.
|
||||
//
|
||||
// AccessToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenOutput's
|
||||
@ -863,6 +886,15 @@ type CreateTokenWithIAMInput struct {
|
||||
// persisted in the Authorization Code GrantOptions for the application.
|
||||
Code *string `locationName:"code" type:"string"`
|
||||
|
||||
// Used only when calling this API for the Authorization Code grant type. This
|
||||
// value is generated by the client and presented to validate the original code
|
||||
// challenge value the client passed at authorization time.
|
||||
//
|
||||
// CodeVerifier is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMInput's
|
||||
// String and GoString methods.
|
||||
CodeVerifier *string `locationName:"codeVerifier" type:"string" sensitive:"true"`
|
||||
|
||||
// Supports the following OAuth grant types: Authorization Code, Refresh Token,
|
||||
// JWT Bearer, and Token Exchange. Specify one of the following values, depending
|
||||
// on the grant type that you want:
|
||||
@ -982,6 +1014,12 @@ func (s *CreateTokenWithIAMInput) SetCode(v string) *CreateTokenWithIAMInput {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetCodeVerifier sets the CodeVerifier field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetCodeVerifier(v string) *CreateTokenWithIAMInput {
|
||||
s.CodeVerifier = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetGrantType sets the GrantType field's value.
|
||||
func (s *CreateTokenWithIAMInput) SetGrantType(v string) *CreateTokenWithIAMInput {
|
||||
s.GrantType = &v
|
||||
@ -1027,7 +1065,8 @@ func (s *CreateTokenWithIAMInput) SetSubjectTokenType(v string) *CreateTokenWith
|
||||
type CreateTokenWithIAMOutput struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// A bearer token to access AWS accounts and applications assigned to a user.
|
||||
// A bearer token to access Amazon Web Services accounts and applications assigned
|
||||
// to a user.
|
||||
//
|
||||
// AccessToken is a sensitive parameter and its value will be
|
||||
// replaced with "sensitive" in string returned by CreateTokenWithIAMOutput's
|
||||
@ -1495,6 +1534,78 @@ func (s *InvalidGrantException) RequestID() string {
|
||||
return s.RespMetadata.RequestID
|
||||
}
|
||||
|
||||
// Indicates that one or more redirect URI in the request is not supported for
|
||||
// this operation.
|
||||
type InvalidRedirectUriException struct {
|
||||
_ struct{} `type:"structure"`
|
||||
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
|
||||
|
||||
// Single error code. For this exception the value will be invalid_redirect_uri.
|
||||
Error_ *string `locationName:"error" type:"string"`
|
||||
|
||||
// Human-readable text providing additional information, used to assist the
|
||||
// client developer in understanding the error that occurred.
|
||||
Error_description *string `locationName:"error_description" type:"string"`
|
||||
|
||||
Message_ *string `locationName:"message" type:"string"`
|
||||
}
|
||||
|
||||
// String returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s InvalidRedirectUriException) String() string {
|
||||
return awsutil.Prettify(s)
|
||||
}
|
||||
|
||||
// GoString returns the string representation.
|
||||
//
|
||||
// API parameter values that are decorated as "sensitive" in the API will not
|
||||
// be included in the string output. The member name will be present, but the
|
||||
// value will be replaced with "sensitive".
|
||||
func (s InvalidRedirectUriException) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
func newErrorInvalidRedirectUriException(v protocol.ResponseMetadata) error {
|
||||
return &InvalidRedirectUriException{
|
||||
RespMetadata: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Code returns the exception type name.
|
||||
func (s *InvalidRedirectUriException) Code() string {
|
||||
return "InvalidRedirectUriException"
|
||||
}
|
||||
|
||||
// Message returns the exception's message.
|
||||
func (s *InvalidRedirectUriException) Message() string {
|
||||
if s.Message_ != nil {
|
||||
return *s.Message_
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// OrigErr always returns nil, satisfies awserr.Error interface.
|
||||
func (s *InvalidRedirectUriException) OrigErr() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *InvalidRedirectUriException) Error() string {
|
||||
return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
|
||||
}
|
||||
|
||||
// Status code returns the HTTP status code for the request's response error.
|
||||
func (s *InvalidRedirectUriException) StatusCode() int {
|
||||
return s.RespMetadata.StatusCode
|
||||
}
|
||||
|
||||
// RequestID returns the service's response RequestID for request.
|
||||
func (s *InvalidRedirectUriException) RequestID() string {
|
||||
return s.RespMetadata.RequestID
|
||||
}
|
||||
|
||||
// Indicates that something is wrong with the input to the request. For example,
|
||||
// a required parameter might be missing or out of range.
|
||||
type InvalidRequestException struct {
|
||||
@ -1731,6 +1842,25 @@ type RegisterClientInput struct {
|
||||
// ClientType is a required field
|
||||
ClientType *string `locationName:"clientType" type:"string" required:"true"`
|
||||
|
||||
// This IAM Identity Center application ARN is used to define administrator-managed
|
||||
// configuration for public client access to resources. At authorization, the
|
||||
// scopes, grants, and redirect URI available to this client will be restricted
|
||||
// by this application resource.
|
||||
EntitledApplicationArn *string `locationName:"entitledApplicationArn" type:"string"`
|
||||
|
||||
// The list of OAuth 2.0 grant types that are defined by the client. This list
|
||||
// is used to restrict the token granting flows available to the client.
|
||||
GrantTypes []*string `locationName:"grantTypes" type:"list"`
|
||||
|
||||
// The IAM Identity Center Issuer URL associated with an instance of IAM Identity
|
||||
// Center. This value is needed for user access to resources through the client.
|
||||
IssuerUrl *string `locationName:"issuerUrl" type:"string"`
|
||||
|
||||
// The list of redirect URI that are defined by the client. At completion of
|
||||
// authorization, this list is used to restrict what locations the user agent
|
||||
// can be redirected back to.
|
||||
RedirectUris []*string `locationName:"redirectUris" type:"list"`
|
||||
|
||||
// The list of scopes that are defined by the client. Upon authorization, this
|
||||
// list is used to restrict permissions when granting an access token.
|
||||
Scopes []*string `locationName:"scopes" type:"list"`
|
||||
@ -1782,6 +1912,30 @@ func (s *RegisterClientInput) SetClientType(v string) *RegisterClientInput {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetEntitledApplicationArn sets the EntitledApplicationArn field's value.
|
||||
func (s *RegisterClientInput) SetEntitledApplicationArn(v string) *RegisterClientInput {
|
||||
s.EntitledApplicationArn = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetGrantTypes sets the GrantTypes field's value.
|
||||
func (s *RegisterClientInput) SetGrantTypes(v []*string) *RegisterClientInput {
|
||||
s.GrantTypes = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetIssuerUrl sets the IssuerUrl field's value.
|
||||
func (s *RegisterClientInput) SetIssuerUrl(v string) *RegisterClientInput {
|
||||
s.IssuerUrl = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetRedirectUris sets the RedirectUris field's value.
|
||||
func (s *RegisterClientInput) SetRedirectUris(v []*string) *RegisterClientInput {
|
||||
s.RedirectUris = v
|
||||
return s
|
||||
}
|
||||
|
||||
// SetScopes sets the Scopes field's value.
|
||||
func (s *RegisterClientInput) SetScopes(v []*string) *RegisterClientInput {
|
||||
s.Scopes = v
|
||||
|
8
vendor/github.com/aws/aws-sdk-go/service/ssooidc/errors.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go/service/ssooidc/errors.go
generated
vendored
@ -57,6 +57,13 @@ const (
|
||||
// makes a CreateToken request with an invalid grant type.
|
||||
ErrCodeInvalidGrantException = "InvalidGrantException"
|
||||
|
||||
// ErrCodeInvalidRedirectUriException for service response error code
|
||||
// "InvalidRedirectUriException".
|
||||
//
|
||||
// Indicates that one or more redirect URI in the request is not supported for
|
||||
// this operation.
|
||||
ErrCodeInvalidRedirectUriException = "InvalidRedirectUriException"
|
||||
|
||||
// ErrCodeInvalidRequestException for service response error code
|
||||
// "InvalidRequestException".
|
||||
//
|
||||
@ -106,6 +113,7 @@ var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
|
||||
"InvalidClientException": newErrorInvalidClientException,
|
||||
"InvalidClientMetadataException": newErrorInvalidClientMetadataException,
|
||||
"InvalidGrantException": newErrorInvalidGrantException,
|
||||
"InvalidRedirectUriException": newErrorInvalidRedirectUriException,
|
||||
"InvalidRequestException": newErrorInvalidRequestException,
|
||||
"InvalidRequestRegionException": newErrorInvalidRequestRegionException,
|
||||
"InvalidScopeException": newErrorInvalidScopeException,
|
||||
|
4
vendor/google.golang.org/protobuf/encoding/protojson/decode.go
generated
vendored
4
vendor/google.golang.org/protobuf/encoding/protojson/decode.go
generated
vendored
@ -102,7 +102,7 @@ type decoder struct {
|
||||
}
|
||||
|
||||
// newError returns an error object with position info.
|
||||
func (d decoder) newError(pos int, f string, x ...interface{}) error {
|
||||
func (d decoder) newError(pos int, f string, x ...any) error {
|
||||
line, column := d.Position(pos)
|
||||
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
||||
return errors.New(head+f, x...)
|
||||
@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error {
|
||||
}
|
||||
|
||||
// syntaxError returns a syntax error for given position.
|
||||
func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
|
||||
func (d decoder) syntaxError(pos int, f string, x ...any) error {
|
||||
line, column := d.Position(pos)
|
||||
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
||||
return errors.New(head+f, x...)
|
||||
|
4
vendor/google.golang.org/protobuf/encoding/prototext/decode.go
generated
vendored
4
vendor/google.golang.org/protobuf/encoding/prototext/decode.go
generated
vendored
@ -84,7 +84,7 @@ type decoder struct {
|
||||
}
|
||||
|
||||
// newError returns an error object with position info.
|
||||
func (d decoder) newError(pos int, f string, x ...interface{}) error {
|
||||
func (d decoder) newError(pos int, f string, x ...any) error {
|
||||
line, column := d.Position(pos)
|
||||
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
||||
return errors.New(head+f, x...)
|
||||
@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error {
|
||||
}
|
||||
|
||||
// syntaxError returns a syntax error for given position.
|
||||
func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
|
||||
func (d decoder) syntaxError(pos int, f string, x ...any) error {
|
||||
line, column := d.Position(pos)
|
||||
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
||||
return errors.New(head+f, x...)
|
||||
|
2
vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/encoding/json/decode.go
generated
vendored
@ -214,7 +214,7 @@ func (d *Decoder) parseNext() (Token, error) {
|
||||
|
||||
// newSyntaxError returns an error with line and column information useful for
|
||||
// syntax errors.
|
||||
func (d *Decoder) newSyntaxError(pos int, f string, x ...interface{}) error {
|
||||
func (d *Decoder) newSyntaxError(pos int, f string, x ...any) error {
|
||||
e := errors.New(f, x...)
|
||||
line, column := d.Position(pos)
|
||||
return errors.New("syntax error (line %d:%d): %v", line, column, e)
|
||||
|
2
vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
generated
vendored
@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token {
|
||||
|
||||
// newSyntaxError returns a syntax error with line and column information for
|
||||
// current position.
|
||||
func (d *Decoder) newSyntaxError(f string, x ...interface{}) error {
|
||||
func (d *Decoder) newSyntaxError(f string, x ...any) error {
|
||||
e := errors.New(f, x...)
|
||||
line, column := d.Position(len(d.orig) - len(d.in))
|
||||
return errors.New("syntax error (line %d:%d): %v", line, column, e)
|
||||
|
6
vendor/google.golang.org/protobuf/internal/errors/errors.go
generated
vendored
6
vendor/google.golang.org/protobuf/internal/errors/errors.go
generated
vendored
@ -17,7 +17,7 @@ var Error = errors.New("protobuf error")
|
||||
|
||||
// New formats a string according to the format specifier and arguments and
|
||||
// returns an error that has a "proto" prefix.
|
||||
func New(f string, x ...interface{}) error {
|
||||
func New(f string, x ...any) error {
|
||||
return &prefixError{s: format(f, x...)}
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error {
|
||||
|
||||
// Wrap returns an error that has a "proto" prefix, the formatted string described
|
||||
// by the format specifier and arguments, and a suffix of err. The error wraps err.
|
||||
func Wrap(err error, f string, x ...interface{}) error {
|
||||
func Wrap(err error, f string, x ...any) error {
|
||||
return &wrapError{
|
||||
s: format(f, x...),
|
||||
err: err,
|
||||
@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool {
|
||||
return target == Error
|
||||
}
|
||||
|
||||
func format(f string, x ...interface{}) string {
|
||||
func format(f string, x ...any) string {
|
||||
// avoid "proto: " prefix when chaining
|
||||
for i := 0; i < len(x); i++ {
|
||||
switch e := x[i].(type) {
|
||||
|
4
vendor/google.golang.org/protobuf/internal/filedesc/desc.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/filedesc/desc.go
generated
vendored
@ -383,6 +383,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor {
|
||||
}
|
||||
return fd.L1.Message
|
||||
}
|
||||
func (fd *Field) IsMapEntry() bool {
|
||||
parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor)
|
||||
return ok && parent.IsMapEntry()
|
||||
}
|
||||
func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
|
||||
func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {}
|
||||
|
||||
|
2
vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go
generated
vendored
@ -534,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor
|
||||
}
|
||||
|
||||
var nameBuilderPool = sync.Pool{
|
||||
New: func() interface{} { return new(strs.Builder) },
|
||||
New: func() any { return new(strs.Builder) },
|
||||
}
|
||||
|
||||
func getBuilder() *strs.Builder {
|
||||
|
5
vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
generated
vendored
5
vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go
generated
vendored
@ -45,6 +45,11 @@ func (file *File) resolveMessages() {
|
||||
case protoreflect.MessageKind, protoreflect.GroupKind:
|
||||
fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx)
|
||||
depIdx++
|
||||
if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) {
|
||||
// A map field might inherit delimited encoding from a file-wide default feature.
|
||||
// But maps never actually use delimited encoding. (At least for now...)
|
||||
fd.L1.Kind = protoreflect.MessageKind
|
||||
}
|
||||
}
|
||||
|
||||
// Default is resolved here since it depends on Enum being resolved.
|
||||
|
4
vendor/google.golang.org/protobuf/internal/filetype/build.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/filetype/build.go
generated
vendored
@ -68,7 +68,7 @@ type Builder struct {
|
||||
// and for input and output messages referenced by service methods.
|
||||
// Dependencies must come after declarations, but the ordering of
|
||||
// dependencies themselves is unspecified.
|
||||
GoTypes []interface{}
|
||||
GoTypes []any
|
||||
|
||||
// DependencyIndexes is an ordered list of indexes into GoTypes for the
|
||||
// dependencies of messages, extensions, or services.
|
||||
@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 {
|
||||
|
||||
type (
|
||||
resolverByIndex struct {
|
||||
goTypes []interface{}
|
||||
goTypes []any
|
||||
depIdxs depIdxs
|
||||
fileRegistry
|
||||
}
|
||||
|
3
vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
generated
vendored
3
vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
generated
vendored
@ -860,11 +860,13 @@ const (
|
||||
EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated"
|
||||
EnumValueOptions_Features_field_name protoreflect.Name = "features"
|
||||
EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
|
||||
EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support"
|
||||
EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
|
||||
|
||||
EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated"
|
||||
EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features"
|
||||
EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact"
|
||||
EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support"
|
||||
EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option"
|
||||
)
|
||||
|
||||
@ -873,6 +875,7 @@ const (
|
||||
EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1
|
||||
EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2
|
||||
EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3
|
||||
EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4
|
||||
EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
|
||||
)
|
||||
|
||||
|
6
vendor/google.golang.org/protobuf/internal/impl/api_export.go
generated
vendored
6
vendor/google.golang.org/protobuf/internal/impl/api_export.go
generated
vendored
@ -22,13 +22,13 @@ type Export struct{}
|
||||
|
||||
// NewError formats a string according to the format specifier and arguments and
|
||||
// returns an error that has a "proto" prefix.
|
||||
func (Export) NewError(f string, x ...interface{}) error {
|
||||
func (Export) NewError(f string, x ...any) error {
|
||||
return errors.New(f, x...)
|
||||
}
|
||||
|
||||
// enum is any enum type generated by protoc-gen-go
|
||||
// and must be a named int32 type.
|
||||
type enum = interface{}
|
||||
type enum = any
|
||||
|
||||
// EnumOf returns the protoreflect.Enum interface over e.
|
||||
// It returns nil if e is nil.
|
||||
@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu
|
||||
|
||||
// message is any message type generated by protoc-gen-go
|
||||
// and must be a pointer to a named struct type.
|
||||
type message = interface{}
|
||||
type message = any
|
||||
|
||||
// legacyMessageWrapper wraps a v2 message as a v1 message.
|
||||
type legacyMessageWrapper struct{ m protoreflect.ProtoMessage }
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/checkinit.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/checkinit.go
generated
vendored
@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error {
|
||||
}
|
||||
for _, x := range *ext {
|
||||
ei := getExtensionFieldInfo(x.Type())
|
||||
if ei.funcs.isInit == nil {
|
||||
if ei.funcs.isInit == nil || x.isUnexpandedLazy() {
|
||||
continue
|
||||
}
|
||||
v := x.Value()
|
||||
|
22
vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
generated
vendored
22
vendor/google.golang.org/protobuf/internal/impl/codec_extension.go
generated
vendored
@ -99,6 +99,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// isUnexpandedLazy returns true if the ExensionField is lazy and not
|
||||
// yet expanded, which means it's present and already checked for
|
||||
// initialized required fields.
|
||||
func (f *ExtensionField) isUnexpandedLazy() bool {
|
||||
return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0
|
||||
}
|
||||
|
||||
// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded.
|
||||
//
|
||||
// The returned buffer has to be kept over whatever operation we're planning,
|
||||
// as re-retrieving it will fail after the message is lazily decoded.
|
||||
func (f *ExtensionField) lazyBuffer() []byte {
|
||||
// This function might be in the critical path, so check the atomic without
|
||||
// taking a look first, then only take the lock if needed.
|
||||
if !f.isUnexpandedLazy() {
|
||||
return nil
|
||||
}
|
||||
f.lazy.mu.Lock()
|
||||
defer f.lazy.mu.Unlock()
|
||||
return f.lazy.b
|
||||
}
|
||||
|
||||
func (f *ExtensionField) lazyInit() {
|
||||
f.lazy.mu.Lock()
|
||||
defer f.lazy.mu.Unlock()
|
||||
|
22
vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go
generated
vendored
22
vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go
generated
vendored
@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int)
|
||||
}
|
||||
num, _ := protowire.DecodeTag(xi.wiretag)
|
||||
size += messageset.SizeField(num)
|
||||
if fullyLazyExtensions(opts) {
|
||||
// Don't expand the extension, instead use the buffer to calculate size
|
||||
if lb := x.lazyBuffer(); lb != nil {
|
||||
// We got hold of the buffer, so it's still lazy.
|
||||
// Don't count the tag size in the extension buffer, it's already added.
|
||||
size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize
|
||||
continue
|
||||
}
|
||||
}
|
||||
size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts)
|
||||
}
|
||||
|
||||
@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma
|
||||
xi := getExtensionFieldInfo(x.Type())
|
||||
num, _ := protowire.DecodeTag(xi.wiretag)
|
||||
b = messageset.AppendFieldStart(b, num)
|
||||
|
||||
if fullyLazyExtensions(opts) {
|
||||
// Don't expand the extension if it's still in wire format, instead use the buffer content.
|
||||
if lb := x.lazyBuffer(); lb != nil {
|
||||
// The tag inside the lazy buffer is a different tag (the extension
|
||||
// number), but what we need here is the tag for FieldMessage:
|
||||
b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType))
|
||||
b = append(b, lb[xi.tagsize:]...)
|
||||
b = messageset.AppendFieldEnd(b)
|
||||
return b, nil
|
||||
}
|
||||
}
|
||||
|
||||
b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts)
|
||||
if err != nil {
|
||||
return b, err
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/convert.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/convert.go
generated
vendored
@ -14,7 +14,7 @@ import (
|
||||
// unwrapper unwraps the value to the underlying value.
|
||||
// This is implemented by List and Map.
|
||||
type unwrapper interface {
|
||||
protoUnwrap() interface{}
|
||||
protoUnwrap() any
|
||||
}
|
||||
|
||||
// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types.
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/convert_list.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/convert_list.go
generated
vendored
@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value {
|
||||
func (ls *listReflect) IsValid() bool {
|
||||
return !ls.v.IsNil()
|
||||
}
|
||||
func (ls *listReflect) protoUnwrap() interface{} {
|
||||
func (ls *listReflect) protoUnwrap() any {
|
||||
return ls.v.Interface()
|
||||
}
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/convert_map.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/convert_map.go
generated
vendored
@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value {
|
||||
func (ms *mapReflect) IsValid() bool {
|
||||
return !ms.v.IsNil()
|
||||
}
|
||||
func (ms *mapReflect) protoUnwrap() interface{} {
|
||||
func (ms *mapReflect) protoUnwrap() any {
|
||||
return ms.v.Interface()
|
||||
}
|
||||
|
48
vendor/google.golang.org/protobuf/internal/impl/encode.go
generated
vendored
48
vendor/google.golang.org/protobuf/internal/impl/encode.go
generated
vendored
@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) {
|
||||
return 0
|
||||
}
|
||||
if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() {
|
||||
if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 {
|
||||
return int(size)
|
||||
// The size cache contains the size + 1, to allow the
|
||||
// zero value to be invalid, while also allowing for a
|
||||
// 0 size to be cached.
|
||||
if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 {
|
||||
return int(size - 1)
|
||||
}
|
||||
}
|
||||
return mi.sizePointerSlow(p, opts)
|
||||
@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int
|
||||
if flags.ProtoLegacy && mi.isMessageSet {
|
||||
size = sizeMessageSet(mi, p, opts)
|
||||
if mi.sizecacheOffset.IsValid() {
|
||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size))
|
||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))
|
||||
}
|
||||
return size
|
||||
}
|
||||
@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int
|
||||
}
|
||||
}
|
||||
if mi.sizecacheOffset.IsValid() {
|
||||
if size > math.MaxInt32 {
|
||||
if size > (math.MaxInt32 - 1) {
|
||||
// The size is too large for the int32 sizecache field.
|
||||
// We will need to recompute the size when encoding;
|
||||
// unfortunately expensive, but better than invalid output.
|
||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1)
|
||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0)
|
||||
} else {
|
||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size))
|
||||
// The size cache contains the size + 1, to allow the
|
||||
// zero value to be invalid, while also allowing for a
|
||||
// 0 size to be cached.
|
||||
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))
|
||||
}
|
||||
}
|
||||
return size
|
||||
@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal.
|
||||
func fullyLazyExtensions(opts marshalOptions) bool {
|
||||
// When deterministic marshaling is requested, force an unmarshal for lazy
|
||||
// extensions to produce a deterministic result, instead of passing through
|
||||
// bytes lazily that may or may not match what Go Protobuf would produce.
|
||||
return opts.flags&piface.MarshalDeterministic == 0
|
||||
}
|
||||
|
||||
func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) {
|
||||
if ext == nil {
|
||||
return 0
|
||||
@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha
|
||||
if xi.funcs.size == nil {
|
||||
continue
|
||||
}
|
||||
if fullyLazyExtensions(opts) {
|
||||
// Don't expand the extension, instead use the buffer to calculate size
|
||||
if lb := x.lazyBuffer(); lb != nil {
|
||||
// We got hold of the buffer, so it's still lazy.
|
||||
n += len(lb)
|
||||
continue
|
||||
}
|
||||
}
|
||||
n += xi.funcs.size(x.Value(), xi.tagsize, opts)
|
||||
}
|
||||
return n
|
||||
@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField,
|
||||
var err error
|
||||
for _, x := range *ext {
|
||||
xi := getExtensionFieldInfo(x.Type())
|
||||
if fullyLazyExtensions(opts) {
|
||||
// Don't expand the extension if it's still in wire format, instead use the buffer content.
|
||||
if lb := x.lazyBuffer(); lb != nil {
|
||||
b = append(b, lb...)
|
||||
continue
|
||||
}
|
||||
}
|
||||
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
|
||||
}
|
||||
return b, err
|
||||
@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField,
|
||||
for _, k := range keys {
|
||||
x := (*ext)[int32(k)]
|
||||
xi := getExtensionFieldInfo(x.Type())
|
||||
if fullyLazyExtensions(opts) {
|
||||
// Don't expand the extension if it's still in wire format, instead use the buffer content.
|
||||
if lb := x.lazyBuffer(); lb != nil {
|
||||
b = append(b, lb...)
|
||||
continue
|
||||
}
|
||||
}
|
||||
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
|
||||
if err != nil {
|
||||
return b, err
|
||||
|
8
vendor/google.golang.org/protobuf/internal/impl/extension.go
generated
vendored
8
vendor/google.golang.org/protobuf/internal/impl/extension.go
generated
vendored
@ -53,7 +53,7 @@ type ExtensionInfo struct {
|
||||
// type returned by InterfaceOf may not be identical.
|
||||
//
|
||||
// Deprecated: Use InterfaceOf(xt.Zero()) instead.
|
||||
ExtensionType interface{}
|
||||
ExtensionType any
|
||||
|
||||
// Field is the field number of the extension.
|
||||
//
|
||||
@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value {
|
||||
func (xi *ExtensionInfo) Zero() protoreflect.Value {
|
||||
return xi.lazyInit().Zero()
|
||||
}
|
||||
func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value {
|
||||
func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value {
|
||||
return xi.lazyInit().PBValueOf(reflect.ValueOf(v))
|
||||
}
|
||||
func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} {
|
||||
func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any {
|
||||
return xi.lazyInit().GoValueOf(v).Interface()
|
||||
}
|
||||
func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool {
|
||||
return xi.lazyInit().IsValidPB(v)
|
||||
}
|
||||
func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool {
|
||||
func (xi *ExtensionInfo) IsValidInterface(v any) bool {
|
||||
return xi.lazyInit().IsValidGo(reflect.ValueOf(v))
|
||||
}
|
||||
func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {
|
||||
|
2
vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go
generated
vendored
@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber {
|
||||
func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum {
|
||||
return e
|
||||
}
|
||||
func (e *legacyEnumWrapper) protoUnwrap() interface{} {
|
||||
func (e *legacyEnumWrapper) protoUnwrap() any {
|
||||
v := reflect.New(e.goTyp).Elem()
|
||||
v.SetInt(int64(e.num))
|
||||
return v.Interface()
|
||||
|
4
vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/impl/legacy_message.go
generated
vendored
@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName
|
||||
}
|
||||
for _, fn := range methods {
|
||||
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
|
||||
if vs, ok := v.Interface().([]interface{}); ok {
|
||||
if vs, ok := v.Interface().([]any); ok {
|
||||
for _, v := range vs {
|
||||
oneofWrappers = append(oneofWrappers, reflect.TypeOf(v))
|
||||
}
|
||||
@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool {
|
||||
func (m aberrantMessage) ProtoMethods() *protoiface.Methods {
|
||||
return aberrantProtoMethods
|
||||
}
|
||||
func (m aberrantMessage) protoUnwrap() interface{} {
|
||||
func (m aberrantMessage) protoUnwrap() any {
|
||||
return m.v.Interface()
|
||||
}
|
||||
|
8
vendor/google.golang.org/protobuf/internal/impl/message.go
generated
vendored
8
vendor/google.golang.org/protobuf/internal/impl/message.go
generated
vendored
@ -35,7 +35,7 @@ type MessageInfo struct {
|
||||
Exporter exporter
|
||||
|
||||
// OneofWrappers is list of pointers to oneof wrapper struct types.
|
||||
OneofWrappers []interface{}
|
||||
OneofWrappers []any
|
||||
|
||||
initMu sync.Mutex // protects all unexported fields
|
||||
initDone uint32
|
||||
@ -47,7 +47,7 @@ type MessageInfo struct {
|
||||
// exporter is a function that returns a reference to the ith field of v,
|
||||
// where v is a pointer to a struct. It returns nil if it does not support
|
||||
// exporting the requested field (e.g., already exported).
|
||||
type exporter func(v interface{}, i int) interface{}
|
||||
type exporter func(v any, i int) any
|
||||
|
||||
// getMessageInfo returns the MessageInfo for any message type that
|
||||
// is generated by our implementation of protoc-gen-go (for v2 and on).
|
||||
@ -201,7 +201,7 @@ fieldLoop:
|
||||
}
|
||||
for _, fn := range methods {
|
||||
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
|
||||
if vs, ok := v.Interface().([]interface{}); ok {
|
||||
if vs, ok := v.Interface().([]any); ok {
|
||||
oneofWrappers = vs
|
||||
}
|
||||
}
|
||||
@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType {
|
||||
|
||||
type mapEntryType struct {
|
||||
desc protoreflect.MessageDescriptor
|
||||
valType interface{} // zero value of enum or message type
|
||||
valType any // zero value of enum or message type
|
||||
}
|
||||
|
||||
func (mt mapEntryType) New() protoreflect.Message {
|
||||
|
14
vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
generated
vendored
14
vendor/google.golang.org/protobuf/internal/impl/message_reflect.go
generated
vendored
@ -20,7 +20,7 @@ type reflectMessageInfo struct {
|
||||
// fieldTypes contains the zero value of an enum or message field.
|
||||
// For lists, it contains the element type.
|
||||
// For maps, it contains the entry value type.
|
||||
fieldTypes map[protoreflect.FieldNumber]interface{}
|
||||
fieldTypes map[protoreflect.FieldNumber]any
|
||||
|
||||
// denseFields is a subset of fields where:
|
||||
// 0 < fieldDesc.Number() < len(denseFields)
|
||||
@ -28,7 +28,7 @@ type reflectMessageInfo struct {
|
||||
denseFields []*fieldInfo
|
||||
|
||||
// rangeInfos is a list of all fields (not belonging to a oneof) and oneofs.
|
||||
rangeInfos []interface{} // either *fieldInfo or *oneofInfo
|
||||
rangeInfos []any // either *fieldInfo or *oneofInfo
|
||||
|
||||
getUnknown func(pointer) protoreflect.RawFields
|
||||
setUnknown func(pointer, protoreflect.RawFields)
|
||||
@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) {
|
||||
}
|
||||
if ft != nil {
|
||||
if mi.fieldTypes == nil {
|
||||
mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{})
|
||||
mi.fieldTypes = make(map[protoreflect.FieldNumber]any)
|
||||
}
|
||||
mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface()
|
||||
}
|
||||
@ -255,6 +255,10 @@ func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) {
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if x.isUnexpandedLazy() {
|
||||
// Avoid calling x.Value(), which triggers a lazy unmarshal.
|
||||
return true
|
||||
}
|
||||
switch {
|
||||
case xd.IsList():
|
||||
return x.Value().List().Len() > 0
|
||||
@ -389,7 +393,7 @@ var (
|
||||
// MessageOf returns a reflective view over a message. The input must be a
|
||||
// pointer to a named Go struct. If the provided type has a ProtoReflect method,
|
||||
// it must be implemented by calling this method.
|
||||
func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message {
|
||||
func (mi *MessageInfo) MessageOf(m any) protoreflect.Message {
|
||||
if reflect.TypeOf(m) != mi.GoReflectType {
|
||||
panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType))
|
||||
}
|
||||
@ -417,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() {
|
||||
func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message {
|
||||
return (*messageReflectWrapper)(m)
|
||||
}
|
||||
func (m *messageIfaceWrapper) protoUnwrap() interface{} {
|
||||
func (m *messageIfaceWrapper) protoUnwrap() any {
|
||||
return m.p.AsIfaceOf(m.mi.GoReflectType.Elem())
|
||||
}
|
||||
|
||||
|
4
vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go
generated
vendored
@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message {
|
||||
func (m *messageState) Interface() protoreflect.ProtoMessage {
|
||||
return m.protoUnwrap().(protoreflect.ProtoMessage)
|
||||
}
|
||||
func (m *messageState) protoUnwrap() interface{} {
|
||||
func (m *messageState) protoUnwrap() any {
|
||||
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
|
||||
}
|
||||
func (m *messageState) ProtoMethods() *protoiface.Methods {
|
||||
@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage {
|
||||
}
|
||||
return (*messageIfaceWrapper)(m)
|
||||
}
|
||||
func (m *messageReflectWrapper) protoUnwrap() interface{} {
|
||||
func (m *messageReflectWrapper) protoUnwrap() any {
|
||||
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
|
||||
}
|
||||
func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods {
|
||||
|
6
vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
generated
vendored
6
vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
generated
vendored
@ -16,7 +16,7 @@ import (
|
||||
const UnsafeEnabled = false
|
||||
|
||||
// Pointer is an opaque pointer type.
|
||||
type Pointer interface{}
|
||||
type Pointer any
|
||||
|
||||
// offset represents the offset to a struct field, accessible from a pointer.
|
||||
// The offset is the field index into a struct.
|
||||
@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer {
|
||||
}
|
||||
|
||||
// pointerOfIface returns the pointer portion of an interface.
|
||||
func pointerOfIface(v interface{}) pointer {
|
||||
func pointerOfIface(v any) pointer {
|
||||
return pointer{v: reflect.ValueOf(v)}
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
|
||||
|
||||
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
||||
// It is equivalent to p.AsValueOf(t).Interface()
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) interface{} {
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) any {
|
||||
return p.AsValueOf(t).Interface()
|
||||
}
|
||||
|
||||
|
4
vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
generated
vendored
@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer {
|
||||
}
|
||||
|
||||
// pointerOfIface returns the pointer portion of an interface.
|
||||
func pointerOfIface(v interface{}) pointer {
|
||||
func pointerOfIface(v any) pointer {
|
||||
type ifaceHeader struct {
|
||||
Type unsafe.Pointer
|
||||
Data unsafe.Pointer
|
||||
@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
|
||||
|
||||
// AsIfaceOf treats p as a pointer to an object of type t and returns the value.
|
||||
// It is equivalent to p.AsValueOf(t).Interface()
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) interface{} {
|
||||
func (p pointer) AsIfaceOf(t reflect.Type) any {
|
||||
// TODO: Use tricky unsafe magic to directly create ifaceHeader.
|
||||
return p.AsValueOf(t).Interface()
|
||||
}
|
||||
|
4
vendor/google.golang.org/protobuf/internal/order/range.go
generated
vendored
4
vendor/google.golang.org/protobuf/internal/order/range.go
generated
vendored
@ -18,7 +18,7 @@ type messageField struct {
|
||||
}
|
||||
|
||||
var messageFieldPool = sync.Pool{
|
||||
New: func() interface{} { return new([]messageField) },
|
||||
New: func() any { return new([]messageField) },
|
||||
}
|
||||
|
||||
type (
|
||||
@ -69,7 +69,7 @@ type mapEntry struct {
|
||||
}
|
||||
|
||||
var mapEntryPool = sync.Pool{
|
||||
New: func() interface{} { return new([]mapEntry) },
|
||||
New: func() any { return new([]mapEntry) },
|
||||
}
|
||||
|
||||
type (
|
||||
|
2
vendor/google.golang.org/protobuf/internal/version/version.go
generated
vendored
2
vendor/google.golang.org/protobuf/internal/version/version.go
generated
vendored
@ -52,7 +52,7 @@ import (
|
||||
const (
|
||||
Major = 1
|
||||
Minor = 34
|
||||
Patch = 1
|
||||
Patch = 2
|
||||
PreRelease = ""
|
||||
)
|
||||
|
||||
|
6
vendor/google.golang.org/protobuf/proto/extension.go
generated
vendored
6
vendor/google.golang.org/protobuf/proto/extension.go
generated
vendored
@ -39,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) {
|
||||
// If the field is unpopulated, it returns the default value for
|
||||
// scalars and an immutable, empty value for lists or messages.
|
||||
// It panics if xt does not extend m.
|
||||
func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} {
|
||||
func GetExtension(m Message, xt protoreflect.ExtensionType) any {
|
||||
// Treat nil message interface as an empty message; return the default.
|
||||
if m == nil {
|
||||
return xt.InterfaceOf(xt.Zero())
|
||||
@ -51,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} {
|
||||
// SetExtension stores the value of an extension field.
|
||||
// It panics if m is invalid, xt does not extend m, or if type of v
|
||||
// is invalid for the specified extension field.
|
||||
func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) {
|
||||
func SetExtension(m Message, xt protoreflect.ExtensionType, v any) {
|
||||
xd := xt.TypeDescriptor()
|
||||
pv := xt.ValueOf(v)
|
||||
|
||||
@ -78,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) {
|
||||
// It returns immediately if f returns false.
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current extension field.
|
||||
func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) {
|
||||
func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) {
|
||||
// Treat nil message interface as an empty message; nothing to range over.
|
||||
if m == nil {
|
||||
return
|
||||
|
5
vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
generated
vendored
5
vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go
generated
vendored
@ -46,6 +46,11 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc
|
||||
if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil {
|
||||
return errors.New("message field %q cannot resolve type: %v", f.FullName(), err)
|
||||
}
|
||||
if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) {
|
||||
// A map field might inherit delimited encoding from a file-wide default feature.
|
||||
// But maps never actually use delimited encoding. (At least for now...)
|
||||
f.L1.Kind = protoreflect.MessageKind
|
||||
}
|
||||
if fd.DefaultValue != nil {
|
||||
v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable)
|
||||
if err != nil {
|
||||
|
12
vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
generated
vendored
12
vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go
generated
vendored
@ -116,18 +116,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds
|
||||
if m.ExtensionRanges().Len() > 0 {
|
||||
return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName())
|
||||
}
|
||||
// Verify that field names in proto3 do not conflict if lowercased
|
||||
// with all underscores removed.
|
||||
// See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847
|
||||
names := map[string]protoreflect.FieldDescriptor{}
|
||||
for i := 0; i < m.Fields().Len(); i++ {
|
||||
f1 := m.Fields().Get(i)
|
||||
s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1)
|
||||
if f2, ok := names[s]; ok {
|
||||
return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name())
|
||||
}
|
||||
names[s] = f1
|
||||
}
|
||||
}
|
||||
|
||||
for j, fd := range md.GetField() {
|
||||
|
2
vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
generated
vendored
2
vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
generated
vendored
@ -485,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte {
|
||||
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
|
||||
case 3:
|
||||
b = p.appendSingularField(b, "debug_redact", nil)
|
||||
case 4:
|
||||
b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport)
|
||||
case 999:
|
||||
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
|
||||
}
|
||||
|
6
vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
generated
vendored
6
vendor/google.golang.org/protobuf/reflect/protoreflect/type.go
generated
vendored
@ -510,7 +510,7 @@ type ExtensionType interface {
|
||||
//
|
||||
// ValueOf is more extensive than protoreflect.ValueOf for a given field's
|
||||
// value as it has more type information available.
|
||||
ValueOf(interface{}) Value
|
||||
ValueOf(any) Value
|
||||
|
||||
// InterfaceOf completely unwraps the Value to the underlying Go type.
|
||||
// InterfaceOf panics if the input is nil or does not represent the
|
||||
@ -519,13 +519,13 @@ type ExtensionType interface {
|
||||
//
|
||||
// InterfaceOf is able to unwrap the Value further than Value.Interface
|
||||
// as it has more type information available.
|
||||
InterfaceOf(Value) interface{}
|
||||
InterfaceOf(Value) any
|
||||
|
||||
// IsValidValue reports whether the Value is valid to assign to the field.
|
||||
IsValidValue(Value) bool
|
||||
|
||||
// IsValidInterface reports whether the input is valid to assign to the field.
|
||||
IsValidInterface(interface{}) bool
|
||||
IsValidInterface(any) bool
|
||||
}
|
||||
|
||||
// EnumDescriptor describes an enum and
|
||||
|
6
vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
generated
vendored
6
vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
generated
vendored
@ -36,7 +36,7 @@ type value struct {
|
||||
num uint64 // 8B
|
||||
str string // 16B
|
||||
bin []byte // 24B
|
||||
iface interface{} // 16B
|
||||
iface any // 16B
|
||||
}
|
||||
|
||||
func valueOfString(v string) Value {
|
||||
@ -45,7 +45,7 @@ func valueOfString(v string) Value {
|
||||
func valueOfBytes(v []byte) Value {
|
||||
return Value{typ: bytesType, bin: v}
|
||||
}
|
||||
func valueOfIface(v interface{}) Value {
|
||||
func valueOfIface(v any) Value {
|
||||
return Value{typ: ifaceType, iface: v}
|
||||
}
|
||||
|
||||
@ -55,6 +55,6 @@ func (v Value) getString() string {
|
||||
func (v Value) getBytes() []byte {
|
||||
return v.bin
|
||||
}
|
||||
func (v Value) getIface() interface{} {
|
||||
func (v Value) getIface() any {
|
||||
return v.iface
|
||||
}
|
||||
|
14
vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
generated
vendored
14
vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
generated
vendored
@ -69,8 +69,8 @@ import (
|
||||
// composite Value. Modifying an empty, read-only value panics.
|
||||
type Value value
|
||||
|
||||
// The protoreflect API uses a custom Value union type instead of interface{}
|
||||
// to keep the future open for performance optimizations. Using an interface{}
|
||||
// The protoreflect API uses a custom Value union type instead of any
|
||||
// to keep the future open for performance optimizations. Using an any
|
||||
// always incurs an allocation for primitives (e.g., int64) since it needs to
|
||||
// be boxed on the heap (as interfaces can only contain pointers natively).
|
||||
// Instead, we represent the Value union as a flat struct that internally keeps
|
||||
@ -85,7 +85,7 @@ type Value value
|
||||
// ValueOf returns a Value initialized with the concrete value stored in v.
|
||||
// This panics if the type does not match one of the allowed types in the
|
||||
// Value union.
|
||||
func ValueOf(v interface{}) Value {
|
||||
func ValueOf(v any) Value {
|
||||
switch v := v.(type) {
|
||||
case nil:
|
||||
return Value{}
|
||||
@ -192,10 +192,10 @@ func (v Value) IsValid() bool {
|
||||
return v.typ != nilType
|
||||
}
|
||||
|
||||
// Interface returns v as an interface{}.
|
||||
// Interface returns v as an any.
|
||||
//
|
||||
// Invariant: v == ValueOf(v).Interface()
|
||||
func (v Value) Interface() interface{} {
|
||||
func (v Value) Interface() any {
|
||||
switch v.typ {
|
||||
case nilType:
|
||||
return nil
|
||||
@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool {
|
||||
return Value(k).IsValid()
|
||||
}
|
||||
|
||||
// Interface returns k as an interface{}.
|
||||
func (k MapKey) Interface() interface{} {
|
||||
// Interface returns k as an any.
|
||||
func (k MapKey) Interface() any {
|
||||
return Value(k).Interface()
|
||||
}
|
||||
|
||||
|
6
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
generated
vendored
6
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go
generated
vendored
@ -45,7 +45,7 @@ var (
|
||||
|
||||
// typeOf returns a pointer to the Go type information.
|
||||
// The pointer is comparable and equal if and only if the types are identical.
|
||||
func typeOf(t interface{}) unsafe.Pointer {
|
||||
func typeOf(t any) unsafe.Pointer {
|
||||
return (*ifaceHeader)(unsafe.Pointer(&t)).Type
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value {
|
||||
p := (*sliceHeader)(unsafe.Pointer(&v))
|
||||
return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))}
|
||||
}
|
||||
func valueOfIface(v interface{}) Value {
|
||||
func valueOfIface(v any) Value {
|
||||
p := (*ifaceHeader)(unsafe.Pointer(&v))
|
||||
return Value{typ: p.Type, ptr: p.Data}
|
||||
}
|
||||
@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) {
|
||||
*(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)}
|
||||
return x
|
||||
}
|
||||
func (v Value) getIface() (x interface{}) {
|
||||
func (v Value) getIface() (x any) {
|
||||
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
|
||||
return x
|
||||
}
|
||||
|
8
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go
generated
vendored
8
vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go
generated
vendored
@ -15,7 +15,7 @@ import (
|
||||
|
||||
type (
|
||||
ifaceHeader struct {
|
||||
_ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.
|
||||
_ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.
|
||||
Type unsafe.Pointer
|
||||
Data unsafe.Pointer
|
||||
}
|
||||
@ -37,7 +37,7 @@ var (
|
||||
|
||||
// typeOf returns a pointer to the Go type information.
|
||||
// The pointer is comparable and equal if and only if the types are identical.
|
||||
func typeOf(t interface{}) unsafe.Pointer {
|
||||
func typeOf(t any) unsafe.Pointer {
|
||||
return (*ifaceHeader)(unsafe.Pointer(&t)).Type
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ func valueOfString(v string) Value {
|
||||
func valueOfBytes(v []byte) Value {
|
||||
return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))}
|
||||
}
|
||||
func valueOfIface(v interface{}) Value {
|
||||
func valueOfIface(v any) Value {
|
||||
p := (*ifaceHeader)(unsafe.Pointer(&v))
|
||||
return Value{typ: p.Type, ptr: p.Data}
|
||||
}
|
||||
@ -81,7 +81,7 @@ func (v Value) getString() string {
|
||||
func (v Value) getBytes() []byte {
|
||||
return unsafe.Slice((*byte)(v.ptr), v.num)
|
||||
}
|
||||
func (v Value) getIface() (x interface{}) {
|
||||
func (v Value) getIface() (x any) {
|
||||
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
|
||||
return x
|
||||
}
|
||||
|
14
vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
generated
vendored
14
vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go
generated
vendored
@ -95,7 +95,7 @@ type Files struct {
|
||||
// multiple files. Only top-level declarations are registered.
|
||||
// Note that enum values are in the top-level since that are in the same
|
||||
// scope as the parent enum.
|
||||
descsByName map[protoreflect.FullName]interface{}
|
||||
descsByName map[protoreflect.FullName]any
|
||||
filesByPath map[string][]protoreflect.FileDescriptor
|
||||
numFiles int
|
||||
}
|
||||
@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {
|
||||
defer globalMutex.Unlock()
|
||||
}
|
||||
if r.descsByName == nil {
|
||||
r.descsByName = map[protoreflect.FullName]interface{}{
|
||||
r.descsByName = map[protoreflect.FullName]any{
|
||||
"": &packageDescriptor{},
|
||||
}
|
||||
r.filesByPath = make(map[string][]protoreflect.FileDescriptor)
|
||||
@ -485,7 +485,7 @@ type Types struct {
|
||||
}
|
||||
|
||||
type (
|
||||
typesByName map[protoreflect.FullName]interface{}
|
||||
typesByName map[protoreflect.FullName]any
|
||||
extensionsByMessage map[protoreflect.FullName]extensionsByNumber
|
||||
extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType
|
||||
)
|
||||
@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error {
|
||||
func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error {
|
||||
name := desc.FullName()
|
||||
prev := r.typesByName[name]
|
||||
if prev != nil {
|
||||
@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p
|
||||
}
|
||||
}
|
||||
|
||||
func typeName(t interface{}) string {
|
||||
func typeName(t any) string {
|
||||
switch t.(type) {
|
||||
case protoreflect.EnumType:
|
||||
return "enum"
|
||||
@ -854,7 +854,7 @@ func typeName(t interface{}) string {
|
||||
}
|
||||
}
|
||||
|
||||
func amendErrorWithCaller(err error, prev, curr interface{}) error {
|
||||
func amendErrorWithCaller(err error, prev, curr any) error {
|
||||
prevPkg := goPackage(prev)
|
||||
currPkg := goPackage(curr)
|
||||
if prevPkg == "" || currPkg == "" || prevPkg == currPkg {
|
||||
@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error {
|
||||
return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg)
|
||||
}
|
||||
|
||||
func goPackage(v interface{}) string {
|
||||
func goPackage(v any) string {
|
||||
switch d := v.(type) {
|
||||
case protoreflect.EnumType:
|
||||
v = d.Descriptor()
|
||||
|
995
vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
generated
vendored
995
vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
16
vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go
generated
vendored
16
vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go
generated
vendored
@ -294,7 +294,7 @@ func (m *Message) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
case fd.IsMap():
|
||||
return protoreflect.ValueOfMap(&dynamicMap{
|
||||
desc: fd,
|
||||
mapv: make(map[interface{}]protoreflect.Value),
|
||||
mapv: make(map[any]protoreflect.Value),
|
||||
})
|
||||
case fd.IsList():
|
||||
return protoreflect.ValueOfList(&dynamicList{desc: fd})
|
||||
@ -450,7 +450,7 @@ func (x *dynamicList) IsValid() bool {
|
||||
|
||||
type dynamicMap struct {
|
||||
desc protoreflect.FieldDescriptor
|
||||
mapv map[interface{}]protoreflect.Value
|
||||
mapv map[any]protoreflect.Value
|
||||
}
|
||||
|
||||
func (x *dynamicMap) Get(k protoreflect.MapKey) protoreflect.Value { return x.mapv[k.Interface()] }
|
||||
@ -634,11 +634,11 @@ func newListEntry(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
//
|
||||
// The InterfaceOf and ValueOf methods of the extension type are defined as:
|
||||
//
|
||||
// func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value {
|
||||
// func (xt extensionType) ValueOf(iv any) protoreflect.Value {
|
||||
// return protoreflect.ValueOf(iv)
|
||||
// }
|
||||
//
|
||||
// func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} {
|
||||
// func (xt extensionType) InterfaceOf(v protoreflect.Value) any {
|
||||
// return v.Interface()
|
||||
// }
|
||||
//
|
||||
@ -658,7 +658,7 @@ func (xt extensionType) New() protoreflect.Value {
|
||||
case xt.desc.IsMap():
|
||||
return protoreflect.ValueOfMap(&dynamicMap{
|
||||
desc: xt.desc,
|
||||
mapv: make(map[interface{}]protoreflect.Value),
|
||||
mapv: make(map[any]protoreflect.Value),
|
||||
})
|
||||
case xt.desc.IsList():
|
||||
return protoreflect.ValueOfList(&dynamicList{desc: xt.desc})
|
||||
@ -686,18 +686,18 @@ func (xt extensionType) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {
|
||||
return xt.desc
|
||||
}
|
||||
|
||||
func (xt extensionType) ValueOf(iv interface{}) protoreflect.Value {
|
||||
func (xt extensionType) ValueOf(iv any) protoreflect.Value {
|
||||
v := protoreflect.ValueOf(iv)
|
||||
typecheck(xt.desc, v)
|
||||
return v
|
||||
}
|
||||
|
||||
func (xt extensionType) InterfaceOf(v protoreflect.Value) interface{} {
|
||||
func (xt extensionType) InterfaceOf(v protoreflect.Value) any {
|
||||
typecheck(xt.desc, v)
|
||||
return v.Interface()
|
||||
}
|
||||
|
||||
func (xt extensionType) IsValidInterface(iv interface{}) bool {
|
||||
func (xt extensionType) IsValidInterface(iv any) bool {
|
||||
return typeIsValid(xt.desc, protoreflect.ValueOf(iv)) == nil
|
||||
}
|
||||
|
||||
|
44
vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
generated
vendored
44
vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go
generated
vendored
@ -90,27 +90,27 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{
|
||||
0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x0a, 0x47, 0x6f,
|
||||
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xba, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67,
|
||||
0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f,
|
||||
0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67,
|
||||
0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73,
|
||||
0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x7d, 0x88,
|
||||
0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x18, 0x84,
|
||||
0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, 0x07, 0xb2, 0x01,
|
||||
0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x67,
|
||||
0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x53, 0x4f,
|
||||
0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
|
||||
0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20,
|
||||
0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74,
|
||||
0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x17, 0x6c, 0x65,
|
||||
0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x73, 0x6f,
|
||||
0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52,
|
||||
0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f,
|
||||
0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x73, 0x70, 0x62,
|
||||
0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01,
|
||||
0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72,
|
||||
0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18,
|
||||
0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65,
|
||||
0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61,
|
||||
0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70,
|
||||
0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c,
|
||||
0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61,
|
||||
0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61,
|
||||
0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12,
|
||||
0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75,
|
||||
0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65,
|
||||
0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -126,7 +126,7 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_google_protobuf_go_features_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_go_features_proto_goTypes = []any{
|
||||
(*GoFeatures)(nil), // 0: pb.GoFeatures
|
||||
(*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet
|
||||
}
|
||||
@ -146,7 +146,7 @@ func file_google_protobuf_go_features_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*GoFeatures); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
4
vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
generated
vendored
4
vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
generated
vendored
@ -445,7 +445,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_google_protobuf_any_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_any_proto_goTypes = []any{
|
||||
(*Any)(nil), // 0: google.protobuf.Any
|
||||
}
|
||||
var file_google_protobuf_any_proto_depIdxs = []int32{
|
||||
@ -462,7 +462,7 @@ func file_google_protobuf_any_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Any); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
4
vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
generated
vendored
4
vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
generated
vendored
@ -323,7 +323,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_google_protobuf_duration_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_duration_proto_goTypes = []any{
|
||||
(*Duration)(nil), // 0: google.protobuf.Duration
|
||||
}
|
||||
var file_google_protobuf_duration_proto_depIdxs = []int32{
|
||||
@ -340,7 +340,7 @@ func file_google_protobuf_duration_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Duration); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
4
vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go
generated
vendored
4
vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go
generated
vendored
@ -115,7 +115,7 @@ func file_google_protobuf_empty_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_empty_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_google_protobuf_empty_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_empty_proto_goTypes = []any{
|
||||
(*Empty)(nil), // 0: google.protobuf.Empty
|
||||
}
|
||||
var file_google_protobuf_empty_proto_depIdxs = []int32{
|
||||
@ -132,7 +132,7 @@ func file_google_protobuf_empty_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Empty); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
4
vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
generated
vendored
4
vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go
generated
vendored
@ -537,7 +537,7 @@ func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_google_protobuf_field_mask_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_field_mask_proto_goTypes = []any{
|
||||
(*FieldMask)(nil), // 0: google.protobuf.FieldMask
|
||||
}
|
||||
var file_google_protobuf_field_mask_proto_depIdxs = []int32{
|
||||
@ -554,7 +554,7 @@ func file_google_protobuf_field_mask_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*FieldMask); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
50
vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
generated
vendored
50
vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go
generated
vendored
@ -49,11 +49,11 @@
|
||||
// The standard Go "encoding/json" package has functionality to serialize
|
||||
// arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and
|
||||
// ListValue.AsSlice methods can convert the protobuf message representation into
|
||||
// a form represented by interface{}, map[string]interface{}, and []interface{}.
|
||||
// a form represented by any, map[string]any, and []any.
|
||||
// This form can be used with other packages that operate on such data structures
|
||||
// and also directly with the standard json package.
|
||||
//
|
||||
// In order to convert the interface{}, map[string]interface{}, and []interface{}
|
||||
// In order to convert the any, map[string]any, and []any
|
||||
// forms back as Value, Struct, and ListValue messages, use the NewStruct,
|
||||
// NewList, and NewValue constructor functions.
|
||||
//
|
||||
@ -88,28 +88,28 @@
|
||||
//
|
||||
// To construct a Value message representing the above JSON object:
|
||||
//
|
||||
// m, err := structpb.NewValue(map[string]interface{}{
|
||||
// m, err := structpb.NewValue(map[string]any{
|
||||
// "firstName": "John",
|
||||
// "lastName": "Smith",
|
||||
// "isAlive": true,
|
||||
// "age": 27,
|
||||
// "address": map[string]interface{}{
|
||||
// "address": map[string]any{
|
||||
// "streetAddress": "21 2nd Street",
|
||||
// "city": "New York",
|
||||
// "state": "NY",
|
||||
// "postalCode": "10021-3100",
|
||||
// },
|
||||
// "phoneNumbers": []interface{}{
|
||||
// map[string]interface{}{
|
||||
// "phoneNumbers": []any{
|
||||
// map[string]any{
|
||||
// "type": "home",
|
||||
// "number": "212 555-1234",
|
||||
// },
|
||||
// map[string]interface{}{
|
||||
// map[string]any{
|
||||
// "type": "office",
|
||||
// "number": "646 555-4567",
|
||||
// },
|
||||
// },
|
||||
// "children": []interface{}{},
|
||||
// "children": []any{},
|
||||
// "spouse": nil,
|
||||
// })
|
||||
// if err != nil {
|
||||
@ -197,7 +197,7 @@ type Struct struct {
|
||||
// NewStruct constructs a Struct from a general-purpose Go map.
|
||||
// The map keys must be valid UTF-8.
|
||||
// The map values are converted using NewValue.
|
||||
func NewStruct(v map[string]interface{}) (*Struct, error) {
|
||||
func NewStruct(v map[string]any) (*Struct, error) {
|
||||
x := &Struct{Fields: make(map[string]*Value, len(v))}
|
||||
for k, v := range v {
|
||||
if !utf8.ValidString(k) {
|
||||
@ -214,9 +214,9 @@ func NewStruct(v map[string]interface{}) (*Struct, error) {
|
||||
|
||||
// AsMap converts x to a general-purpose Go map.
|
||||
// The map values are converted by calling Value.AsInterface.
|
||||
func (x *Struct) AsMap() map[string]interface{} {
|
||||
func (x *Struct) AsMap() map[string]any {
|
||||
f := x.GetFields()
|
||||
vs := make(map[string]interface{}, len(f))
|
||||
vs := make(map[string]any, len(f))
|
||||
for k, v := range f {
|
||||
vs[k] = v.AsInterface()
|
||||
}
|
||||
@ -306,13 +306,13 @@ type Value struct {
|
||||
// ║ float32, float64 │ stored as NumberValue ║
|
||||
// ║ string │ stored as StringValue; must be valid UTF-8 ║
|
||||
// ║ []byte │ stored as StringValue; base64-encoded ║
|
||||
// ║ map[string]interface{} │ stored as StructValue ║
|
||||
// ║ []interface{} │ stored as ListValue ║
|
||||
// ║ map[string]any │ stored as StructValue ║
|
||||
// ║ []any │ stored as ListValue ║
|
||||
// ╚════════════════════════╧════════════════════════════════════════════╝
|
||||
//
|
||||
// When converting an int64 or uint64 to a NumberValue, numeric precision loss
|
||||
// is possible since they are stored as a float64.
|
||||
func NewValue(v interface{}) (*Value, error) {
|
||||
func NewValue(v any) (*Value, error) {
|
||||
switch v := v.(type) {
|
||||
case nil:
|
||||
return NewNullValue(), nil
|
||||
@ -342,13 +342,13 @@ func NewValue(v interface{}) (*Value, error) {
|
||||
case []byte:
|
||||
s := base64.StdEncoding.EncodeToString(v)
|
||||
return NewStringValue(s), nil
|
||||
case map[string]interface{}:
|
||||
case map[string]any:
|
||||
v2, err := NewStruct(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewStructValue(v2), nil
|
||||
case []interface{}:
|
||||
case []any:
|
||||
v2, err := NewList(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -396,7 +396,7 @@ func NewListValue(v *ListValue) *Value {
|
||||
//
|
||||
// Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are
|
||||
// converted as strings to remain compatible with MarshalJSON.
|
||||
func (x *Value) AsInterface() interface{} {
|
||||
func (x *Value) AsInterface() any {
|
||||
switch v := x.GetKind().(type) {
|
||||
case *Value_NumberValue:
|
||||
if v != nil {
|
||||
@ -580,7 +580,7 @@ type ListValue struct {
|
||||
|
||||
// NewList constructs a ListValue from a general-purpose Go slice.
|
||||
// The slice elements are converted using NewValue.
|
||||
func NewList(v []interface{}) (*ListValue, error) {
|
||||
func NewList(v []any) (*ListValue, error) {
|
||||
x := &ListValue{Values: make([]*Value, len(v))}
|
||||
for i, v := range v {
|
||||
var err error
|
||||
@ -594,9 +594,9 @@ func NewList(v []interface{}) (*ListValue, error) {
|
||||
|
||||
// AsSlice converts x to a general-purpose Go slice.
|
||||
// The slice elements are converted by calling Value.AsInterface.
|
||||
func (x *ListValue) AsSlice() []interface{} {
|
||||
func (x *ListValue) AsSlice() []any {
|
||||
vals := x.GetValues()
|
||||
vs := make([]interface{}, len(vals))
|
||||
vs := make([]any, len(vals))
|
||||
for i, v := range vals {
|
||||
vs[i] = v.AsInterface()
|
||||
}
|
||||
@ -716,7 +716,7 @@ func file_google_protobuf_struct_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_google_protobuf_struct_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_struct_proto_goTypes = []any{
|
||||
(NullValue)(0), // 0: google.protobuf.NullValue
|
||||
(*Struct)(nil), // 1: google.protobuf.Struct
|
||||
(*Value)(nil), // 2: google.protobuf.Value
|
||||
@ -743,7 +743,7 @@ func file_google_protobuf_struct_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Struct); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -755,7 +755,7 @@ func file_google_protobuf_struct_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Value); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -767,7 +767,7 @@ func file_google_protobuf_struct_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ListValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -780,7 +780,7 @@ func file_google_protobuf_struct_proto_init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{
|
||||
(*Value_NullValue)(nil),
|
||||
(*Value_NumberValue)(nil),
|
||||
(*Value_StringValue)(nil),
|
||||
|
4
vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
generated
vendored
4
vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go
generated
vendored
@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_google_protobuf_timestamp_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_timestamp_proto_goTypes = []any{
|
||||
(*Timestamp)(nil), // 0: google.protobuf.Timestamp
|
||||
}
|
||||
var file_google_protobuf_timestamp_proto_depIdxs = []int32{
|
||||
@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Timestamp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
20
vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go
generated
vendored
20
vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go
generated
vendored
@ -605,7 +605,7 @@ func file_google_protobuf_wrappers_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_google_protobuf_wrappers_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_google_protobuf_wrappers_proto_goTypes = []interface{}{
|
||||
var file_google_protobuf_wrappers_proto_goTypes = []any{
|
||||
(*DoubleValue)(nil), // 0: google.protobuf.DoubleValue
|
||||
(*FloatValue)(nil), // 1: google.protobuf.FloatValue
|
||||
(*Int64Value)(nil), // 2: google.protobuf.Int64Value
|
||||
@ -630,7 +630,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*DoubleValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -642,7 +642,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*FloatValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -654,7 +654,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Int64Value); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -666,7 +666,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*UInt64Value); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -678,7 +678,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*Int32Value); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -690,7 +690,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*UInt32Value); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -702,7 +702,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*BoolValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -714,7 +714,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*StringValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -726,7 +726,7 @@ func file_google_protobuf_wrappers_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*BytesValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
12
vendor/k8s.io/apiserver/pkg/admission/plugin/cel/compile.go
generated
vendored
12
vendor/k8s.io/apiserver/pkg/admission/plugin/cel/compile.go
generated
vendored
@ -222,9 +222,10 @@ func (c compiler) CompileCELExpression(expressionAccessor ExpressionAccessor, op
|
||||
func mustBuildEnvs(baseEnv *environment.EnvSet) variableDeclEnvs {
|
||||
requestType := BuildRequestType()
|
||||
namespaceType := BuildNamespaceType()
|
||||
envs := make(variableDeclEnvs, 4) // since the number of variable combinations is small, pre-build a environment for each
|
||||
envs := make(variableDeclEnvs, 8) // since the number of variable combinations is small, pre-build a environment for each
|
||||
for _, hasParams := range []bool{false, true} {
|
||||
for _, hasAuthorizer := range []bool{false, true} {
|
||||
for _, strictCost := range []bool{false, true} {
|
||||
var envOpts []cel.EnvOption
|
||||
if hasParams {
|
||||
envOpts = append(envOpts, cel.Variable(ParamsVarName, cel.DynType))
|
||||
@ -255,7 +256,14 @@ func mustBuildEnvs(baseEnv *environment.EnvSet) variableDeclEnvs {
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("environment misconfigured: %v", err))
|
||||
}
|
||||
envs[OptionalVariableDeclarations{HasParams: hasParams, HasAuthorizer: hasAuthorizer}] = extended
|
||||
if strictCost {
|
||||
extended, err = extended.Extend(environment.StrictCostOpt)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("environment misconfigured: %v", err))
|
||||
}
|
||||
}
|
||||
envs[OptionalVariableDeclarations{HasParams: hasParams, HasAuthorizer: hasAuthorizer, StrictCost: strictCost}] = extended
|
||||
}
|
||||
}
|
||||
}
|
||||
return envs
|
||||
|
4
vendor/k8s.io/apiserver/pkg/admission/plugin/cel/interface.go
generated
vendored
4
vendor/k8s.io/apiserver/pkg/admission/plugin/cel/interface.go
generated
vendored
@ -57,10 +57,12 @@ type OptionalVariableDeclarations struct {
|
||||
// HasParams specifies if the "params" variable is declared.
|
||||
// The "params" variable may still be bound to "null" when declared.
|
||||
HasParams bool
|
||||
// HasAuthorizer specifies if the"authorizer" and "authorizer.requestResource"
|
||||
// HasAuthorizer specifies if the "authorizer" and "authorizer.requestResource"
|
||||
// variables are declared. When declared, the authorizer variables are
|
||||
// expected to be non-null.
|
||||
HasAuthorizer bool
|
||||
// StrictCost specifies if the CEL cost limitation is strict for extended libraries as well as native libraries.
|
||||
StrictCost bool
|
||||
}
|
||||
|
||||
// FilterCompiler contains a function to assist with converting types and values to/from CEL-typed values.
|
||||
|
27
vendor/k8s.io/apiserver/pkg/admission/plugin/policy/validating/plugin.go
generated
vendored
27
vendor/k8s.io/apiserver/pkg/admission/plugin/policy/validating/plugin.go
generated
vendored
@ -31,6 +31,7 @@ import (
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
"k8s.io/apiserver/pkg/cel/environment"
|
||||
"k8s.io/apiserver/pkg/features"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/client-go/dynamic"
|
||||
"k8s.io/client-go/informers"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
@ -43,13 +44,21 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
compositionEnvTemplate *cel.CompositionEnv = func() *cel.CompositionEnv {
|
||||
compositionEnvTemplate, err := cel.NewCompositionEnv(cel.VariablesTypeName, environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion()))
|
||||
compositionEnvTemplateWithStrictCost *cel.CompositionEnv = func() *cel.CompositionEnv {
|
||||
compositionEnvTemplateWithStrictCost, err := cel.NewCompositionEnv(cel.VariablesTypeName, environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return compositionEnvTemplate
|
||||
return compositionEnvTemplateWithStrictCost
|
||||
}()
|
||||
compositionEnvTemplateWithoutStrictCost *cel.CompositionEnv = func() *cel.CompositionEnv {
|
||||
compositionEnvTemplateWithoutStrictCost, err := cel.NewCompositionEnv(cel.VariablesTypeName, environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), false))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return compositionEnvTemplateWithoutStrictCost
|
||||
}()
|
||||
)
|
||||
|
||||
@ -114,12 +123,18 @@ func compilePolicy(policy *Policy) Validator {
|
||||
if policy.Spec.ParamKind != nil {
|
||||
hasParam = true
|
||||
}
|
||||
optionalVars := cel.OptionalVariableDeclarations{HasParams: hasParam, HasAuthorizer: true}
|
||||
expressionOptionalVars := cel.OptionalVariableDeclarations{HasParams: hasParam, HasAuthorizer: false}
|
||||
strictCost := utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForVAP)
|
||||
optionalVars := cel.OptionalVariableDeclarations{HasParams: hasParam, HasAuthorizer: true, StrictCost: strictCost}
|
||||
expressionOptionalVars := cel.OptionalVariableDeclarations{HasParams: hasParam, HasAuthorizer: false, StrictCost: strictCost}
|
||||
failurePolicy := policy.Spec.FailurePolicy
|
||||
var matcher matchconditions.Matcher = nil
|
||||
matchConditions := policy.Spec.MatchConditions
|
||||
|
||||
var compositionEnvTemplate *cel.CompositionEnv
|
||||
if strictCost {
|
||||
compositionEnvTemplate = compositionEnvTemplateWithStrictCost
|
||||
} else {
|
||||
compositionEnvTemplate = compositionEnvTemplateWithoutStrictCost
|
||||
}
|
||||
filterCompiler := cel.NewCompositedCompilerFromTemplate(compositionEnvTemplate)
|
||||
filterCompiler.CompileAndStoreVariables(convertv1beta1Variables(policy.Spec.Variables), optionalVars, environment.StoredExpressions)
|
||||
|
||||
|
5
vendor/k8s.io/apiserver/pkg/admission/plugin/policy/validating/typechecking.go
generated
vendored
5
vendor/k8s.io/apiserver/pkg/admission/plugin/policy/validating/typechecking.go
generated
vendored
@ -39,6 +39,8 @@ import (
|
||||
"k8s.io/apiserver/pkg/cel/library"
|
||||
"k8s.io/apiserver/pkg/cel/openapi"
|
||||
"k8s.io/apiserver/pkg/cel/openapi/resolver"
|
||||
"k8s.io/apiserver/pkg/features"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
@ -210,6 +212,7 @@ func (c *TypeChecker) CheckExpression(ctx *TypeCheckingContext, expression strin
|
||||
options := plugincel.OptionalVariableDeclarations{
|
||||
HasParams: ctx.paramDeclType != nil,
|
||||
HasAuthorizer: true,
|
||||
StrictCost: utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForVAP),
|
||||
}
|
||||
compiler.CompileAndStoreVariables(convertv1beta1Variables(ctx.variables), options, environment.StoredExpressions)
|
||||
result := compiler.CompileCELExpression(celExpression(expression), options, environment.StoredExpressions)
|
||||
@ -391,7 +394,7 @@ func (c *TypeChecker) tryRefreshRESTMapper() {
|
||||
}
|
||||
|
||||
func buildEnvSet(hasParams bool, hasAuthorizer bool, types typeOverwrite) (*environment.EnvSet, error) {
|
||||
baseEnv := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion())
|
||||
baseEnv := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForVAP))
|
||||
requestType := plugincel.BuildRequestType()
|
||||
namespaceType := plugincel.BuildNamespaceType()
|
||||
|
||||
|
12
vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go
generated
vendored
12
vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go
generated
vendored
@ -27,6 +27,8 @@ import (
|
||||
"k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/namespace"
|
||||
"k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/object"
|
||||
"k8s.io/apiserver/pkg/cel/environment"
|
||||
"k8s.io/apiserver/pkg/features"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
webhookutil "k8s.io/apiserver/pkg/util/webhook"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
@ -139,11 +141,16 @@ func (m *mutatingWebhookAccessor) GetCompiledMatcher(compiler cel.FilterCompiler
|
||||
Expression: matchCondition.Expression,
|
||||
}
|
||||
}
|
||||
strictCost := false
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForWebhooks) {
|
||||
strictCost = true
|
||||
}
|
||||
m.compiledMatcher = matchconditions.NewMatcher(compiler.Compile(
|
||||
expressions,
|
||||
cel.OptionalVariableDeclarations{
|
||||
HasParams: false,
|
||||
HasAuthorizer: true,
|
||||
StrictCost: strictCost,
|
||||
},
|
||||
environment.StoredExpressions,
|
||||
), m.FailurePolicy, "webhook", "admit", m.Name)
|
||||
@ -267,11 +274,16 @@ func (v *validatingWebhookAccessor) GetCompiledMatcher(compiler cel.FilterCompil
|
||||
Expression: matchCondition.Expression,
|
||||
}
|
||||
}
|
||||
strictCost := false
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForWebhooks) {
|
||||
strictCost = true
|
||||
}
|
||||
v.compiledMatcher = matchconditions.NewMatcher(compiler.Compile(
|
||||
expressions,
|
||||
cel.OptionalVariableDeclarations{
|
||||
HasParams: false,
|
||||
HasAuthorizer: true,
|
||||
StrictCost: strictCost,
|
||||
},
|
||||
environment.StoredExpressions,
|
||||
), v.FailurePolicy, "webhook", "validating", v.Name)
|
||||
|
6
vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go
generated
vendored
6
vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go
generated
vendored
@ -21,7 +21,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
admissionmetrics "k8s.io/apiserver/pkg/admission/metrics"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
admissionv1 "k8s.io/api/admission/v1"
|
||||
@ -31,6 +30,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apiserver/pkg/admission"
|
||||
genericadmissioninit "k8s.io/apiserver/pkg/admission/initializer"
|
||||
admissionmetrics "k8s.io/apiserver/pkg/admission/metrics"
|
||||
"k8s.io/apiserver/pkg/admission/plugin/cel"
|
||||
"k8s.io/apiserver/pkg/admission/plugin/webhook"
|
||||
"k8s.io/apiserver/pkg/admission/plugin/webhook/config"
|
||||
@ -39,6 +39,8 @@ import (
|
||||
"k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/rules"
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
"k8s.io/apiserver/pkg/cel/environment"
|
||||
"k8s.io/apiserver/pkg/features"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
webhookutil "k8s.io/apiserver/pkg/util/webhook"
|
||||
"k8s.io/client-go/informers"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
@ -100,7 +102,7 @@ func NewWebhook(handler *admission.Handler, configFile io.Reader, sourceFactory
|
||||
namespaceMatcher: &namespace.Matcher{},
|
||||
objectMatcher: &object.Matcher{},
|
||||
dispatcher: dispatcherFactory(&cm),
|
||||
filterCompiler: cel.NewFilterCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion())),
|
||||
filterCompiler: cel.NewFilterCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), utilfeature.DefaultFeatureGate.Enabled(features.StrictCostEnforcementForWebhooks))),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
6
vendor/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
generated
vendored
6
vendor/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go
generated
vendored
@ -91,7 +91,8 @@ func CompileAndValidateJWTAuthenticator(authenticator api.JWTAuthenticator, disa
|
||||
func validateJWTAuthenticator(authenticator api.JWTAuthenticator, fldPath *field.Path, disallowedIssuers sets.Set[string], structuredAuthnFeatureEnabled bool) (authenticationcel.CELMapper, field.ErrorList) {
|
||||
var allErrs field.ErrorList
|
||||
|
||||
compiler := authenticationcel.NewCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion()))
|
||||
// strictCost is set to true which enables the strict cost for CEL validation.
|
||||
compiler := authenticationcel.NewCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true))
|
||||
state := &validationState{}
|
||||
|
||||
allErrs = append(allErrs, validateIssuer(authenticator.Issuer, disallowedIssuers, fldPath.Child("issuer"))...)
|
||||
@ -722,7 +723,8 @@ func compileMatchConditions(matchConditions []api.WebhookMatchCondition, fldPath
|
||||
return nil, allErrs
|
||||
}
|
||||
|
||||
compiler := authorizationcel.NewCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion()))
|
||||
// strictCost is set to true which enables the strict cost for CEL validation.
|
||||
compiler := authorizationcel.NewCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true))
|
||||
seenExpressions := sets.NewString()
|
||||
var compilationResults []authorizationcel.CompilationResult
|
||||
|
||||
|
33
vendor/k8s.io/apiserver/pkg/cel/environment/base.go
generated
vendored
33
vendor/k8s.io/apiserver/pkg/cel/environment/base.go
generated
vendored
@ -46,7 +46,9 @@ func DefaultCompatibilityVersion() *version.Version {
|
||||
return version.MajorMinor(1, 29)
|
||||
}
|
||||
|
||||
var baseOpts = []VersionedOptions{
|
||||
var baseOpts = append(baseOptsWithoutStrictCost, StrictCostOpt)
|
||||
|
||||
var baseOptsWithoutStrictCost = []VersionedOptions{
|
||||
{
|
||||
// CEL epoch was actually 1.23, but we artificially set it to 1.0 because these
|
||||
// options should always be present.
|
||||
@ -132,6 +134,14 @@ var baseOpts = []VersionedOptions{
|
||||
},
|
||||
}
|
||||
|
||||
var StrictCostOpt = VersionedOptions{
|
||||
// This is to configure the cost calculation for extended libraries
|
||||
IntroducedVersion: version.MajorMinor(1, 0),
|
||||
ProgramOptions: []cel.ProgramOption{
|
||||
cel.CostTracking(&library.CostEstimator{}),
|
||||
},
|
||||
}
|
||||
|
||||
// MustBaseEnvSet returns the common CEL base environments for Kubernetes for Version, or panics
|
||||
// if the version is nil, or does not have major and minor components.
|
||||
//
|
||||
@ -141,7 +151,8 @@ var baseOpts = []VersionedOptions{
|
||||
// The returned environment contains no CEL variable definitions or custom type declarations and
|
||||
// should be extended to construct environments with the appropriate variable definitions,
|
||||
// type declarations and any other needed configuration.
|
||||
func MustBaseEnvSet(ver *version.Version) *EnvSet {
|
||||
// strictCost is used to determine whether to enforce strict cost calculation for CEL expressions.
|
||||
func MustBaseEnvSet(ver *version.Version, strictCost bool) *EnvSet {
|
||||
if ver == nil {
|
||||
panic("version must be non-nil")
|
||||
}
|
||||
@ -149,19 +160,33 @@ func MustBaseEnvSet(ver *version.Version) *EnvSet {
|
||||
panic(fmt.Sprintf("version must contain an major and minor component, but got: %s", ver.String()))
|
||||
}
|
||||
key := strconv.FormatUint(uint64(ver.Major()), 10) + "." + strconv.FormatUint(uint64(ver.Minor()), 10)
|
||||
var entry interface{}
|
||||
if strictCost {
|
||||
if entry, ok := baseEnvs.Load(key); ok {
|
||||
return entry.(*EnvSet)
|
||||
}
|
||||
|
||||
entry, _, _ := baseEnvsSingleflight.Do(key, func() (interface{}, error) {
|
||||
entry, _, _ = baseEnvsSingleflight.Do(key, func() (interface{}, error) {
|
||||
entry := mustNewEnvSet(ver, baseOpts)
|
||||
baseEnvs.Store(key, entry)
|
||||
return entry, nil
|
||||
})
|
||||
} else {
|
||||
if entry, ok := baseEnvsWithOption.Load(key); ok {
|
||||
return entry.(*EnvSet)
|
||||
}
|
||||
entry, _, _ = baseEnvsWithOptionSingleflight.Do(key, func() (interface{}, error) {
|
||||
entry := mustNewEnvSet(ver, baseOptsWithoutStrictCost)
|
||||
baseEnvsWithOption.Store(key, entry)
|
||||
return entry, nil
|
||||
})
|
||||
}
|
||||
|
||||
return entry.(*EnvSet)
|
||||
}
|
||||
|
||||
var (
|
||||
baseEnvs = sync.Map{}
|
||||
baseEnvsWithOption = sync.Map{}
|
||||
baseEnvsSingleflight = &singleflight.Group{}
|
||||
baseEnvsWithOptionSingleflight = &singleflight.Group{}
|
||||
)
|
||||
|
22
vendor/k8s.io/apiserver/pkg/features/kube_features.go
generated
vendored
22
vendor/k8s.io/apiserver/pkg/features/kube_features.go
generated
vendored
@ -220,6 +220,24 @@ const (
|
||||
// if the generated name conflicts with an existing resource name, up to a maximum number of 7 retries.
|
||||
RetryGenerateName featuregate.Feature = "RetryGenerateName"
|
||||
|
||||
// owner: @cici37
|
||||
// alpha: v1.30
|
||||
//
|
||||
// StrictCostEnforcementForVAP is used to apply strict CEL cost validation for ValidatingAdmissionPolicy.
|
||||
// It will be set to off by default for certain time of period to prevent the impact on the existing users.
|
||||
// It is strongly recommended to enable this feature gate as early as possible.
|
||||
// The strict cost is specific for the extended libraries whose cost defined under k8s/apiserver/pkg/cel/library.
|
||||
StrictCostEnforcementForVAP featuregate.Feature = "StrictCostEnforcementForVAP"
|
||||
|
||||
// owner: @cici37
|
||||
// alpha: v1.30
|
||||
//
|
||||
// StrictCostEnforcementForWebhooks is used to apply strict CEL cost validation for matchConditions in Webhooks.
|
||||
// It will be set to off by default for certain time of period to prevent the impact on the existing users.
|
||||
// It is strongly recommended to enable this feature gate as early as possible.
|
||||
// The strict cost is specific for the extended libraries whose cost defined under k8s/apiserver/pkg/cel/library.
|
||||
StrictCostEnforcementForWebhooks featuregate.Feature = "StrictCostEnforcementForWebhooks"
|
||||
|
||||
// owner: @caesarxuchao @roycaihw
|
||||
// alpha: v1.20
|
||||
//
|
||||
@ -347,6 +365,10 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
||||
|
||||
StorageVersionHash: {Default: true, PreRelease: featuregate.Beta},
|
||||
|
||||
StrictCostEnforcementForVAP: {Default: false, PreRelease: featuregate.Beta},
|
||||
|
||||
StrictCostEnforcementForWebhooks: {Default: false, PreRelease: featuregate.Beta},
|
||||
|
||||
StructuredAuthenticationConfiguration: {Default: true, PreRelease: featuregate.Beta},
|
||||
|
||||
StructuredAuthorizationConfiguration: {Default: true, PreRelease: featuregate.Beta},
|
||||
|
88
vendor/modules.txt
vendored
88
vendor/modules.txt
vendored
@ -81,7 +81,7 @@ github.com/antlr/antlr4/runtime/Go/antlr/v4
|
||||
# github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a
|
||||
## explicit
|
||||
github.com/asaskevich/govalidator
|
||||
# github.com/aws/aws-sdk-go v1.51.12
|
||||
# github.com/aws/aws-sdk-go v1.53.14
|
||||
## explicit; go 1.19
|
||||
github.com/aws/aws-sdk-go/aws
|
||||
github.com/aws/aws-sdk-go/aws/auth/bearer
|
||||
@ -204,7 +204,7 @@ github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs
|
||||
github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs
|
||||
github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd
|
||||
github.com/ceph/ceph-csi/api/deploy/ocp
|
||||
# github.com/ceph/go-ceph v0.27.0
|
||||
# github.com/ceph/go-ceph v0.28.0
|
||||
## explicit; go 1.19
|
||||
github.com/ceph/go-ceph/cephfs
|
||||
github.com/ceph/go-ceph/cephfs/admin
|
||||
@ -888,8 +888,8 @@ google.golang.org/grpc/serviceconfig
|
||||
google.golang.org/grpc/stats
|
||||
google.golang.org/grpc/status
|
||||
google.golang.org/grpc/tap
|
||||
# google.golang.org/protobuf v1.34.1
|
||||
## explicit; go 1.17
|
||||
# google.golang.org/protobuf v1.34.2
|
||||
## explicit; go 1.20
|
||||
google.golang.org/protobuf/encoding/protojson
|
||||
google.golang.org/protobuf/encoding/prototext
|
||||
google.golang.org/protobuf/encoding/protowire
|
||||
@ -943,7 +943,7 @@ gopkg.in/yaml.v2
|
||||
# gopkg.in/yaml.v3 v3.0.1
|
||||
## explicit
|
||||
gopkg.in/yaml.v3
|
||||
# k8s.io/api v0.30.1 => k8s.io/api v0.30.1
|
||||
# k8s.io/api v0.30.2 => k8s.io/api v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/api/admission/v1
|
||||
k8s.io/api/admission/v1beta1
|
||||
@ -1001,12 +1001,12 @@ k8s.io/api/storage/v1
|
||||
k8s.io/api/storage/v1alpha1
|
||||
k8s.io/api/storage/v1beta1
|
||||
k8s.io/api/storagemigration/v1alpha1
|
||||
# k8s.io/apiextensions-apiserver v0.30.1 => k8s.io/apiextensions-apiserver v0.30.1
|
||||
# k8s.io/apiextensions-apiserver v0.30.1 => k8s.io/apiextensions-apiserver v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
|
||||
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
|
||||
k8s.io/apiextensions-apiserver/pkg/features
|
||||
# k8s.io/apimachinery v0.30.1 => k8s.io/apimachinery v0.30.1
|
||||
# k8s.io/apimachinery v0.30.2 => k8s.io/apimachinery v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/apimachinery/pkg/api/equality
|
||||
k8s.io/apimachinery/pkg/api/errors
|
||||
@ -1070,7 +1070,7 @@ k8s.io/apimachinery/pkg/watch
|
||||
k8s.io/apimachinery/third_party/forked/golang/json
|
||||
k8s.io/apimachinery/third_party/forked/golang/netutil
|
||||
k8s.io/apimachinery/third_party/forked/golang/reflect
|
||||
# k8s.io/apiserver v0.30.1 => k8s.io/apiserver v0.30.1
|
||||
# k8s.io/apiserver v0.30.2 => k8s.io/apiserver v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/apiserver/pkg/admission
|
||||
k8s.io/apiserver/pkg/admission/configuration
|
||||
@ -1218,7 +1218,7 @@ k8s.io/apiserver/plugin/pkg/audit/webhook
|
||||
k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
|
||||
k8s.io/apiserver/plugin/pkg/authorizer/webhook
|
||||
k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics
|
||||
# k8s.io/client-go v12.0.0+incompatible => k8s.io/client-go v0.30.1
|
||||
# k8s.io/client-go v12.0.0+incompatible => k8s.io/client-go v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1
|
||||
k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1
|
||||
@ -1552,7 +1552,7 @@ k8s.io/client-go/util/homedir
|
||||
k8s.io/client-go/util/keyutil
|
||||
k8s.io/client-go/util/retry
|
||||
k8s.io/client-go/util/workqueue
|
||||
# k8s.io/cloud-provider v0.30.1 => k8s.io/cloud-provider v0.30.1
|
||||
# k8s.io/cloud-provider v0.30.2 => k8s.io/cloud-provider v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/cloud-provider
|
||||
k8s.io/cloud-provider/app/config
|
||||
@ -1567,7 +1567,7 @@ k8s.io/cloud-provider/names
|
||||
k8s.io/cloud-provider/options
|
||||
k8s.io/cloud-provider/volume
|
||||
k8s.io/cloud-provider/volume/helpers
|
||||
# k8s.io/component-base v0.30.1 => k8s.io/component-base v0.30.1
|
||||
# k8s.io/component-base v0.30.2 => k8s.io/component-base v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/component-base/cli/flag
|
||||
k8s.io/component-base/config
|
||||
@ -1590,13 +1590,13 @@ k8s.io/component-base/metrics/testutil
|
||||
k8s.io/component-base/tracing
|
||||
k8s.io/component-base/tracing/api/v1
|
||||
k8s.io/component-base/version
|
||||
# k8s.io/component-helpers v0.30.1 => k8s.io/component-helpers v0.30.1
|
||||
# k8s.io/component-helpers v0.30.2 => k8s.io/component-helpers v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/component-helpers/node/util/sysctl
|
||||
k8s.io/component-helpers/scheduling/corev1
|
||||
k8s.io/component-helpers/scheduling/corev1/nodeaffinity
|
||||
k8s.io/component-helpers/storage/volume
|
||||
# k8s.io/controller-manager v0.30.1 => k8s.io/controller-manager v0.30.1
|
||||
# k8s.io/controller-manager v0.30.2 => k8s.io/controller-manager v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/controller-manager/config
|
||||
k8s.io/controller-manager/config/v1
|
||||
@ -1619,7 +1619,7 @@ k8s.io/klog/v2/internal/severity
|
||||
k8s.io/klog/v2/internal/sloghandler
|
||||
k8s.io/klog/v2/internal/verbosity
|
||||
k8s.io/klog/v2/textlogger
|
||||
# k8s.io/kms v0.30.1
|
||||
# k8s.io/kms v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/kms/apis/v1beta1
|
||||
k8s.io/kms/apis/v2
|
||||
@ -1646,11 +1646,11 @@ k8s.io/kube-openapi/pkg/validation/errors
|
||||
k8s.io/kube-openapi/pkg/validation/spec
|
||||
k8s.io/kube-openapi/pkg/validation/strfmt
|
||||
k8s.io/kube-openapi/pkg/validation/strfmt/bson
|
||||
# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.30.1
|
||||
# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/kubectl/pkg/scale
|
||||
k8s.io/kubectl/pkg/util/podutils
|
||||
# k8s.io/kubelet v0.0.0 => k8s.io/kubelet v0.30.1
|
||||
# k8s.io/kubelet v0.0.0 => k8s.io/kubelet v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/kubelet/pkg/apis
|
||||
k8s.io/kubelet/pkg/apis/stats/v1alpha1
|
||||
@ -1719,10 +1719,10 @@ k8s.io/kubernetes/test/utils
|
||||
k8s.io/kubernetes/test/utils/format
|
||||
k8s.io/kubernetes/test/utils/image
|
||||
k8s.io/kubernetes/test/utils/kubeconfig
|
||||
# k8s.io/mount-utils v0.29.3 => k8s.io/mount-utils v0.29.3
|
||||
# k8s.io/mount-utils v0.30.2 => k8s.io/mount-utils v0.29.3
|
||||
## explicit; go 1.21
|
||||
k8s.io/mount-utils
|
||||
# k8s.io/pod-security-admission v0.30.1 => k8s.io/pod-security-admission v0.30.1
|
||||
# k8s.io/pod-security-admission v0.30.2 => k8s.io/pod-security-admission v0.30.2
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/pod-security-admission/api
|
||||
k8s.io/pod-security-admission/policy
|
||||
@ -1808,31 +1808,31 @@ sigs.k8s.io/yaml/goyaml.v2
|
||||
# github.com/ceph/ceph-csi/api => ./api
|
||||
# github.com/portworx/sched-ops => github.com/portworx/sched-ops v0.20.4-openstorage-rc3
|
||||
# gomodules.xyz/jsonpatch/v2 => github.com/gomodules/jsonpatch/v2 v2.2.0
|
||||
# k8s.io/api => k8s.io/api v0.30.1
|
||||
# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.1
|
||||
# k8s.io/apimachinery => k8s.io/apimachinery v0.30.1
|
||||
# k8s.io/apiserver => k8s.io/apiserver v0.30.1
|
||||
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.1
|
||||
# k8s.io/client-go => k8s.io/client-go v0.30.1
|
||||
# k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.1
|
||||
# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.1
|
||||
# k8s.io/code-generator => k8s.io/code-generator v0.30.1
|
||||
# k8s.io/component-base => k8s.io/component-base v0.30.1
|
||||
# k8s.io/component-helpers => k8s.io/component-helpers v0.30.1
|
||||
# k8s.io/controller-manager => k8s.io/controller-manager v0.30.1
|
||||
# k8s.io/cri-api => k8s.io/cri-api v0.30.1
|
||||
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.1
|
||||
# k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.1
|
||||
# k8s.io/endpointslice => k8s.io/endpointslice v0.30.1
|
||||
# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.1
|
||||
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.1
|
||||
# k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.1
|
||||
# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.1
|
||||
# k8s.io/kubectl => k8s.io/kubectl v0.30.1
|
||||
# k8s.io/kubelet => k8s.io/kubelet v0.30.1
|
||||
# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.1
|
||||
# k8s.io/metrics => k8s.io/metrics v0.30.1
|
||||
# k8s.io/api => k8s.io/api v0.30.2
|
||||
# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.2
|
||||
# k8s.io/apimachinery => k8s.io/apimachinery v0.30.2
|
||||
# k8s.io/apiserver => k8s.io/apiserver v0.30.2
|
||||
# k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.2
|
||||
# k8s.io/client-go => k8s.io/client-go v0.30.2
|
||||
# k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.2
|
||||
# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.2
|
||||
# k8s.io/code-generator => k8s.io/code-generator v0.30.2
|
||||
# k8s.io/component-base => k8s.io/component-base v0.30.2
|
||||
# k8s.io/component-helpers => k8s.io/component-helpers v0.30.2
|
||||
# k8s.io/controller-manager => k8s.io/controller-manager v0.30.2
|
||||
# k8s.io/cri-api => k8s.io/cri-api v0.30.2
|
||||
# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.2
|
||||
# k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.2
|
||||
# k8s.io/endpointslice => k8s.io/endpointslice v0.30.2
|
||||
# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.2
|
||||
# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.2
|
||||
# k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.2
|
||||
# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.2
|
||||
# k8s.io/kubectl => k8s.io/kubectl v0.30.2
|
||||
# k8s.io/kubelet => k8s.io/kubelet v0.30.2
|
||||
# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.2
|
||||
# k8s.io/metrics => k8s.io/metrics v0.30.2
|
||||
# k8s.io/mount-utils => k8s.io/mount-utils v0.29.3
|
||||
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.1
|
||||
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.1
|
||||
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.2
|
||||
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.2
|
||||
# layeh.com/radius => github.com/layeh/radius v0.0.0-20190322222518-890bc1058917
|
||||
|
Loading…
Reference in New Issue
Block a user