mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: update kubernetes to latest
updating the kubernetes release to the latest in main go.mod Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
63c4c05b35
commit
5a66991bb3
go.modgo.sumgeneric_helpers.gomodules.txt
vendor
github.com
antlr
antlr4
antlr4-go
antlr
v4
.gitignoreLICENSEREADME.mdantlrdoc.goatn.goatn_config.goatn_config_set.goatn_deserialization_options.goatn_deserializer.goatn_simulator.goatn_state.goatn_type.gochar_stream.gocommon_token_factory.gocommon_token_stream.gocomparators.goconfiguration.godfa.godfa_serializer.godfa_state.godiagnostic_error_listener.goerror_listener.goerror_strategy.goerrors.gofile_stream.goinput_stream.goint_stream.gointerval_set.gojcollect.golexer.golexer_action.golexer_action_executor.golexer_atn_simulator.goll1_analyzer.gonostatistics.goparser.goparser_atn_simulator.goparser_rule_context.goprediction_context.goprediction_context_cache.goprediction_mode.gorecognizer.gorule_context.gosemantic_context.gostatistics.gostats_data.gotoken.gotoken_source.gotoken_stream.gotokenstream_rewriter.gotrace_listener.gotransition.gotree.gotrees.goutils.go
cenkalti
backoff
felixge
httpsnoop
fxamacker
cbor
go-openapi
swag
google
cel-go
cel
BUILD.bazeldecls.goenv.gofolding.goinlining.goio.golibrary.gomacro.gooptimizer.gooptions.goprogram.govalidator.go
checker
common
ext
interpreter
parser
pprof
profile
grpc-ecosystem
grpc-gateway
moby
prometheus
procfs
.golangci.ymlMAINTAINERS.mdMakefile.commonarp.gobuddyinfo.gocpuinfo.gocrypto.gofscache.goipvs.goloadavg.gomdstat.gomeminfo.gomountinfo.gomountstats.gonet_conntrackstat.gonet_ip_socket.gonet_sockstat.gonet_softnet.gonet_tls_stat.gonet_unix.gonet_wireless.goproc.goproc_limits.goproc_ns.goproc_psi.goproc_smaps.goproc_stat.goproc_status.goproc_sys.gosoftirqs.gostat.goswaps.gothread.gozoneinfo.go
sirupsen
spf13
cobra
.golangci.ymlREADME.mdactive_help.goactive_help.mdargs.gobash_completions.gobash_completions.mdbash_completionsV2.gocobra.gocommand.gocompletions.gofish_completions.gofish_completions.mdflag_groups.gopowershell_completions.gopowershell_completions.mdprojects_using_cobra.mdshell_completions.mduser_guide.mdzsh_completions.md
stoewer
x448
go.etcd.io
etcd
api
v3
version
client
go.opentelemetry.io
contrib
instrumentation
google.golang.org
grpc
net
http
otel
.codespellignore.codespellrc.gitmodules.golangci.ymlCHANGELOG.mdCODEOWNERSCONTRIBUTING.mdMakefileREADME.mdRELEASING.mdget_main_pkgs.shhandler.gotrace.go
attribute
baggage
codes
doc.goerror_handler.goexporters
otlp
otlptrace
README.mdclients.godoc.goexporter.go
internal
tracetransform
otlptracegrpc
README.mdclient.godoc.goexporter.go
version.gointernal
options.gointernal
internal_logging.gometric.gometric
README.mdasyncfloat64.goasyncint64.goconfig.godoc.go
propagation.goembedded
instrument.gometer.gonoop
syncfloat64.gosyncint64.gopropagation
renovate.jsonrequirements.txtsdk
README.md
instrumentation
internal
resource
README.mdauto.gobuiltin.goconfig.gocontainer.godoc.goenv.gohost_id.gohost_id_bsd.gohost_id_darwin.gohost_id_exec.gohost_id_linux.gohost_id_readfile.gohost_id_unsupported.gohost_id_windows.goos.goos_release_darwin.goos_release_unix.goos_unix.goos_unsupported.goos_windows.goprocess.goresource.go
trace
README.mdbatch_span_processor.godoc.goevent.goevictedqueue.goid_generator.golink.goprovider.gosampler_env.gosampling.gosimple_span_processor.gosnapshot.gospan.gospan_exporter.gospan_limits.gospan_processor.gotracer.goversion.go
version.gosemconv
internal
v1.12.0
v1.17.0
v1.20.0
v1.21.0
v1.24.0
v1.26.0
trace
verify_examples.shverify_readmes.shversion.goversions.yamlproto
otlp
trace
golang.org
x
time
rate
gopkg.in
k8s.io
api
admission
admissionregistration
v1
v1alpha1
v1beta1
apidiscovery
apiserverinternal
v1alpha1
apps
v1
v1beta1
v1beta2
authentication
v1
v1alpha1
v1beta1
authorization
v1
doc.gogenerated.pb.gogenerated.prototypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.gozz_generated.prerelease-lifecycle.go
v1beta1
autoscaling
v1
v2
v2beta1
v2beta2
batch
v1
v1beta1
certificates
v1
v1alpha1
v1beta1
coordination
v1
doc.gogenerated.pb.gogenerated.prototypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.gozz_generated.prerelease-lifecycle.go
v1alpha1
doc.gogenerated.pb.gogenerated.protoregister.gotypes.gotypes_swagger_doc_generated.gozz_generated.deepcopy.gozz_generated.prerelease-lifecycle.go
v1beta1
core
v1
discovery
events
extensions
v1beta1
flowcontrol
v1
v1beta1
v1beta2
v1beta3
imagepolicy
v1alpha1
networking
v1
v1alpha1
v1beta1
node
v1
v1alpha1
v1beta1
policy
rbac
v1
v1alpha1
v1beta1
resource
v1alpha2
v1alpha3
scheduling
v1
v1alpha1
v1beta1
storage
v1
v1alpha1
v1beta1
storagemigration
v1alpha1
apiextensions-apiserver
pkg
apimachinery
pkg
api
apis
meta
labels
runtime
util
framer
httpstream
intstr
runtime
sets
strategicpatch
version
watch
apiserver
pkg
admission
plugin
cel
policy
internal
generic
validating
webhook
mutating
apis
authentication
authenticatorfactory
request
authorization
cel
endpoints
filters
handlers
request
features
registry
server
config.godeleted_kinds.go
dynamiccertificates
filters
genericapiserver.gohealthz.gohealthz
hooks.gohttplog
mux
options
admission.goauthentication.godeprecated_insecure_serving.go
encryptionconfig
etcd.gofeature.gorecommended.goserver_run_options.goserving.goroutine
storage
storage_readiness_hook.gostorage
util
feature
flowcontrol
version
webhook
plugin
pkg
authorizer
webhook
client-go
applyconfigurations
OWNERSdoc.goutils.go
admissionregistration
v1
auditannotation.goexpressionwarning.gomatchcondition.gomatchresources.gomutatingwebhook.gomutatingwebhookconfiguration.gonamedrulewithoperations.goparamkind.goparamref.gorule.gorulewithoperations.goservicereference.gotypechecking.govalidatingadmissionpolicy.govalidatingadmissionpolicybinding.govalidatingadmissionpolicybindingspec.govalidatingadmissionpolicyspec.govalidatingadmissionpolicystatus.govalidatingwebhook.govalidatingwebhookconfiguration.govalidation.govariable.gowebhookclientconfig.go
v1alpha1
auditannotation.goexpressionwarning.gomatchcondition.gomatchresources.gonamedrulewithoperations.goparamkind.goparamref.gotypechecking.govalidatingadmissionpolicy.govalidatingadmissionpolicybinding.govalidatingadmissionpolicybindingspec.govalidatingadmissionpolicyspec.govalidatingadmissionpolicystatus.govalidation.govariable.go
v1beta1
auditannotation.goexpressionwarning.gomatchcondition.gomatchresources.gomutatingwebhook.gomutatingwebhookconfiguration.gonamedrulewithoperations.goparamkind.goparamref.goservicereference.gotypechecking.govalidatingadmissionpolicy.govalidatingadmissionpolicybinding.govalidatingadmissionpolicybindingspec.govalidatingadmissionpolicyspec.govalidatingadmissionpolicystatus.govalidatingwebhook.govalidatingwebhookconfiguration.govalidation.govariable.gowebhookclientconfig.go
apiserverinternal
apps
v1
controllerrevision.godaemonset.godaemonsetcondition.godaemonsetspec.godaemonsetstatus.godaemonsetupdatestrategy.godeployment.godeploymentcondition.godeploymentspec.godeploymentstatus.godeploymentstrategy.goreplicaset.goreplicasetcondition.goreplicasetspec.goreplicasetstatus.gorollingupdatedaemonset.gorollingupdatedeployment.gorollingupdatestatefulsetstrategy.gostatefulset.gostatefulsetcondition.gostatefulsetordinals.gostatefulsetpersistentvolumeclaimretentionpolicy.gostatefulsetspec.gostatefulsetstatus.gostatefulsetupdatestrategy.go
v1beta1
controllerrevision.godeployment.godeploymentcondition.godeploymentspec.godeploymentstatus.godeploymentstrategy.gorollbackconfig.gorollingupdatedeployment.gorollingupdatestatefulsetstrategy.gostatefulset.gostatefulsetcondition.gostatefulsetordinals.gostatefulsetpersistentvolumeclaimretentionpolicy.gostatefulsetspec.gostatefulsetstatus.gostatefulsetupdatestrategy.go
v1beta2
controllerrevision.godaemonset.godaemonsetcondition.godaemonsetspec.godaemonsetstatus.godaemonsetupdatestrategy.godeployment.godeploymentcondition.godeploymentspec.godeploymentstatus.godeploymentstrategy.goreplicaset.goreplicasetcondition.goreplicasetspec.goreplicasetstatus.gorollingupdatedaemonset.gorollingupdatedeployment.gorollingupdatestatefulsetstrategy.goscale.gostatefulset.gostatefulsetcondition.gostatefulsetordinals.gostatefulsetpersistentvolumeclaimretentionpolicy.gostatefulsetspec.gostatefulsetstatus.gostatefulsetupdatestrategy.go
autoscaling
v1
crossversionobjectreference.gohorizontalpodautoscaler.gohorizontalpodautoscalerspec.gohorizontalpodautoscalerstatus.goscale.goscalespec.goscalestatus.go
v2
containerresourcemetricsource.gocontainerresourcemetricstatus.gocrossversionobjectreference.goexternalmetricsource.goexternalmetricstatus.gohorizontalpodautoscaler.gohorizontalpodautoscalerbehavior.gohorizontalpodautoscalercondition.gohorizontalpodautoscalerspec.gohorizontalpodautoscalerstatus.gohpascalingpolicy.gohpascalingrules.gometricidentifier.gometricspec.gometricstatus.gometrictarget.gometricvaluestatus.goobjectmetricsource.goobjectmetricstatus.gopodsmetricsource.gopodsmetricstatus.goresourcemetricsource.goresourcemetricstatus.go
v2beta1
containerresourcemetricsource.gocontainerresourcemetricstatus.gocrossversionobjectreference.goexternalmetricsource.goexternalmetricstatus.gohorizontalpodautoscaler.gohorizontalpodautoscalercondition.gohorizontalpodautoscalerspec.gohorizontalpodautoscalerstatus.gometricspec.gometricstatus.goobjectmetricsource.goobjectmetricstatus.gopodsmetricsource.gopodsmetricstatus.goresourcemetricsource.goresourcemetricstatus.go
v2beta2
containerresourcemetricsource.gocontainerresourcemetricstatus.gocrossversionobjectreference.goexternalmetricsource.goexternalmetricstatus.gohorizontalpodautoscaler.gohorizontalpodautoscalerbehavior.gohorizontalpodautoscalercondition.gohorizontalpodautoscalerspec.gohorizontalpodautoscalerstatus.gohpascalingpolicy.gohpascalingrules.gometricidentifier.gometricspec.gometricstatus.gometrictarget.gometricvaluestatus.goobjectmetricsource.goobjectmetricstatus.gopodsmetricsource.gopodsmetricstatus.goresourcemetricsource.goresourcemetricstatus.go
batch
v1
cronjob.gocronjobspec.gocronjobstatus.gojob.gojobcondition.gojobspec.gojobstatus.gojobtemplatespec.gopodfailurepolicy.gopodfailurepolicyonexitcodesrequirement.gopodfailurepolicyonpodconditionspattern.gopodfailurepolicyrule.gosuccesspolicy.gosuccesspolicyrule.gouncountedterminatedpods.go
v1beta1
certificates
v1
certificatesigningrequest.gocertificatesigningrequestcondition.gocertificatesigningrequestspec.gocertificatesigningrequeststatus.go
v1alpha1
v1beta1
coordination
core
v1
affinity.goapparmorprofile.goattachedvolume.goawselasticblockstorevolumesource.goazurediskvolumesource.goazurefilepersistentvolumesource.goazurefilevolumesource.gocapabilities.gocephfspersistentvolumesource.gocephfsvolumesource.gocinderpersistentvolumesource.gocindervolumesource.goclaimsource.goclientipconfig.goclustertrustbundleprojection.gocomponentcondition.gocomponentstatus.goconfigmap.goconfigmapenvsource.goconfigmapkeyselector.goconfigmapnodeconfigsource.goconfigmapprojection.goconfigmapvolumesource.gocontainer.gocontainerimage.gocontainerport.gocontainerresizepolicy.gocontainerstate.gocontainerstaterunning.gocontainerstateterminated.gocontainerstatewaiting.gocontainerstatus.gocontaineruser.gocsipersistentvolumesource.gocsivolumesource.godaemonendpoint.godownwardapiprojection.godownwardapivolumefile.godownwardapivolumesource.goemptydirvolumesource.goendpointaddress.goendpointport.goendpoints.goendpointsubset.goenvfromsource.goenvvar.goenvvarsource.goephemeralcontainer.goephemeralcontainercommon.goephemeralvolumesource.goevent.goeventseries.goeventsource.goexecaction.gofcvolumesource.goflexpersistentvolumesource.goflexvolumesource.goflockervolumesource.gogcepersistentdiskvolumesource.gogitrepovolumesource.goglusterfspersistentvolumesource.goglusterfsvolumesource.gogrpcaction.gohostalias.gohostip.gohostpathvolumesource.gohttpgetaction.gohttpheader.goimagevolumesource.goiscsipersistentvolumesource.goiscsivolumesource.gokeytopath.golifecycle.golifecyclehandler.golimitrange.golimitrangeitem.golimitrangespec.golinuxcontaineruser.goloadbalanceringress.goloadbalancerstatus.golocalobjectreference.golocalvolumesource.gomodifyvolumestatus.gonamespace.gonamespacecondition.gonamespacespec.gonamespacestatus.gonfsvolumesource.gonode.gonodeaddress.gonodeaffinity.gonodecondition.gonodeconfigsource.gonodeconfigstatus.gonodedaemonendpoints.gonodefeatures.gonoderuntimehandler.gonoderuntimehandlerfeatures.gonodeselector.gonodeselectorrequirement.gonodeselectorterm.gonodespec.gonodestatus.gonodesysteminfo.goobjectfieldselector.goobjectreference.gopersistentvolume.gopersistentvolumeclaim.gopersistentvolumeclaimcondition.gopersistentvolumeclaimspec.gopersistentvolumeclaimstatus.gopersistentvolumeclaimtemplate.gopersistentvolumeclaimvolumesource.gopersistentvolumesource.gopersistentvolumespec.gopersistentvolumestatus.gophotonpersistentdiskvolumesource.gopod.gopodaffinity.gopodaffinityterm.gopodantiaffinity.gopodcondition.gopoddnsconfig.gopoddnsconfigoption.gopodip.gopodos.gopodreadinessgate.gopodresourceclaim.gopodresourceclaimstatus.gopodschedulinggate.gopodsecuritycontext.gopodspec.gopodstatus.gopodtemplate.gopodtemplatespec.goportstatus.goportworxvolumesource.gopreferredschedulingterm.goprobe.goprobehandler.goprojectedvolumesource.goquobytevolumesource.gorbdpersistentvolumesource.gorbdvolumesource.goreplicationcontroller.goreplicationcontrollercondition.goreplicationcontrollerspec.goreplicationcontrollerstatus.goresourceclaim.goresourcefieldselector.goresourcehealth.goresourcequota.goresourcequotaspec.goresourcequotastatus.goresourcerequirements.goresourcestatus.goscaleiopersistentvolumesource.goscaleiovolumesource.goscopedresourceselectorrequirement.goscopeselector.goseccompprofile.gosecret.gosecretenvsource.gosecretkeyselector.gosecretprojection.gosecretreference.gosecretvolumesource.gosecuritycontext.goselinuxoptions.goservice.goserviceaccount.goserviceaccounttokenprojection.goserviceport.goservicespec.goservicestatus.gosessionaffinityconfig.gosleepaction.gostorageospersistentvolumesource.gostorageosvolumesource.gosysctl.gotaint.gotcpsocketaction.gotoleration.gotopologyselectorlabelrequirement.gotopologyselectorterm.gotopologyspreadconstraint.gotypedlocalobjectreference.gotypedobjectreference.govolume.govolumedevice.govolumemount.govolumemountstatus.govolumenodeaffinity.govolumeprojection.govolumeresourcerequirements.govolumesource.govspherevirtualdiskvolumesource.goweightedpodaffinityterm.gowindowssecuritycontextoptions.go
discovery
v1
v1beta1
events
extensions
v1beta1
daemonset.godaemonsetcondition.godaemonsetspec.godaemonsetstatus.godaemonsetupdatestrategy.godeployment.godeploymentcondition.godeploymentspec.godeploymentstatus.godeploymentstrategy.gohttpingresspath.gohttpingressrulevalue.goingress.goingressbackend.goingressloadbalanceringress.goingressloadbalancerstatus.goingressportstatus.goingressrule.goingressrulevalue.goingressspec.goingressstatus.goingresstls.goipblock.gonetworkpolicy.gonetworkpolicyegressrule.gonetworkpolicyingressrule.gonetworkpolicypeer.gonetworkpolicyport.gonetworkpolicyspec.goreplicaset.goreplicasetcondition.goreplicasetspec.goreplicasetstatus.gorollbackconfig.gorollingupdatedaemonset.gorollingupdatedeployment.goscale.go
flowcontrol
v1
exemptprioritylevelconfiguration.goflowdistinguishermethod.goflowschema.goflowschemacondition.goflowschemaspec.goflowschemastatus.gogroupsubject.golimitedprioritylevelconfiguration.golimitresponse.gononresourcepolicyrule.gopolicyruleswithsubjects.goprioritylevelconfiguration.goprioritylevelconfigurationcondition.goprioritylevelconfigurationreference.goprioritylevelconfigurationspec.goprioritylevelconfigurationstatus.goqueuingconfiguration.goresourcepolicyrule.goserviceaccountsubject.gosubject.gousersubject.go
v1beta1
exemptprioritylevelconfiguration.goflowdistinguishermethod.goflowschema.goflowschemacondition.goflowschemaspec.goflowschemastatus.gogroupsubject.golimitedprioritylevelconfiguration.golimitresponse.gononresourcepolicyrule.gopolicyruleswithsubjects.goprioritylevelconfiguration.goprioritylevelconfigurationcondition.goprioritylevelconfigurationreference.goprioritylevelconfigurationspec.goprioritylevelconfigurationstatus.goqueuingconfiguration.goresourcepolicyrule.goserviceaccountsubject.gosubject.gousersubject.go
v1beta2
exemptprioritylevelconfiguration.goflowdistinguishermethod.goflowschema.goflowschemacondition.goflowschemaspec.goflowschemastatus.gogroupsubject.golimitedprioritylevelconfiguration.golimitresponse.gononresourcepolicyrule.gopolicyruleswithsubjects.goprioritylevelconfiguration.goprioritylevelconfigurationcondition.goprioritylevelconfigurationreference.goprioritylevelconfigurationspec.goprioritylevelconfigurationstatus.goqueuingconfiguration.goresourcepolicyrule.goserviceaccountsubject.gosubject.gousersubject.go
v1beta3
exemptprioritylevelconfiguration.goflowdistinguishermethod.goflowschema.goflowschemacondition.goflowschemaspec.goflowschemastatus.gogroupsubject.golimitedprioritylevelconfiguration.golimitresponse.gononresourcepolicyrule.gopolicyruleswithsubjects.goprioritylevelconfiguration.goprioritylevelconfigurationcondition.goprioritylevelconfigurationreference.goprioritylevelconfigurationspec.goprioritylevelconfigurationstatus.goqueuingconfiguration.goresourcepolicyrule.goserviceaccountsubject.gosubject.gousersubject.go
imagepolicy
internal
meta
v1
networking
v1
httpingresspath.gohttpingressrulevalue.goingress.goingressbackend.goingressclass.goingressclassparametersreference.goingressclassspec.goingressloadbalanceringress.goingressloadbalancerstatus.goingressportstatus.goingressrule.goingressrulevalue.goingressservicebackend.goingressspec.goingressstatus.goingresstls.goipblock.gonetworkpolicy.gonetworkpolicyegressrule.gonetworkpolicyingressrule.gonetworkpolicypeer.gonetworkpolicyport.gonetworkpolicyspec.goservicebackendport.go
v1alpha1
v1beta1
httpingresspath.gohttpingressrulevalue.goingress.goingressbackend.goingressclass.goingressclassparametersreference.goingressclassspec.goingressloadbalanceringress.goingressloadbalancerstatus.goingressportstatus.goingressrule.goingressrulevalue.goingressspec.goingressstatus.goingresstls.goipaddress.goipaddressspec.goparentreference.goservicecidr.goservicecidrspec.goservicecidrstatus.go
node
v1
v1alpha1
v1beta1
policy
v1
v1beta1
rbac
v1
aggregationrule.goclusterrole.goclusterrolebinding.gopolicyrule.gorole.gorolebinding.goroleref.gosubject.go
v1alpha1
aggregationrule.goclusterrole.goclusterrolebinding.gopolicyrule.gorole.gorolebinding.goroleref.gosubject.go
v1beta1
resource
v1alpha2
allocationresult.goallocationresultmodel.godriverallocationresult.godriverrequests.gonamedresourcesattribute.gonamedresourcesattributevalue.gonamedresourcesfilter.gonamedresourcesrequest.gonamedresourcesresources.gonamedresourcesstringslice.goresourceclaimparameters.goresourceclaimparametersreference.goresourceclaimspec.goresourceclass.goresourceclassparameters.goresourcefilter.goresourcefiltermodel.goresourcehandle.goresourcemodel.goresourcerequest.goresourcerequestmodel.gostructuredresourcehandle.go
v1alpha3
allocationresult.gobasicdevice.goceldeviceselector.godevice.godeviceallocationconfiguration.godeviceallocationresult.godeviceattribute.godeviceclaim.godeviceclaimconfiguration.godeviceclass.godeviceclassconfiguration.godeviceclassspec.godeviceconfiguration.godeviceconstraint.godevicerequest.godevicerequestallocationresult.godeviceselector.goopaquedeviceconfiguration.gopodschedulingcontext.gopodschedulingcontextspec.gopodschedulingcontextstatus.goresourceclaim.goresourceclaimconsumerreference.goresourceclaimschedulingstatus.goresourceclaimspec.goresourceclaimstatus.goresourceclaimtemplate.goresourceclaimtemplatespec.goresourcepool.goresourceslice.goresourceslicespec.go
scheduling
storage
v1
csidriver.gocsidriverspec.gocsinode.gocsinodedriver.gocsinodespec.gocsistoragecapacity.gostorageclass.gotokenrequest.govolumeattachment.govolumeattachmentsource.govolumeattachmentspec.govolumeattachmentstatus.govolumeerror.govolumenoderesources.go
v1alpha1
csistoragecapacity.govolumeattachment.govolumeattachmentsource.govolumeattachmentspec.govolumeattachmentstatus.govolumeattributesclass.govolumeerror.go
v1beta1
storagemigration
v1alpha1
discovery
fake
dynamic
features
gentype
informers
kubernetes
clientset.go
fake
scheme
typed
admissionregistration
v1
fake
fake_mutatingwebhookconfiguration.gofake_validatingadmissionpolicy.gofake_validatingadmissionpolicybinding.gofake_validatingwebhookconfiguration.go
mutatingwebhookconfiguration.govalidatingadmissionpolicy.govalidatingadmissionpolicybinding.govalidatingwebhookconfiguration.gov1alpha1
v1beta1
apiserverinternal
v1alpha1
apps
v1
v1beta1
v1beta2
authentication
v1
v1alpha1
v1beta1
authorization
v1
fake
fake_localsubjectaccessreview.gofake_selfsubjectaccessreview.gofake_selfsubjectrulesreview.gofake_subjectaccessreview.go
localsubjectaccessreview.goselfsubjectaccessreview.goselfsubjectrulesreview.gosubjectaccessreview.gov1beta1
autoscaling
v1
v2
v2beta1
v2beta2
batch
certificates
v1
v1alpha1
v1beta1
coordination
core
v1
componentstatus.goconfigmap.goendpoints.goevent.goevent_expansion.go
fake
fake_componentstatus.gofake_configmap.gofake_endpoints.gofake_event.gofake_limitrange.gofake_namespace.gofake_node.gofake_persistentvolume.gofake_persistentvolumeclaim.gofake_pod.gofake_podtemplate.gofake_replicationcontroller.gofake_resourcequota.gofake_secret.gofake_service.gofake_serviceaccount.go
limitrange.gonamespace.gonamespace_expansion.gonode.gonode_expansion.gopersistentvolume.gopersistentvolumeclaim.gopod.gopod_expansion.gopodtemplate.goreplicationcontroller.goresourcequota.gosecret.goservice.goservice_expansion.goserviceaccount.godiscovery
events
extensions
v1beta1
flowcontrol
v1
v1beta1
v1beta2
v1beta3
networking
node
v1
v1alpha1
v1beta1
policy
v1
v1beta1
rbac
v1
v1alpha1
v1beta1
resource
v1alpha2
fake
podschedulingcontext.goresourceclaim.goresourceclaimparameters.goresourceclaimtemplate.goresourceclass.goresourceclassparameters.goresourceslice.gov1alpha3
scheduling
v1
v1alpha1
v1beta1
storage
v1
csidriver.gocsinode.gocsistoragecapacity.go
fake
fake_csidriver.gofake_csinode.gofake_csistoragecapacity.gofake_storageclass.gofake_volumeattachment.go
storageclass.govolumeattachment.gov1alpha1
v1beta1
storagemigration
listers
admissionregistration
v1
mutatingwebhookconfiguration.govalidatingadmissionpolicy.govalidatingadmissionpolicybinding.govalidatingwebhookconfiguration.go
v1alpha1
v1beta1
apiserverinternal
v1alpha1
apps
v1
v1beta1
v1beta2
autoscaling
v1
v2
v2beta1
v2beta2
batch
certificates
coordination
core
v1
discovery
doc.goevents
extensions
flowcontrol
v1
v1beta1
v1beta2
v1beta3
networking
v1
v1alpha1
v1beta1
node
policy
rbac
v1
v1alpha1
v1beta1
resource
v1alpha2
v1alpha3
scheduling
storage
v1
v1alpha1
v1beta1
storagemigration
v1alpha1
rest
testing
tools
cache
clientcmd
leaderelection
portforward
record
remotecommand
watch
transport
util
cloud-provider
options
component-base
cli
featuregate
logs
metrics
testutil
tracing
version
component-helpers
kubelet
pkg
apis
stats
v1alpha1
kubernetes
pkg
apis
apps
batch
core
features
securitycontext
util
filesystem
volume
test
e2e
framework
.import-restrictions
debug
expect.goframework.goginkgowrapper.gometrics
node
pod
pv
skipper
ssh
test_context.goutil.gostorage
testing-manifests
scheduling
statefulset
etcd
storage-csi
external-attacher
external-health-monitor
external-health-monitor-controller
external-provisioner
external-resizer
external-snapshotter
csi-snapshotter
hostpath
mock
utils
pod-security-admission
utils
sigs.k8s.io
apiserver-network-proxy
konnectivity-client
proto
228
vendor/github.com/google/cel-go/cel/inlining.go
generated
vendored
Normal file
228
vendor/github.com/google/cel-go/cel/inlining.go
generated
vendored
Normal file
@ -0,0 +1,228 @@
|
||||
// Copyright 2023 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package cel
|
||||
|
||||
import (
|
||||
"github.com/google/cel-go/common/ast"
|
||||
"github.com/google/cel-go/common/containers"
|
||||
"github.com/google/cel-go/common/operators"
|
||||
"github.com/google/cel-go/common/overloads"
|
||||
"github.com/google/cel-go/common/types"
|
||||
"github.com/google/cel-go/common/types/traits"
|
||||
)
|
||||
|
||||
// InlineVariable holds a variable name to be matched and an AST representing
|
||||
// the expression graph which should be used to replace it.
|
||||
type InlineVariable struct {
|
||||
name string
|
||||
alias string
|
||||
def *ast.AST
|
||||
}
|
||||
|
||||
// Name returns the qualified variable or field selection to replace.
|
||||
func (v *InlineVariable) Name() string {
|
||||
return v.name
|
||||
}
|
||||
|
||||
// Alias returns the alias to use when performing cel.bind() calls during inlining.
|
||||
func (v *InlineVariable) Alias() string {
|
||||
return v.alias
|
||||
}
|
||||
|
||||
// Expr returns the inlined expression value.
|
||||
func (v *InlineVariable) Expr() ast.Expr {
|
||||
return v.def.Expr()
|
||||
}
|
||||
|
||||
// Type indicates the inlined expression type.
|
||||
func (v *InlineVariable) Type() *Type {
|
||||
return v.def.GetType(v.def.Expr().ID())
|
||||
}
|
||||
|
||||
// NewInlineVariable declares a variable name to be replaced by a checked expression.
|
||||
func NewInlineVariable(name string, definition *Ast) *InlineVariable {
|
||||
return NewInlineVariableWithAlias(name, name, definition)
|
||||
}
|
||||
|
||||
// NewInlineVariableWithAlias declares a variable name to be replaced by a checked expression.
|
||||
// If the variable occurs more than once, the provided alias will be used to replace the expressions
|
||||
// where the variable name occurs.
|
||||
func NewInlineVariableWithAlias(name, alias string, definition *Ast) *InlineVariable {
|
||||
return &InlineVariable{name: name, alias: alias, def: definition.impl}
|
||||
}
|
||||
|
||||
// NewInliningOptimizer creates and optimizer which replaces variables with expression definitions.
|
||||
//
|
||||
// If a variable occurs one time, the variable is replaced by the inline definition. If the
|
||||
// variable occurs more than once, the variable occurences are replaced by a cel.bind() call.
|
||||
func NewInliningOptimizer(inlineVars ...*InlineVariable) ASTOptimizer {
|
||||
return &inliningOptimizer{variables: inlineVars}
|
||||
}
|
||||
|
||||
type inliningOptimizer struct {
|
||||
variables []*InlineVariable
|
||||
}
|
||||
|
||||
func (opt *inliningOptimizer) Optimize(ctx *OptimizerContext, a *ast.AST) *ast.AST {
|
||||
root := ast.NavigateAST(a)
|
||||
for _, inlineVar := range opt.variables {
|
||||
matches := ast.MatchDescendants(root, opt.matchVariable(inlineVar.Name()))
|
||||
// Skip cases where the variable isn't in the expression graph
|
||||
if len(matches) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// For a single match, do a direct replacement of the expression sub-graph.
|
||||
if len(matches) == 1 || !isBindable(matches, inlineVar.Expr(), inlineVar.Type()) {
|
||||
for _, match := range matches {
|
||||
// Copy the inlined AST expr and source info.
|
||||
copyExpr := ctx.CopyASTAndMetadata(inlineVar.def)
|
||||
opt.inlineExpr(ctx, match, copyExpr, inlineVar.Type())
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
// For multiple matches, find the least common ancestor (lca) and insert the
|
||||
// variable as a cel.bind() macro.
|
||||
var lca ast.NavigableExpr = root
|
||||
lcaAncestorCount := 0
|
||||
ancestors := map[int64]int{}
|
||||
for _, match := range matches {
|
||||
// Update the identifier matches with the provided alias.
|
||||
parent, found := match, true
|
||||
for found {
|
||||
ancestorCount, hasAncestor := ancestors[parent.ID()]
|
||||
if !hasAncestor {
|
||||
ancestors[parent.ID()] = 1
|
||||
parent, found = parent.Parent()
|
||||
continue
|
||||
}
|
||||
if lcaAncestorCount < ancestorCount || (lcaAncestorCount == ancestorCount && lca.Depth() < parent.Depth()) {
|
||||
lca = parent
|
||||
lcaAncestorCount = ancestorCount
|
||||
}
|
||||
ancestors[parent.ID()] = ancestorCount + 1
|
||||
parent, found = parent.Parent()
|
||||
}
|
||||
aliasExpr := ctx.NewIdent(inlineVar.Alias())
|
||||
opt.inlineExpr(ctx, match, aliasExpr, inlineVar.Type())
|
||||
}
|
||||
|
||||
// Copy the inlined AST expr and source info.
|
||||
copyExpr := ctx.CopyASTAndMetadata(inlineVar.def)
|
||||
// Update the least common ancestor by inserting a cel.bind() call to the alias.
|
||||
inlined, bindMacro := ctx.NewBindMacro(lca.ID(), inlineVar.Alias(), copyExpr, lca)
|
||||
opt.inlineExpr(ctx, lca, inlined, inlineVar.Type())
|
||||
ctx.SetMacroCall(lca.ID(), bindMacro)
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
// inlineExpr replaces the current expression with the inlined one, unless the location of the inlining
|
||||
// happens within a presence test, e.g. has(a.b.c) -> inline alpha for a.b.c in which case an attempt is
|
||||
// made to determine whether the inlined value can be presence or existence tested.
|
||||
func (opt *inliningOptimizer) inlineExpr(ctx *OptimizerContext, prev ast.NavigableExpr, inlined ast.Expr, inlinedType *Type) {
|
||||
switch prev.Kind() {
|
||||
case ast.SelectKind:
|
||||
sel := prev.AsSelect()
|
||||
if !sel.IsTestOnly() {
|
||||
ctx.UpdateExpr(prev, inlined)
|
||||
return
|
||||
}
|
||||
opt.rewritePresenceExpr(ctx, prev, inlined, inlinedType)
|
||||
default:
|
||||
ctx.UpdateExpr(prev, inlined)
|
||||
}
|
||||
}
|
||||
|
||||
// rewritePresenceExpr converts the inlined expression, when it occurs within a has() macro, to type-safe
|
||||
// expression appropriate for the inlined type, if possible.
|
||||
//
|
||||
// If the rewrite is not possible an error is reported at the inline expression site.
|
||||
func (opt *inliningOptimizer) rewritePresenceExpr(ctx *OptimizerContext, prev, inlined ast.Expr, inlinedType *Type) {
|
||||
// If the input inlined expression is not a select expression it won't work with the has()
|
||||
// macro. Attempt to rewrite the presence test in terms of the typed input, otherwise error.
|
||||
if inlined.Kind() == ast.SelectKind {
|
||||
presenceTest, hasMacro := ctx.NewHasMacro(prev.ID(), inlined)
|
||||
ctx.UpdateExpr(prev, presenceTest)
|
||||
ctx.SetMacroCall(prev.ID(), hasMacro)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.ClearMacroCall(prev.ID())
|
||||
if inlinedType.IsAssignableType(NullType) {
|
||||
ctx.UpdateExpr(prev,
|
||||
ctx.NewCall(operators.NotEquals,
|
||||
inlined,
|
||||
ctx.NewLiteral(types.NullValue),
|
||||
))
|
||||
return
|
||||
}
|
||||
if inlinedType.HasTrait(traits.SizerType) {
|
||||
ctx.UpdateExpr(prev,
|
||||
ctx.NewCall(operators.NotEquals,
|
||||
ctx.NewMemberCall(overloads.Size, inlined),
|
||||
ctx.NewLiteral(types.IntZero),
|
||||
))
|
||||
return
|
||||
}
|
||||
ctx.ReportErrorAtID(prev.ID(), "unable to inline expression type %v into presence test", inlinedType)
|
||||
}
|
||||
|
||||
// isBindable indicates whether the inlined type can be used within a cel.bind() if the expression
|
||||
// being replaced occurs within a presence test. Value types with a size() method or field selection
|
||||
// support can be bound.
|
||||
//
|
||||
// In future iterations, support may also be added for indexer types which can be rewritten as an `in`
|
||||
// expression; however, this would imply a rewrite of the inlined expression that may not be necessary
|
||||
// in most cases.
|
||||
func isBindable(matches []ast.NavigableExpr, inlined ast.Expr, inlinedType *Type) bool {
|
||||
if inlinedType.IsAssignableType(NullType) ||
|
||||
inlinedType.HasTrait(traits.SizerType) {
|
||||
return true
|
||||
}
|
||||
for _, m := range matches {
|
||||
if m.Kind() != ast.SelectKind {
|
||||
continue
|
||||
}
|
||||
sel := m.AsSelect()
|
||||
if sel.IsTestOnly() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// matchVariable matches simple identifiers, select expressions, and presence test expressions
|
||||
// which match the (potentially) qualified variable name provided as input.
|
||||
//
|
||||
// Note, this function does not support inlining against select expressions which includes optional
|
||||
// field selection. This may be a future refinement.
|
||||
func (opt *inliningOptimizer) matchVariable(varName string) ast.ExprMatcher {
|
||||
return func(e ast.NavigableExpr) bool {
|
||||
if e.Kind() == ast.IdentKind && e.AsIdent() == varName {
|
||||
return true
|
||||
}
|
||||
if e.Kind() == ast.SelectKind {
|
||||
sel := e.AsSelect()
|
||||
// While the `ToQualifiedName` call could take the select directly, this
|
||||
// would skip presence tests from possible matches, which we would like
|
||||
// to include.
|
||||
qualName, found := containers.ToQualifiedName(sel.Operand())
|
||||
return found && qualName+"."+sel.FieldName() == varName
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user