From 28d878ed302b6726efee56b23ef95f18fb2f605f Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Thu, 7 Oct 2021 00:15:40 -0700 Subject: [PATCH] Update dependencies to publish SiteInfo (#1387) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 16 +- go.sum | 57 +- .../github.com/cloudevents/sdk-go/v2/alias.go | 5 + .../sdk-go/v2/binding/binary_writer.go | 5 + .../cloudevents/sdk-go/v2/binding/doc.go | 5 + .../cloudevents/sdk-go/v2/binding/encoding.go | 5 + .../sdk-go/v2/binding/event_message.go | 5 + .../sdk-go/v2/binding/finish_message.go | 5 + .../sdk-go/v2/binding/format/doc.go | 5 + .../sdk-go/v2/binding/format/format.go | 5 + .../cloudevents/sdk-go/v2/binding/message.go | 5 + .../sdk-go/v2/binding/spec/attributes.go | 5 + .../cloudevents/sdk-go/v2/binding/spec/doc.go | 5 + .../v2/binding/spec/match_exact_version.go | 5 + .../sdk-go/v2/binding/spec/spec.go | 5 + .../sdk-go/v2/binding/structured_writer.go | 5 + .../cloudevents/sdk-go/v2/binding/to_event.go | 5 + .../sdk-go/v2/binding/transformer.go | 5 + .../cloudevents/sdk-go/v2/binding/write.go | 5 + .../cloudevents/sdk-go/v2/client/client.go | 5 + .../sdk-go/v2/client/client_http.go | 5 + .../sdk-go/v2/client/client_observed.go | 5 + .../sdk-go/v2/client/defaulters.go | 5 + .../cloudevents/sdk-go/v2/client/doc.go | 5 + .../sdk-go/v2/client/http_receiver.go | 5 + .../cloudevents/sdk-go/v2/client/invoker.go | 5 + .../sdk-go/v2/client/observability.go | 5 + .../cloudevents/sdk-go/v2/client/options.go | 5 + .../cloudevents/sdk-go/v2/client/receiver.go | 5 + .../cloudevents/sdk-go/v2/context/context.go | 5 + .../cloudevents/sdk-go/v2/context/doc.go | 5 + .../cloudevents/sdk-go/v2/context/logger.go | 5 + .../cloudevents/sdk-go/v2/context/retry.go | 5 + .../sdk-go/v2/event/content_type.go | 5 + .../sdk-go/v2/event/data_content_encoding.go | 5 + .../sdk-go/v2/event/datacodec/codec.go | 5 + .../sdk-go/v2/event/datacodec/doc.go | 5 + .../sdk-go/v2/event/datacodec/json/data.go | 5 + .../sdk-go/v2/event/datacodec/json/doc.go | 5 + .../sdk-go/v2/event/datacodec/text/data.go | 5 + .../sdk-go/v2/event/datacodec/text/doc.go | 5 + .../sdk-go/v2/event/datacodec/xml/data.go | 5 + .../sdk-go/v2/event/datacodec/xml/doc.go | 5 + .../cloudevents/sdk-go/v2/event/doc.go | 5 + .../cloudevents/sdk-go/v2/event/event.go | 5 + .../cloudevents/sdk-go/v2/event/event_data.go | 5 + .../sdk-go/v2/event/event_interface.go | 5 + .../sdk-go/v2/event/event_marshal.go | 5 + .../sdk-go/v2/event/event_reader.go | 5 + .../sdk-go/v2/event/event_unmarshal.go | 5 + .../sdk-go/v2/event/event_validation.go | 5 + .../sdk-go/v2/event/event_writer.go | 5 + .../sdk-go/v2/event/eventcontext.go | 5 + .../sdk-go/v2/event/eventcontext_v03.go | 5 + .../v2/event/eventcontext_v03_reader.go | 5 + .../v2/event/eventcontext_v03_writer.go | 5 + .../sdk-go/v2/event/eventcontext_v1.go | 5 + .../sdk-go/v2/event/eventcontext_v1_reader.go | 5 + .../sdk-go/v2/event/eventcontext_v1_writer.go | 5 + .../cloudevents/sdk-go/v2/event/extensions.go | 5 + .../github.com/cloudevents/sdk-go/v2/go.mod | 2 +- .../github.com/cloudevents/sdk-go/v2/go.sum | 5 +- .../cloudevents/sdk-go/v2/protocol/doc.go | 5 + .../cloudevents/sdk-go/v2/protocol/error.go | 5 + .../v2/protocol/http/abuse_protection.go | 5 + .../sdk-go/v2/protocol/http/doc.go | 5 + .../sdk-go/v2/protocol/http/headers.go | 5 + .../sdk-go/v2/protocol/http/message.go | 5 + .../sdk-go/v2/protocol/http/options.go | 5 + .../sdk-go/v2/protocol/http/protocol.go | 22 +- .../v2/protocol/http/protocol_lifecycle.go | 5 + .../sdk-go/v2/protocol/http/protocol_retry.go | 5 + .../sdk-go/v2/protocol/http/result.go | 5 + .../sdk-go/v2/protocol/http/retries_result.go | 5 + .../sdk-go/v2/protocol/http/write_request.go | 5 + .../v2/protocol/http/write_responsewriter.go | 5 + .../cloudevents/sdk-go/v2/protocol/inbound.go | 5 + .../sdk-go/v2/protocol/lifecycle.go | 5 + .../sdk-go/v2/protocol/outbound.go | 5 + .../cloudevents/sdk-go/v2/protocol/result.go | 5 + .../cloudevents/sdk-go/v2/types/allocate.go | 5 + .../cloudevents/sdk-go/v2/types/doc.go | 5 + .../cloudevents/sdk-go/v2/types/timestamp.go | 5 + .../cloudevents/sdk-go/v2/types/uri.go | 5 + .../cloudevents/sdk-go/v2/types/uriref.go | 5 + .../cloudevents/sdk-go/v2/types/value.go | 5 + vendor/github.com/google/go-cmp/cmp/path.go | 2 +- .../google/go-cmp/cmp/report_compare.go | 4 +- .../google/go-cmp/cmp/report_slices.go | 227 +- vendor/github.com/nats-io/nats.go/.travis.yml | 6 +- vendor/github.com/nats-io/nats.go/README.md | 18 +- vendor/github.com/nats-io/nats.go/context.go | 21 +- vendor/github.com/nats-io/nats.go/go_test.mod | 4 +- vendor/github.com/nats-io/nats.go/go_test.sum | 68 +- vendor/github.com/nats-io/nats.go/js.go | 1529 ++++++++----- vendor/github.com/nats-io/nats.go/jsm.go | 59 +- vendor/github.com/nats-io/nats.go/nats.go | 358 ++- vendor/github.com/nats-io/nats.go/parser.go | 22 +- vendor/github.com/nats-io/nats.go/ws.go | 188 +- .../audit/api/v1/zz_generated.deepcopy.go | 1 + .../audit/lib/publisher.go | 57 + vendor/kmodules.xyz/client-go/Makefile | 2 +- .../auditor/v1alpha1/openapi_generated.go | 398 ++++ .../apis/auditor/v1alpha1/register.go | 1 + .../apis/auditor/v1alpha1/siteinfo_types.go | 105 + .../auditor/v1alpha1/zz_generated.deepcopy.go | 195 ++ .../crds/auditor.appscode.com_siteinfoes.yaml | 173 ++ .../custom-resources/util/siteinfo/lib.go | 166 ++ .../offshoot-api/api/v1/openapi_generated.go | 1 + .../api/v1/zz_generated.deepcopy.go | 1 + .../acme.cert-manager.io/v1/challenges.yaml | 2 +- .../acme.cert-manager.io/v1/orders.yaml | 2 +- .../v1/mutatingwebhookconfigurations.yaml | 2 +- .../v1/validatingwebhookconfigurations.yaml | 2 +- .../v1/customresourcedefinitions.yaml | 2 +- .../v1/apiservices.yaml | 2 +- .../app.k8s.io/v1beta1/applications.yaml | 2 +- .../v1alpha1/appbindings.yaml | 2 +- .../apps/v1/controllerrevisions.yaml | 2 +- .../apps/v1/daemonsets.yaml | 2 +- .../apps/v1/deployments.yaml | 2 +- .../apps/v1/replicasets.yaml | 2 +- .../apps/v1/statefulsets.yaml | 2 +- .../v1alpha1/siteinfoes.yaml | 202 ++ .../v1alpha1/auditsinks.yaml | 2 +- .../v1/tokenrequests.yaml | 2 +- .../v1/tokenreviews.yaml | 2 +- .../v1/localsubjectaccessreviews.yaml | 2 +- .../v1/selfsubjectaccessreviews.yaml | 2 +- .../v1/selfsubjectrulesreviews.yaml | 2 +- .../v1/subjectaccessreviews.yaml | 2 +- .../v1/verticalpodautoscalercheckpoints.yaml | 2 +- .../v1/verticalpodautoscalers.yaml | 2 +- .../v1alpha1/elasticsearchautoscalers.yaml | 2 +- .../v1alpha1/etcdautoscalers.yaml | 2 +- .../v1alpha1/mariadbautoscalers.yaml | 2 +- .../v1alpha1/memcachedautoscalers.yaml | 2 +- .../v1alpha1/mongodbautoscalers.yaml | 2 +- .../v1alpha1/mysqlautoscalers.yaml | 2 +- .../v1alpha1/perconaxtradbautoscalers.yaml | 2 +- .../v1alpha1/pgbouncerautoscalers.yaml | 2 +- .../v1alpha1/postgresautoscalers.yaml | 2 +- .../v1alpha1/proxysqlautoscalers.yaml | 2 +- .../v1alpha1/redisautoscalers.yaml | 2 +- .../verticalautoscalercheckpoints.yaml | 70 - .../v1alpha1/verticalautoscalers.yaml | 297 --- .../v2beta2/horizontalpodautoscalers.yaml | 2 +- .../batch/v1/cronjobs.yaml | 2 +- .../resourcedescriptors/batch/v1/jobs.yaml | 2 +- .../batch/v1beta1/cronjobs.yaml | 2 +- .../batch/v1beta1/jobtemplates.yaml | 2 +- .../v1alpha1/elasticsearchversions.yaml | 2 +- .../v1alpha1/etcdversions.yaml | 2 +- .../v1alpha1/mariadbversions.yaml | 9 +- .../v1alpha1/memcachedversions.yaml | 2 +- .../v1alpha1/mongodbversions.yaml | 2 +- .../v1alpha1/mysqlversions.yaml | 2 +- .../v1alpha1/perconaxtradbversions.yaml | 2 +- .../v1alpha1/pgbouncerversions.yaml | 2 +- .../v1alpha1/postgresversions.yaml | 2 +- .../v1alpha1/proxysqlversions.yaml | 2 +- .../v1alpha1/redisversions.yaml | 16 +- .../v1alpha1/vaultserverversions.yaml | 2 +- .../v1/certificaterequests.yaml | 2 +- .../cert-manager.io/v1/certificates.yaml | 2 +- .../cert-manager.io/v1/clusterissuers.yaml | 2 +- .../cert-manager.io/v1/issuers.yaml | 2 +- .../v1/certificatesigningrequests.yaml | 2 +- .../v1beta1/certificatesigningrequests.yaml | 2 +- .../cluster.x-k8s.io/v1alpha3/machines.yaml | 2 +- .../v1alpha3/machinesets.yaml | 2 +- .../coordination.k8s.io/v1/leases.yaml | 2 +- .../resourcedescriptors/core/v1/bindings.yaml | 2 +- .../core/v1/componentstatuses.yaml | 2 +- .../core/v1/configmaps.yaml | 2 +- .../core/v1/endpoints.yaml | 2 +- .../core/v1/ephemeralcontainers.yaml | 2 +- .../resourcedescriptors/core/v1/events.yaml | 2 +- .../core/v1/limitranges.yaml | 2 +- .../core/v1/namespaces.yaml | 2 +- .../resourcedescriptors/core/v1/nodes.yaml | 2 +- .../core/v1/persistentvolumeclaims.yaml | 2 +- .../core/v1/persistentvolumes.yaml | 2 +- .../hub/resourcedescriptors/core/v1/pods.yaml | 2 +- .../core/v1/podstatusresults.yaml | 2 +- .../core/v1/podtemplates.yaml | 2 +- .../core/v1/rangeallocations.yaml | 2 +- .../core/v1/replicationcontrollers.yaml | 2 +- .../core/v1/resourcequota.yaml | 2 +- .../core/v1/resourcequotas.yaml | 2 +- .../resourcedescriptors/core/v1/secrets.yaml | 2 +- .../core/v1/serviceaccounts.yaml | 2 +- .../resourcedescriptors/core/v1/services.yaml | 2 +- .../discovery.k8s.io/v1/endpointslice.yaml | 2 +- .../v1beta1/endpointslice.yaml | 2 +- .../v1beta1/endpointslices.yaml | 2 +- .../v1alpha1/awsaccesskeyrequests.yaml | 152 -- .../v1alpha1/awsroles.yaml | 13 +- .../v1alpha1/azureroles.yaml | 23 +- .../v1alpha1/elasticsearchroles.yaml | 41 +- .../v1alpha1/gcpaccesskeyrequests.yaml | 143 -- .../v1alpha1/gcproles.yaml | 21 +- .../v1alpha1/mongodbroles.yaml | 39 +- .../v1alpha1/mysqlroles.yaml | 39 +- .../v1alpha1/postgresroles.yaml | 39 +- ...equests.yaml => secretaccessrequests.yaml} | 62 +- .../v1alpha1/secretengines.yaml | 17 +- ...yrequests.yaml => secretrolebindings.yaml} | 66 +- .../events.k8s.io/v1/events.yaml | 2 +- .../events.k8s.io/v1beta1/events.yaml | 2 +- .../extensions/v1beta1/daemonsets.yaml | 2 +- .../extensions/v1beta1/deployments.yaml | 2 +- .../extensions/v1beta1/ingresses.yaml | 2 +- .../extensions/v1beta1/networkpolicies.yaml | 2 +- .../v1beta1/podsecuritypolicies.yaml | 2 +- .../extensions/v1beta1/replicasets.yaml | 2 +- .../extensions/v1beta1/scales.yaml | 2 +- .../v1alpha1/flowschemas.yaml | 2 +- .../v1alpha1/prioritylevelconfigurations.yaml | 2 +- .../v1beta1/flowschemas.yaml | 2 +- .../v1beta1/prioritylevelconfigurations.yaml | 2 +- .../v1alpha1/dashboards.yaml | 2 +- .../v1alpha1/dashboardtemplates.yaml | 2 +- .../v1alpha1/datasources.yaml | 2 +- .../v1alpha1/imagereviews.yaml | 2 +- .../v1alpha1/storageversions.yaml | 2 +- .../kubedb.com/v1alpha2/elasticsearches.yaml | 4 +- .../kubedb.com/v1alpha2/etcds.yaml | 4 +- .../kubedb.com/v1alpha2/mariadbs.yaml | 85 +- .../kubedb.com/v1alpha2/memcacheds.yaml | 4 +- .../kubedb.com/v1alpha2/mongodbs.yaml | 85 +- .../kubedb.com/v1alpha2/mysqls.yaml | 85 +- .../kubedb.com/v1alpha2/perconaxtradbs.yaml | 4 +- .../kubedb.com/v1alpha2/pgbouncers.yaml | 4 +- .../kubedb.com/v1alpha2/postgreses.yaml | 104 +- .../kubedb.com/v1alpha2/proxysqls.yaml | 4 +- .../kubedb.com/v1alpha2/redises.yaml | 93 +- .../kubedb.com/v1alpha2/redissentinels.yaml | 1928 +++++++++++++++++ .../kubevault.com/v1alpha1/vaultservers.yaml | 112 +- .../v1alpha1/resourcedescriptors.yaml | 2 +- .../v1alpha1/metricsconfigurations.yaml | 355 +++ .../v1/alertmanagers.yaml | 2 +- .../monitoring.coreos.com/v1/podmonitors.yaml | 2 +- .../monitoring.coreos.com/v1/probes.yaml | 2 +- .../v1/prometheuses.yaml | 2 +- .../v1/prometheusrules.yaml | 2 +- .../v1/servicemonitors.yaml | 2 +- .../v1/thanosrulers.yaml | 2 +- .../v1alpha1/alertmanagerconfigs.yaml | 2 +- .../networking.k8s.io/v1/ingressclasses.yaml | 2 +- .../networking.k8s.io/v1/ingresses.yaml | 2 +- .../networking.k8s.io/v1/networkpolicies.yaml | 2 +- .../v1beta1/ingressclasses.yaml | 2 +- .../networking.k8s.io/v1beta1/ingresses.yaml | 2 +- .../node.k8s.io/v1/runtimeclasses.yaml | 2 +- .../node.k8s.io/v1beta1/runtimeclasses.yaml | 2 +- .../v1alpha1/elasticsearchopsrequests.yaml | 2 +- .../v1alpha1/etcdopsrequests.yaml | 2 +- .../v1alpha1/mariadbopsrequests.yaml | 2 +- .../v1alpha1/memcachedopsrequests.yaml | 2 +- .../v1alpha1/mongodbopsrequests.yaml | 2 +- .../v1alpha1/mysqlopsrequests.yaml | 2 +- .../v1alpha1/perconaxtradbopsrequests.yaml | 2 +- .../v1alpha1/pgbounceropsrequests.yaml | 2 +- .../v1alpha1/postgresopsrequests.yaml | 2 +- .../v1alpha1/proxysqlopsrequests.yaml | 2 +- .../v1alpha1/redisopsrequests.yaml | 2 +- .../v1alpha1/vaultpolicies.yaml | 2 +- .../v1alpha1/vaultpolicybindings.yaml | 2 +- .../policy/v1beta1/evictions.yaml | 2 +- .../policy/v1beta1/poddisruptionbudgets.yaml | 2 +- .../policy/v1beta1/podsecuritypolicies.yaml | 2 +- .../v1/clusterrolebindings.yaml | 2 +- .../v1/clusterroles.yaml | 2 +- .../v1/rolebindings.yaml | 2 +- .../rbac.authorization.k8s.io/v1/roles.yaml | 2 +- .../v1alpha1/snapshots.yaml | 2 +- .../scheduling.k8s.io/v1/priorityclasses.yaml | 2 +- .../v1alpha1/secretproviderclasses.yaml | 5 + .../secretproviderclasspodstatuses.yaml | 5 + .../settings.k8s.io/v1alpha1/podpresets.yaml | 2 +- .../v1/volumesnapshotclasses.yaml | 2 +- .../v1/volumesnapshotcontents.yaml | 2 +- .../v1/volumesnapshots.yaml | 2 +- .../v1alpha1/recoveries.yaml | 2 +- .../v1alpha1/repositories.yaml | 2 +- .../stash.appscode.com/v1alpha1/restics.yaml | 2 +- .../v1beta1/backupbatches.yaml | 2 +- .../v1beta1/backupblueprints.yaml | 2 +- .../v1beta1/backupconfigurations.yaml | 2 +- .../v1beta1/backupsessions.yaml | 2 +- .../stash.appscode.com/v1beta1/functions.yaml | 2 +- .../v1beta1/restorebatches.yaml | 2 +- .../v1beta1/restoresessions.yaml | 2 +- .../stash.appscode.com/v1beta1/tasks.yaml | 2 +- .../storage.k8s.io/v1/csidrivers.yaml | 2 +- .../storage.k8s.io/v1/csinodes.yaml | 2 +- .../storage.k8s.io/v1/storageclasses.yaml | 2 +- .../storage.k8s.io/v1/volumeattachments.yaml | 2 +- .../v1beta1/csistoragecapacities.yaml | 2 +- .../voyager.appscode.com/v1/ingresses.yaml | 203 +- .../v1beta1/certificates.yaml | 155 -- .../v1beta1/ingresses.yaml | 199 +- vendor/kmodules.xyz/resource-metrics/LICENSE | 201 ++ .../resource-metrics/api/constants.go | 33 + .../kmodules.xyz/resource-metrics/api/doc.go | 17 + .../resource-metrics/api/interface.go | 122 ++ .../resource-metrics/api/plugins.go | 69 + .../resource-metrics/api/utils.go | 279 +++ vendor/modules.txt | 27 +- 310 files changed, 7711 insertions(+), 2151 deletions(-) create mode 100644 vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go create mode 100644 vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfoes.yaml create mode 100644 vendor/kmodules.xyz/custom-resources/util/siteinfo/lib.go create mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditor.appscode.com/v1alpha1/siteinfoes.yaml delete mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalercheckpoints.yaml delete mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalers.yaml delete mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsaccesskeyrequests.yaml delete mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcpaccesskeyrequests.yaml rename vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/{databaseaccessrequests.yaml => secretaccessrequests.yaml} (71%) rename vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/{azureaccesskeyrequests.yaml => secretrolebindings.yaml} (76%) create mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redissentinels.yaml create mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml delete mode 100644 vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/certificates.yaml create mode 100644 vendor/kmodules.xyz/resource-metrics/LICENSE create mode 100644 vendor/kmodules.xyz/resource-metrics/api/constants.go create mode 100644 vendor/kmodules.xyz/resource-metrics/api/doc.go create mode 100644 vendor/kmodules.xyz/resource-metrics/api/interface.go create mode 100644 vendor/kmodules.xyz/resource-metrics/api/plugins.go create mode 100644 vendor/kmodules.xyz/resource-metrics/api/utils.go diff --git a/go.mod b/go.mod index 7e8b1eae5..5cbe95579 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.15 require ( github.com/cenkalti/backoff v2.2.1+incompatible github.com/gogo/protobuf v1.3.2 + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/kubernetes-csi/external-snapshotter/client/v4 v4.1.0 github.com/onsi/ginkgo v1.16.4 github.com/onsi/gomega v1.13.0 @@ -13,7 +14,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 - go.bytebuilders.dev/audit v0.0.7 + go.bytebuilders.dev/audit v0.0.8 go.bytebuilders.dev/license-verifier v0.9.3 go.bytebuilders.dev/license-verifier/kubernetes v0.9.3 gomodules.xyz/blobfs v0.1.7 @@ -36,15 +37,14 @@ require ( k8s.io/klog/v2 v2.8.0 k8s.io/kube-aggregator v0.21.1 k8s.io/kubernetes v1.21.1 - kmodules.xyz/client-go v0.0.0-20210921150324-f005c6dfcb32 + kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6 kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278 - kmodules.xyz/custom-resources v0.0.0-20210829135624-c63be82e13c0 - kmodules.xyz/objectstore-api v0.0.0-20210829122106-d39859fc2d56 - kmodules.xyz/offshoot-api v0.0.0-20210804100837-d0388be3e60d + kmodules.xyz/custom-resources v0.0.0-20211007064058-70fba50e58a4 + kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e + kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61 kmodules.xyz/openshift v0.0.0-20210618001443-f2507caa512f kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027 - kmodules.xyz/resource-metadata v0.5.8-0.20210829123359-8f6a3d706da5 // indirect - kmodules.xyz/webhook-runtime v0.0.0-20210829120758-f6ab57afa7e4 + kmodules.xyz/webhook-runtime v0.0.0-20210928141616-7f73c2ab318a stash.appscode.dev/apimachinery v0.15.1-0.20211001093145-5e773145f153 ) @@ -153,3 +153,5 @@ replace k8s.io/utils => k8s.io/utils v0.0.0-20201110183641-67b214c5f920 replace sigs.k8s.io/application => github.com/kmodules/application v0.8.4-0.20210427030912-90eeee3bc4ad replace github.com/satori/go.uuid => github.com/gofrs/uuid v4.0.0+incompatible + +replace github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt v3.2.1+incompatible diff --git a/go.sum b/go.sum index 39f0a9f0d..a52264eaf 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= -github.com/cloudevents/sdk-go/v2 v2.4.1 h1:rZJoz9QVLbWQmnvLPDFEmv17Czu+CfSPwMO6lhJ72xQ= -github.com/cloudevents/sdk-go/v2 v2.4.1/go.mod h1:MZiMwmAh5tGj+fPFvtHv9hKurKqXtdB9haJYMJ/7GJY= +github.com/cloudevents/sdk-go/v2 v2.5.0 h1:Ts6aLHbBUJfcNcZ4ouAfJ4+Np7SE1Yf2w4ADKRCd7Fo= +github.com/cloudevents/sdk-go/v2 v2.5.0/go.mod h1:nlXhgFkf0uTopxmRXalyMwS2LG70cRGPrxzmjJgSG0U= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -195,9 +195,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= @@ -295,10 +292,13 @@ github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPh github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v0.0.0-20210429001901-424d2337a529 h1:2voWjNECnrZRbfwXxHB1/j8wa6xdKn85B5NzgVL/pTU= -github.com/golang/glog v0.0.0-20210429001901-424d2337a529/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -324,8 +324,9 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-replayers/grpcreplay v0.1.0 h1:eNb1y9rZFmY4ax45uEEECSa8fsxGRU+8Bil52ASAwic= github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= @@ -563,8 +564,8 @@ github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.11.0 h1:L263PZkrmkRJRJT2YHU8GwWWvEvmr9/LUKuJTXsF32k= -github.com/nats-io/nats.go v1.11.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nats.go v1.12.3 h1:te0GLbRsjtejEkZKKiuk46tbfIn6FfCSv3WWSo1+51E= +github.com/nats-io/nats.go v1.12.3/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= @@ -643,7 +644,6 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.47.0/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.47.0/go.mod h1:k4BrWlVQQsvBiTcDnKEMgyh/euRxyxgrHdur/ZX/sdA= github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -771,9 +771,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -go.bytebuilders.dev/audit v0.0.7 h1:3w+ofpc59DNeWhvrwtrgRoIQGwEhAyqHZtvxCX1J3CU= -go.bytebuilders.dev/audit v0.0.7/go.mod h1:pLOah94jc2oS62e8woosk7EAOHLyS0qkI4bGth18qyA= -go.bytebuilders.dev/license-verifier v0.9.2/go.mod h1:0sBh2Y3jcTLQYeV9ySbBgN5Ibatp6aNtvH/gI1ZFXCk= +go.bytebuilders.dev/audit v0.0.8 h1:Zcu+OPnyIJEWjWGbu7ZyVwk0UnRhvsaXMwhn4zUS/KM= +go.bytebuilders.dev/audit v0.0.8/go.mod h1:EsnAMS2ehBznxHrEYx1LuEQfYZc9SYBxqrmWRJgZ4VI= go.bytebuilders.dev/license-verifier v0.9.3 h1:foHyjil3Y2OesjUInQZeRl5kntWWCPkqqQOz1wSAmLo= go.bytebuilders.dev/license-verifier v0.9.3/go.mod h1:GpIW0o8O0wpiBVt7IIz4z7bcPuG8nza8/bCDkaupDn8= go.bytebuilders.dev/license-verifier/kubernetes v0.9.3 h1:rrgo72xtiEEyE0exFSQ8HMpQpxt+hpJW2a9QWOkk4n4= @@ -1053,7 +1052,6 @@ gomodules.xyz/encoding v0.0.2 h1:tK8zLuf6fvycbc1nlGGpQkr5HPr+sVI/VdDossnKKsw= gomodules.xyz/encoding v0.0.2/go.mod h1:ZD+5Llh/9P/xTqoiurjs2w3XfAV2jNtsh04FbucIpLw= gomodules.xyz/envsubst v0.1.0 h1:xvS0A4NeRwa8y3qW/+jgc13nT3rW1nlcuePDJujHzBM= gomodules.xyz/envsubst v0.1.0/go.mod h1:2o5f7bd13XIITbE2ZKieE05YkqB2KDoZkqKccGebduA= -gomodules.xyz/flags v0.1.0/go.mod h1:H9lmar5MMXuxHBrSgrGZt4q2gkD+8GCm/3Fs2FCE2zA= gomodules.xyz/flags v0.1.2 h1:z/XHHGmduLYY/aSkzcQWJgXWIs3TCTSTLkmwtCjoizg= gomodules.xyz/flags v0.1.2/go.mod h1:CIzWYc2zYDs5lQyGJsjhqKgIj+LriNLpiYuX8Pk34gc= gomodules.xyz/go-sh v0.1.0 h1:1BJAuGREh2RhePt7HRrpmjnkbgfpXlCzc42SiyZ5dkc= @@ -1066,7 +1064,6 @@ gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gomodules.xyz/jsonpath v0.0.1 h1:iSVuNrGuLPgxQtHCX/8LK2kizjJSqCZR7PM1iKSV2oU= gomodules.xyz/jsonpath v0.0.1/go.mod h1:du28vmLHrgEV48JqK/7rn92YHsVDoQuqrowb2w6YZmE= -gomodules.xyz/kglog v0.0.4/go.mod h1:yjAPb3e0axQl6itwq8EgCYIGOcnMe4FfHPihUM7fRsc= gomodules.xyz/logs v0.0.4 h1:r/NdZwGa5znX2VhtvzFr9FhqhRO19Hei4dSlSrrn71o= gomodules.xyz/logs v0.0.4/go.mod h1:GRwztZB2qW4vSV/9KZR2DKFhAwyn1w/S7s4bfnV1jqo= gomodules.xyz/mergo v0.3.13-0.20210702100041-9d62ff8ece4d h1:i6r7bk2jF965W3xmORgz+KYhlH608oRvrAPpcNHorlo= @@ -1081,7 +1078,6 @@ gomodules.xyz/pointer v0.1.0/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqopl gomodules.xyz/runtime v0.2.0 h1:fzoGf/lnQ2F/rakbCjNfrZZFiNQ8XVLrR5YrtuhrtkU= gomodules.xyz/runtime v0.2.0/go.mod h1:/R/Dw906YIUHKJ5cfKUaJgJrojFjpRU+n0s3Wjn1tqs= gomodules.xyz/sets v0.0.0-20200930152147-4f4543544799/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= -gomodules.xyz/sets v0.0.0-20210218105342-2efe2fb519a2/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= gomodules.xyz/sets v0.1.0/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= gomodules.xyz/sets v0.2.0 h1:T8YPBWDaPGh/+HBjfL2JYdWeNqxNMoMofEdlvhLKE9w= gomodules.xyz/sets v0.2.0/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= @@ -1220,29 +1216,32 @@ kmodules.xyz/client-go v0.0.0-20210617233340-13d22e91512b/go.mod h1:A6GAK6xP5zBu kmodules.xyz/client-go v0.0.0-20210715065708-d4f0cc74ead1/go.mod h1:E/vGngai00UtVwP8R4PWpPUBF/EZa6Ub9WS5+tVcs4M= kmodules.xyz/client-go v0.0.0-20210719120358-dd0503cf99cf/go.mod h1:E/vGngai00UtVwP8R4PWpPUBF/EZa6Ub9WS5+tVcs4M= kmodules.xyz/client-go v0.0.0-20210822203828-5e9cebbf1dfa/go.mod h1:0gkPeALtYjB27OHt4rd6+ZmMgoVTHVLtEJQeU23/gtA= -kmodules.xyz/client-go v0.0.0-20210921150324-f005c6dfcb32 h1:ZXVJStHHjppRoaUw5JQ5KzMjK+EiY1GkcPigPHfkvSg= kmodules.xyz/client-go v0.0.0-20210921150324-f005c6dfcb32/go.mod h1:0gkPeALtYjB27OHt4rd6+ZmMgoVTHVLtEJQeU23/gtA= +kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6 h1:o+SymmN26C8bqh1nLTFjT0UdOtAYrTLbp6v49iRe5MY= +kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6/go.mod h1:0gkPeALtYjB27OHt4rd6+ZmMgoVTHVLtEJQeU23/gtA= kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278 h1:sFmqh4EaiZ4K2FkkGvrDFddstq8GSf6ogH24IAsuKew= kmodules.xyz/constants v0.0.0-20210218100002-2c304bfda278/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY= kmodules.xyz/crd-schema-fuzz v0.0.0-20210618002152-fae23aef5fb4/go.mod h1:IIkUctlfoptoci0BOrsUf8ya+MOG5uaeh1PE4uzaIbA= -kmodules.xyz/custom-resources v0.0.0-20210829135624-c63be82e13c0 h1:sCzXaZ9wWsKjOF/j4mTd8zeAXhd6BWZrdKJ8Dr6c++U= kmodules.xyz/custom-resources v0.0.0-20210829135624-c63be82e13c0/go.mod h1:VYtz1fgHgLqCk+sdSUGBClfZfJ6z4873wB5MYOXxpS8= -kmodules.xyz/monitoring-agent-api v0.0.0-20210618005119-a8c212adc2bf/go.mod h1:QsbPe5SefM7XmLzJgdMX/1iXxwqAC1Do1eHa98TCq3k= -kmodules.xyz/objectstore-api v0.0.0-20210829122106-d39859fc2d56 h1:hAROzfrhdJPMDJ8tKnwSSt4WIe+OdQobS0gmSo+VhyA= +kmodules.xyz/custom-resources v0.0.0-20211007064058-70fba50e58a4 h1:mRmwqv3kQTzL9/kccHztRJFZU2Ks2MHhIxBJi3yQi6w= +kmodules.xyz/custom-resources v0.0.0-20211007064058-70fba50e58a4/go.mod h1:pGabego8q4oi/2sNjhdtFkgVaVw4AyGv14GO6VtAjTw= kmodules.xyz/objectstore-api v0.0.0-20210829122106-d39859fc2d56/go.mod h1:Tkcf9uTplnrJ6C8o0zlw2kpgS1SaWAiMO5P2YgLjTo8= -kmodules.xyz/offshoot-api v0.0.0-20210618005544-5217a24765da/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns= -kmodules.xyz/offshoot-api v0.0.0-20210804100837-d0388be3e60d h1:RXuVF3wMeqR+GMgZA7nK2WnsJ63pCnz56KyQpu+0obQ= +kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e h1:2QZBUcUI6r7mLU5/9+Xxd1eDClEIEkZkJlyCU91UoY8= +kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e/go.mod h1:Tkcf9uTplnrJ6C8o0zlw2kpgS1SaWAiMO5P2YgLjTo8= kmodules.xyz/offshoot-api v0.0.0-20210804100837-d0388be3e60d/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns= +kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61 h1:J56UGmRFddu6tERRd8BELmP5QbXxievzb+6vAjFptiM= +kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns= kmodules.xyz/openshift v0.0.0-20210618001443-f2507caa512f h1:V1lapZtGG7GntoUsOuEz2kWPXv6scMzJxS+3NaHIUzc= kmodules.xyz/openshift v0.0.0-20210618001443-f2507caa512f/go.mod h1:8E5ckbd1KMNmR4hc7ScvmQnGfx1ULUUp+UTmoDdxRkc= kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027 h1:rtSPsruEkoBOLcbJkxMQjnPafpv8/vJnfWlTIj9yRBg= kmodules.xyz/prober v0.0.0-20210618020259-5836fb959027/go.mod h1:H4NcvS1RQxeXtQONALbU6r9OT3Xa7cMhfamX/k9t9wo= -kmodules.xyz/resource-metadata v0.5.7/go.mod h1:Jdi7zBXRwwFTOR0CxwKxqJhsDVIilhrgNipPjnKLyrs= -kmodules.xyz/resource-metadata v0.5.8-0.20210829123359-8f6a3d706da5 h1:GAU2SZIGQv3IEoozJCdA63eBnGMA+AXqIxx8UkUa44c= -kmodules.xyz/resource-metadata v0.5.8-0.20210829123359-8f6a3d706da5/go.mod h1:FpXWUvVESesHlaexlwqQvdI5Vtl8DCBcmBPWTVpiyn0= -kmodules.xyz/resource-metrics v0.0.1/go.mod h1:5nlhi7MPPr09m7VblezHSz9cE1fuUypOSLlo+aN5mrA= -kmodules.xyz/webhook-runtime v0.0.0-20210829120758-f6ab57afa7e4 h1:8msmdEqIfVOhnbI+U5trieT+6lWhi4Z3XNETh3v6oyo= -kmodules.xyz/webhook-runtime v0.0.0-20210829120758-f6ab57afa7e4/go.mod h1:MFZFmJk9IXNHwq8JlF/mukwBDbopFQj4swaB2MWHc/U= +kmodules.xyz/resource-metadata v0.6.3 h1:rs0hIj+77HkImXyV8WSWT8DI1Cu/y9/hT8h5KtPutbI= +kmodules.xyz/resource-metadata v0.6.3/go.mod h1:KWf68Ado/hgYpb/msYNvhYSLWvS/bJcVAAHO1/q9nNg= +kmodules.xyz/resource-metrics v0.0.3/go.mod h1:6Dv63HDgp83DhA+lZNB7GIQR6PLjNrYW6ghQKioQzII= +kmodules.xyz/resource-metrics v0.0.5 h1:an1eaxw8mWX5RfujUMTTkJPGiMlQQUDzT6aveSGNAq8= +kmodules.xyz/resource-metrics v0.0.5/go.mod h1:6Dv63HDgp83DhA+lZNB7GIQR6PLjNrYW6ghQKioQzII= +kmodules.xyz/webhook-runtime v0.0.0-20210928141616-7f73c2ab318a h1:kSTJu+yNGkQ4tdBeR0yMXZopI4CAMJh5uFafaE1Cr9k= +kmodules.xyz/webhook-runtime v0.0.0-20210928141616-7f73c2ab318a/go.mod h1:MFZFmJk9IXNHwq8JlF/mukwBDbopFQj4swaB2MWHc/U= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= diff --git a/vendor/github.com/cloudevents/sdk-go/v2/alias.go b/vendor/github.com/cloudevents/sdk-go/v2/alias.go index 332cb67c1..e7ed3a357 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/alias.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/alias.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + // Package v2 reexports a subset of the SDK v2 API. package v2 diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go index a99cd0b70..97f2c4dd7 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go index 1176fad80..8fa999789 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package binding defines interfaces for protocol bindings. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go index 0b6efe636..16611a3d7 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import "errors" diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go index 130327d45..f82c729c4 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go index 17445bfe5..8b51c4c61 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import "github.com/cloudevents/sdk-go/v2/binding/spec" diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go index ab153afbb..54c3f1a8c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package format formats structured events. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go index 9e2b1ec67..2d840025e 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package format import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go index ce239556c..e30e150c0 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go index 20ec1ce92..3c3021d46 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package spec import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go index 38d6fddf9..44c0b3145 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package spec provides spec-version metadata. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go index 5976faf12..110787ddc 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package spec import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go index 4de589185..7fa0f5840 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package spec import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go index 8cf2bbe3e..60256f2b3 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go index 5f76e3ef2..339a7833c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go index 6ab4f1e5d..de3bec44f 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding // Transformer is an interface that implements a transformation diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go index ff7cf5fb7..cb498e62d 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package binding import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/client.go b/vendor/github.com/cloudevents/sdk-go/v2/client/client.go index 088d88f78..0be62d7fc 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/client.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/client.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go b/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go index 13e0d6430..d48cc2042 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go b/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go index 83edc953b..82985b8a7 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client // NewObserved produces a new client with the provided transport object and applied diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go b/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go index 5d0d7bc94..7bfebf35c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go index a6a602bb4..e09962ce6 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package client holds the recommended entry points for interacting with the CloudEvents Golang SDK. The client wraps a selected transport. The client adds validation and defaulting for sending events, and flexible receiver method diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go b/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go index d926bd309..94a4b4e65 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go b/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go index 1d812a78d..e6d11f55f 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go b/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go index 4ffb83433..75005d3bb 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/options.go b/vendor/github.com/cloudevents/sdk-go/v2/client/options.go index a1facfc23..d0fe9dbaa 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/options.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/options.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go b/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go index 0d2dbf474..b1ab532d7 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package client import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/context.go b/vendor/github.com/cloudevents/sdk-go/v2/context/context.go index f9843dd61..fc9ef0315 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/context/context.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/context/context.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package context import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go index 377cab850..0b2dcaf70 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package context holds the last resort overrides and fyi objects that can be passed to clients and transports added to context.Context objects. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go b/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go index 996f72057..b3087a79f 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package context import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go b/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go index f590d4662..ec17df72e 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package context import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go b/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go index 591878e5d..a49522f82 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event const ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go b/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go index 24c4094fc..cf2152693 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event const ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go index fd68ca559..3e077740b 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package datacodec import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go index 9e401534e..b681af887 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package datacodec holds the data codec registry and adds known encoders and decoders supporting media types such as `application/json` and `application/xml`. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go index f40869b34..734ade59f 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package json import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go index 86772c2e3..33e1323c7 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package json holds the encoder/decoder implementation for `application/json`. */ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go index 5e6ddc080..761a10113 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package text import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go index 13316702e..af10577aa 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package text holds the encoder/decoder implementation for `text/plain`. */ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go index 13045e03d..de68ec3dc 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package xml import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go index d90b7c444..c8d73213f 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package xml holds the encoder/decoder implementation for `application/xml`. */ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go index eebbeb4ef..31c22ce67 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package event provides primitives to work with CloudEvents specification: https://github.com/cloudevents/spec. */ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event.go index 3860f8873..94b5aa0ad 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go index c85fe7e52..0f1831482 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go index af87454d8..2809fed57 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go index 8ec489bb1..c5f2dc03c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go index 86ca609b4..9d1aeeb65 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go index 60473e60e..138c398ab 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go index b5759fa4e..958ecc47d 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go index 00018cbdb..ddfb1be38 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go index 2d0611215..a39565afa 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import "time" diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go index c626311df..561f4c5df 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go index 5e6dbd831..2cd27a705 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go index 94748c67c..5d664635e 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go index 6695e1509..01f97586f 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go index eef6f4ef5..74f73b029 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go index 1ec29e65e..5f2aca763 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go b/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go index 3d0210fb0..6c4193f34 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package event import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/go.mod b/vendor/github.com/cloudevents/sdk-go/v2/go.mod index e530c108c..40a2d282b 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/go.mod +++ b/vendor/github.com/cloudevents/sdk-go/v2/go.mod @@ -3,7 +3,7 @@ module github.com/cloudevents/sdk-go/v2 go 1.14 require ( - github.com/google/go-cmp v0.4.0 + github.com/google/go-cmp v0.5.0 github.com/google/uuid v1.1.1 github.com/json-iterator/go v1.1.10 github.com/kr/text v0.2.0 // indirect diff --git a/vendor/github.com/cloudevents/sdk-go/v2/go.sum b/vendor/github.com/cloudevents/sdk-go/v2/go.sum index a1b600382..b893d87b1 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/go.sum +++ b/vendor/github.com/cloudevents/sdk-go/v2/go.sum @@ -2,15 +2,14 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go index d14bf7f98..f826a1841 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package protocol defines interfaces to decouple the client package from protocol implementations. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go index 0c9530d19..a3f335261 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package protocol import "fmt" diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go index eb004101f..89222a20c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go index 5c04b88af..3428ea387 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package http implements an HTTP binding using net/http module */ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go index 527395ab7..055a5c4dd 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go index 44ef42948..e7e51d034 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go index 2ec0a5812..55031939c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go index 6a4a8dd38..a17028795 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go @@ -1,6 +1,12 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( + "bytes" "context" "errors" "fmt" @@ -134,7 +140,21 @@ func (p *Protocol) Send(ctx context.Context, m binding.Message, transformers ... return fmt.Errorf("nil Message") } - _, err := p.Request(ctx, m, transformers...) + msg, err := p.Request(ctx, m, transformers...) + if msg != nil { + defer func() { _ = msg.Finish(err) }() + } + if err != nil && !protocol.IsACK(err) { + var res *Result + if protocol.ResultAs(err, &res) { + if message, ok := msg.(*Message); ok { + buf := new(bytes.Buffer) + buf.ReadFrom(message.BodyReader) + errorStr := buf.String() + err = NewResult(res.StatusCode, "%s", errorStr) + } + } + } return err } diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go index 70c15b07c..dacfd30f6 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go index bfb1f5af2..fb7bcd27e 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go index 149e6872c..7a0b2626c 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go index 0f25f7059..f4046d522 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go index e0c0d3072..43ad36180 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go index 9646ca49f..41385dab1 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package http import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go index 39181771f..e7a74294d 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package protocol import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go index 22ae08e09..4a058c962 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package protocol import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go index b0a87761e..e44fa432a 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package protocol import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go index 25f4d5654..eae64e018 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package protocol import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go b/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go index c38f71177..814626874 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package types import "reflect" diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go index b1d9c29da..cf7a94f35 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + /* Package types implements the CloudEvents type system. diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go b/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go index 3ae1c7def..ff049727d 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package types import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go b/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go index 4ada9178d..bed608094 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package types import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go b/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go index e19a1dbb7..22fa12314 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package types import ( diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/value.go b/vendor/github.com/cloudevents/sdk-go/v2/types/value.go index adfbdd687..f643d0aa5 100644 --- a/vendor/github.com/cloudevents/sdk-go/v2/types/value.go +++ b/vendor/github.com/cloudevents/sdk-go/v2/types/value.go @@ -1,3 +1,8 @@ +/* + Copyright 2021 The CloudEvents Authors + SPDX-License-Identifier: Apache-2.0 +*/ + package types import ( diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go index 3d45c1a47..f01eff318 100644 --- a/vendor/github.com/google/go-cmp/cmp/path.go +++ b/vendor/github.com/google/go-cmp/cmp/path.go @@ -315,7 +315,7 @@ func (tf Transform) Option() Option { return tf.trans } // pops the address from the stack. Thus, when traversing into a pointer from // reflect.Ptr, reflect.Slice element, or reflect.Map, we can detect cycles // by checking whether the pointer has already been visited. The cycle detection -// uses a seperate stack for the x and y values. +// uses a separate stack for the x and y values. // // If a cycle is detected we need to determine whether the two pointers // should be considered equal. The definition of equality chosen by Equal diff --git a/vendor/github.com/google/go-cmp/cmp/report_compare.go b/vendor/github.com/google/go-cmp/cmp/report_compare.go index a6c070cfc..104bb3053 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_compare.go +++ b/vendor/github.com/google/go-cmp/cmp/report_compare.go @@ -79,7 +79,7 @@ func (opts formatOptions) verbosity() uint { } } -const maxVerbosityPreset = 3 +const maxVerbosityPreset = 6 // verbosityPreset modifies the verbosity settings given an index // between 0 and maxVerbosityPreset, inclusive. @@ -100,7 +100,7 @@ func verbosityPreset(opts formatOptions, i int) formatOptions { func (opts formatOptions) FormatDiff(v *valueNode, ptrs *pointerReferences) (out textNode) { if opts.DiffMode == diffIdentical { opts = opts.WithVerbosity(1) - } else { + } else if opts.verbosity() < 3 { opts = opts.WithVerbosity(3) } diff --git a/vendor/github.com/google/go-cmp/cmp/report_slices.go b/vendor/github.com/google/go-cmp/cmp/report_slices.go index da04caf16..2ad3bc85b 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_slices.go +++ b/vendor/github.com/google/go-cmp/cmp/report_slices.go @@ -7,6 +7,7 @@ package cmp import ( "bytes" "fmt" + "math" "reflect" "strconv" "strings" @@ -26,8 +27,6 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false // No differences detected case !v.ValueX.IsValid() || !v.ValueY.IsValid(): return false // Both values must be valid - case v.Type.Kind() == reflect.Slice && (v.ValueX.Len() == 0 || v.ValueY.Len() == 0): - return false // Both slice values have to be non-empty case v.NumIgnored > 0: return false // Some ignore option was used case v.NumTransformed > 0: @@ -45,7 +44,16 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false } - switch t := v.Type; t.Kind() { + // Check whether this is an interface with the same concrete types. + t := v.Type + vx, vy := v.ValueX, v.ValueY + if t.Kind() == reflect.Interface && !vx.IsNil() && !vy.IsNil() && vx.Elem().Type() == vy.Elem().Type() { + vx, vy = vx.Elem(), vy.Elem() + t = vx.Type() + } + + // Check whether we provide specialized diffing for this type. + switch t.Kind() { case reflect.String: case reflect.Array, reflect.Slice: // Only slices of primitive types have specialized handling. @@ -57,6 +65,11 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { return false } + // Both slice values have to be non-empty. + if t.Kind() == reflect.Slice && (vx.Len() == 0 || vy.Len() == 0) { + return false + } + // If a sufficient number of elements already differ, // use specialized formatting even if length requirement is not met. if v.NumDiff > v.NumSame { @@ -68,7 +81,7 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { // Use specialized string diffing for longer slices or strings. const minLength = 64 - return v.ValueX.Len() >= minLength && v.ValueY.Len() >= minLength + return vx.Len() >= minLength && vy.Len() >= minLength } // FormatDiffSlice prints a diff for the slices (or strings) represented by v. @@ -77,17 +90,23 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { assert(opts.DiffMode == diffUnknown) t, vx, vy := v.Type, v.ValueX, v.ValueY + if t.Kind() == reflect.Interface { + vx, vy = vx.Elem(), vy.Elem() + t = vx.Type() + opts = opts.WithTypeMode(emitType) + } // Auto-detect the type of the data. - var isLinedText, isText, isBinary bool var sx, sy string + var ssx, ssy []string + var isString, isMostlyText, isPureLinedText, isBinary bool switch { case t.Kind() == reflect.String: sx, sy = vx.String(), vy.String() - isText = true // Initial estimate, verify later + isString = true case t.Kind() == reflect.Slice && t.Elem() == reflect.TypeOf(byte(0)): sx, sy = string(vx.Bytes()), string(vy.Bytes()) - isBinary = true // Initial estimate, verify later + isString = true case t.Kind() == reflect.Array: // Arrays need to be addressable for slice operations to work. vx2, vy2 := reflect.New(t).Elem(), reflect.New(t).Elem() @@ -95,13 +114,12 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { vy2.Set(vy) vx, vy = vx2, vy2 } - if isText || isBinary { - var numLines, lastLineIdx, maxLineLen int - isBinary = !utf8.ValidString(sx) || !utf8.ValidString(sy) + if isString { + var numTotalRunes, numValidRunes, numLines, lastLineIdx, maxLineLen int for i, r := range sx + sy { - if !(unicode.IsPrint(r) || unicode.IsSpace(r)) || r == utf8.RuneError { - isBinary = true - break + numTotalRunes++ + if (unicode.IsPrint(r) || unicode.IsSpace(r)) && r != utf8.RuneError { + numValidRunes++ } if r == '\n' { if maxLineLen < i-lastLineIdx { @@ -111,8 +129,26 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { numLines++ } } - isText = !isBinary - isLinedText = isText && numLines >= 4 && maxLineLen <= 1024 + isPureText := numValidRunes == numTotalRunes + isMostlyText = float64(numValidRunes) > math.Floor(0.90*float64(numTotalRunes)) + isPureLinedText = isPureText && numLines >= 4 && maxLineLen <= 1024 + isBinary = !isMostlyText + + // Avoid diffing by lines if it produces a significantly more complex + // edit script than diffing by bytes. + if isPureLinedText { + ssx = strings.Split(sx, "\n") + ssy = strings.Split(sy, "\n") + esLines := diff.Difference(len(ssx), len(ssy), func(ix, iy int) diff.Result { + return diff.BoolResult(ssx[ix] == ssy[iy]) + }) + esBytes := diff.Difference(len(sx), len(sy), func(ix, iy int) diff.Result { + return diff.BoolResult(sx[ix] == sy[iy]) + }) + efficiencyLines := float64(esLines.Dist()) / float64(len(esLines)) + efficiencyBytes := float64(esBytes.Dist()) / float64(len(esBytes)) + isPureLinedText = efficiencyLines < 4*efficiencyBytes + } } // Format the string into printable records. @@ -121,9 +157,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { switch { // If the text appears to be multi-lined text, // then perform differencing across individual lines. - case isLinedText: - ssx := strings.Split(sx, "\n") - ssy := strings.Split(sy, "\n") + case isPureLinedText: list = opts.formatDiffSlice( reflect.ValueOf(ssx), reflect.ValueOf(ssy), 1, "line", func(v reflect.Value, d diffMode) textRecord { @@ -212,7 +246,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { // If the text appears to be single-lined text, // then perform differencing in approximately fixed-sized chunks. // The output is printed as quoted strings. - case isText: + case isMostlyText: list = opts.formatDiffSlice( reflect.ValueOf(sx), reflect.ValueOf(sy), 64, "byte", func(v reflect.Value, d diffMode) textRecord { @@ -220,7 +254,6 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { return textRecord{Diff: d, Value: textLine(s)} }, ) - delim = "" // If the text appears to be binary data, // then perform differencing in approximately fixed-sized chunks. @@ -282,7 +315,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { // Wrap the output with appropriate type information. var out textNode = &textWrap{Prefix: "{", Value: list, Suffix: "}"} - if !isText { + if !isMostlyText { // The "{...}" byte-sequence literal is not valid Go syntax for strings. // Emit the type for extra clarity (e.g. "string{...}"). if t.Kind() == reflect.String { @@ -321,8 +354,11 @@ func (opts formatOptions) formatDiffSlice( vx, vy reflect.Value, chunkSize int, name string, makeRec func(reflect.Value, diffMode) textRecord, ) (list textList) { - es := diff.Difference(vx.Len(), vy.Len(), func(ix int, iy int) diff.Result { - return diff.BoolResult(vx.Index(ix).Interface() == vy.Index(iy).Interface()) + eq := func(ix, iy int) bool { + return vx.Index(ix).Interface() == vy.Index(iy).Interface() + } + es := diff.Difference(vx.Len(), vy.Len(), func(ix, iy int) diff.Result { + return diff.BoolResult(eq(ix, iy)) }) appendChunks := func(v reflect.Value, d diffMode) int { @@ -347,6 +383,7 @@ func (opts formatOptions) formatDiffSlice( groups := coalesceAdjacentEdits(name, es) groups = coalesceInterveningIdentical(groups, chunkSize/4) + groups = cleanupSurroundingIdentical(groups, eq) maxGroup := diffStats{Name: name} for i, ds := range groups { if maxLen >= 0 && numDiffs >= maxLen { @@ -399,25 +436,36 @@ func (opts formatOptions) formatDiffSlice( // coalesceAdjacentEdits coalesces the list of edits into groups of adjacent // equal or unequal counts. +// +// Example: +// +// Input: "..XXY...Y" +// Output: [ +// {NumIdentical: 2}, +// {NumRemoved: 2, NumInserted 1}, +// {NumIdentical: 3}, +// {NumInserted: 1}, +// ] +// func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats) { - var prevCase int // Arbitrary index into which case last occurred - lastStats := func(i int) *diffStats { - if prevCase != i { + var prevMode byte + lastStats := func(mode byte) *diffStats { + if prevMode != mode { groups = append(groups, diffStats{Name: name}) - prevCase = i + prevMode = mode } return &groups[len(groups)-1] } for _, e := range es { switch e { case diff.Identity: - lastStats(1).NumIdentical++ + lastStats('=').NumIdentical++ case diff.UniqueX: - lastStats(2).NumRemoved++ + lastStats('!').NumRemoved++ case diff.UniqueY: - lastStats(2).NumInserted++ + lastStats('!').NumInserted++ case diff.Modified: - lastStats(2).NumModified++ + lastStats('!').NumModified++ } } return groups @@ -427,6 +475,35 @@ func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats) // equal groups into adjacent unequal groups that currently result in a // dual inserted/removed printout. This acts as a high-pass filter to smooth // out high-frequency changes within the windowSize. +// +// Example: +// +// WindowSize: 16, +// Input: [ +// {NumIdentical: 61}, // group 0 +// {NumRemoved: 3, NumInserted: 1}, // group 1 +// {NumIdentical: 6}, // ├── coalesce +// {NumInserted: 2}, // ├── coalesce +// {NumIdentical: 1}, // ├── coalesce +// {NumRemoved: 9}, // └── coalesce +// {NumIdentical: 64}, // group 2 +// {NumRemoved: 3, NumInserted: 1}, // group 3 +// {NumIdentical: 6}, // ├── coalesce +// {NumInserted: 2}, // ├── coalesce +// {NumIdentical: 1}, // ├── coalesce +// {NumRemoved: 7}, // ├── coalesce +// {NumIdentical: 1}, // ├── coalesce +// {NumRemoved: 2}, // └── coalesce +// {NumIdentical: 63}, // group 4 +// ] +// Output: [ +// {NumIdentical: 61}, +// {NumIdentical: 7, NumRemoved: 12, NumInserted: 3}, +// {NumIdentical: 64}, +// {NumIdentical: 8, NumRemoved: 12, NumInserted: 3}, +// {NumIdentical: 63}, +// ] +// func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStats { groups, groupsOrig := groups[:0], groups for i, ds := range groupsOrig { @@ -446,3 +523,91 @@ func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStat } return groups } + +// cleanupSurroundingIdentical scans through all unequal groups, and +// moves any leading sequence of equal elements to the preceding equal group and +// moves and trailing sequence of equal elements to the succeeding equal group. +// +// This is necessary since coalesceInterveningIdentical may coalesce edit groups +// together such that leading/trailing spans of equal elements becomes possible. +// Note that this can occur even with an optimal diffing algorithm. +// +// Example: +// +// Input: [ +// {NumIdentical: 61}, +// {NumIdentical: 1 , NumRemoved: 11, NumInserted: 2}, // assume 3 leading identical elements +// {NumIdentical: 67}, +// {NumIdentical: 7, NumRemoved: 12, NumInserted: 3}, // assume 10 trailing identical elements +// {NumIdentical: 54}, +// ] +// Output: [ +// {NumIdentical: 64}, // incremented by 3 +// {NumRemoved: 9}, +// {NumIdentical: 67}, +// {NumRemoved: 9}, +// {NumIdentical: 64}, // incremented by 10 +// ] +// +func cleanupSurroundingIdentical(groups []diffStats, eq func(i, j int) bool) []diffStats { + var ix, iy int // indexes into sequence x and y + for i, ds := range groups { + // Handle equal group. + if ds.NumDiff() == 0 { + ix += ds.NumIdentical + iy += ds.NumIdentical + continue + } + + // Handle unequal group. + nx := ds.NumIdentical + ds.NumRemoved + ds.NumModified + ny := ds.NumIdentical + ds.NumInserted + ds.NumModified + var numLeadingIdentical, numTrailingIdentical int + for i := 0; i < nx && i < ny && eq(ix+i, iy+i); i++ { + numLeadingIdentical++ + } + for i := 0; i < nx && i < ny && eq(ix+nx-1-i, iy+ny-1-i); i++ { + numTrailingIdentical++ + } + if numIdentical := numLeadingIdentical + numTrailingIdentical; numIdentical > 0 { + if numLeadingIdentical > 0 { + // Remove leading identical span from this group and + // insert it into the preceding group. + if i-1 >= 0 { + groups[i-1].NumIdentical += numLeadingIdentical + } else { + // No preceding group exists, so prepend a new group, + // but do so after we finish iterating over all groups. + defer func() { + groups = append([]diffStats{{Name: groups[0].Name, NumIdentical: numLeadingIdentical}}, groups...) + }() + } + // Increment indexes since the preceding group would have handled this. + ix += numLeadingIdentical + iy += numLeadingIdentical + } + if numTrailingIdentical > 0 { + // Remove trailing identical span from this group and + // insert it into the succeeding group. + if i+1 < len(groups) { + groups[i+1].NumIdentical += numTrailingIdentical + } else { + // No succeeding group exists, so append a new group, + // but do so after we finish iterating over all groups. + defer func() { + groups = append(groups, diffStats{Name: groups[len(groups)-1].Name, NumIdentical: numTrailingIdentical}) + }() + } + // Do not increment indexes since the succeeding group will handle this. + } + + // Update this group since some identical elements were removed. + nx -= numIdentical + ny -= numIdentical + groups[i] = diffStats{Name: ds.Name, NumRemoved: nx, NumInserted: ny} + } + ix += nx + iy += ny + } + return groups +} diff --git a/vendor/github.com/nats-io/nats.go/.travis.yml b/vendor/github.com/nats-io/nats.go/.travis.yml index 89c5c11f4..e7ebb1027 100644 --- a/vendor/github.com/nats-io/nats.go/.travis.yml +++ b/vendor/github.com/nats-io/nats.go/.travis.yml @@ -15,5 +15,7 @@ before_script: - find . -type f -name "*.go" | xargs misspell -error -locale US - staticcheck ./... script: -- go test -modfile=go_test.mod -v -run=TestNoRace -p=1 ./... --failfast -- if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then ./scripts/cov.sh TRAVIS; else go test -modfile=go_test.mod -race -v -p=1 ./... --failfast; fi +- go test -modfile=go_test.mod -v -run=TestNoRace -p=1 ./... --failfast -vet=off +- if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then ./scripts/cov.sh TRAVIS; else go test -modfile=go_test.mod -race -v -p=1 ./... --failfast -vet=off; fi +after_success: +- if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi diff --git a/vendor/github.com/nats-io/nats.go/README.md b/vendor/github.com/nats-io/nats.go/README.md index f6ecfc500..041d44ad4 100644 --- a/vendor/github.com/nats-io/nats.go/README.md +++ b/vendor/github.com/nats-io/nats.go/README.md @@ -1,10 +1,18 @@ # NATS - Go Client A [Go](http://golang.org) client for the [NATS messaging system](https://nats.io). -[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fnats-io%2Fgo-nats.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fnats-io%2Fgo-nats?ref=badge_shield) -[![Go Report Card](https://goreportcard.com/badge/github.com/nats-io/nats.go)](https://goreportcard.com/report/github.com/nats-io/nats.go) [![Build Status](https://travis-ci.com/nats-io/nats.go.svg?branch=master)](http://travis-ci.com/nats-io/nats.go) [![GoDoc](https://img.shields.io/badge/GoDoc-reference-007d9c)](https://pkg.go.dev/github.com/nats-io/nats.go) - [![Coverage Status](https://coveralls.io/repos/nats-io/nats.go/badge.svg?branch=master)](https://coveralls.io/r/nats-io/nats.go?branch=master) +[![License Apache 2][License-Image]][License-Url] [![Go Report Card][ReportCard-Image]][ReportCard-Url] [![Build Status][Build-Status-Image]][Build-Status-Url] [![GoDoc][GoDoc-Image]][GoDoc-Url] [![Coverage Status][Coverage-image]][Coverage-Url] + +[License-Url]: https://www.apache.org/licenses/LICENSE-2.0 +[License-Image]: https://img.shields.io/badge/License-Apache2-blue.svg +[ReportCard-Url]: https://goreportcard.com/report/github.com/nats-io/nats.go +[ReportCard-Image]: https://goreportcard.com/badge/github.com/nats-io/nats.go +[Build-Status-Url]: https://travis-ci.com/github/nats-io/nats.go +[Build-Status-Image]: https://travis-ci.com/nats-io/nats.go.svg?branch=main +[GoDoc-Url]: https://pkg.go.dev/github.com/nats-io/nats.go +[GoDoc-Image]: https://img.shields.io/badge/GoDoc-reference-007d9c +[Coverage-Url]: https://coveralls.io/r/nats-io/nats.go?branch=main +[Coverage-image]: https://coveralls.io/repos/github/nats-io/nats.go/badge.svg?branch=main ## Installation @@ -21,7 +29,7 @@ When using or transitioning to Go modules support: ```bash # Go client latest or explicit version go get github.com/nats-io/nats.go/@latest -go get github.com/nats-io/nats.go/@v1.11.0 +go get github.com/nats-io/nats.go/@v1.12.3 # For latest NATS Server, add /v2 at the end go get github.com/nats-io/nats-server/v2 diff --git a/vendor/github.com/nats-io/nats.go/context.go b/vendor/github.com/nats-io/nats.go/context.go index 666a483ad..aa8c00ebf 100644 --- a/vendor/github.com/nats-io/nats.go/context.go +++ b/vendor/github.com/nats-io/nats.go/context.go @@ -92,7 +92,7 @@ func (nc *Conn) requestWithContext(ctx context.Context, subj string, hdr, data [ // oldRequestWithContext utilizes inbox and subscription per request. func (nc *Conn) oldRequestWithContext(ctx context.Context, subj string, hdr, data []byte) (*Msg, error) { - inbox := NewInbox() + inbox := nc.newInbox() ch := make(chan *Msg, RequestChanLen) s, err := nc.subscribe(inbox, _EMPTY_, nil, ch, true, nil) @@ -110,10 +110,7 @@ func (nc *Conn) oldRequestWithContext(ctx context.Context, subj string, hdr, dat return s.NextMsgWithContext(ctx) } -// NextMsgWithContext takes a context and returns the next message -// available to a synchronous subscriber, blocking until it is delivered -// or context gets canceled. -func (s *Subscription) NextMsgWithContext(ctx context.Context) (*Msg, error) { +func (s *Subscription) nextMsgWithContext(ctx context.Context, pullSubInternal, waitIfNoMsg bool) (*Msg, error) { if ctx == nil { return nil, ErrInvalidContext } @@ -125,7 +122,7 @@ func (s *Subscription) NextMsgWithContext(ctx context.Context) (*Msg, error) { } s.mu.Lock() - err := s.validateNextMsgState() + err := s.validateNextMsgState(pullSubInternal) if err != nil { s.mu.Unlock() return nil, err @@ -150,6 +147,11 @@ func (s *Subscription) NextMsgWithContext(ctx context.Context) (*Msg, error) { return msg, nil } default: + // If internal and we don't want to wait, signal that there is no + // message in the internal queue. + if pullSubInternal && !waitIfNoMsg { + return nil, errNoMessages + } } select { @@ -167,6 +169,13 @@ func (s *Subscription) NextMsgWithContext(ctx context.Context) (*Msg, error) { return msg, nil } +// NextMsgWithContext takes a context and returns the next message +// available to a synchronous subscriber, blocking until it is delivered +// or context gets canceled. +func (s *Subscription) NextMsgWithContext(ctx context.Context) (*Msg, error) { + return s.nextMsgWithContext(ctx, false, true) +} + // FlushWithContext will allow a context to control the duration // of a Flush() call. This context should be non-nil and should // have a deadline set. We will return an error if none is present. diff --git a/vendor/github.com/nats-io/nats.go/go_test.mod b/vendor/github.com/nats-io/nats.go/go_test.mod index 72e30d629..4d301c8a5 100644 --- a/vendor/github.com/nats-io/nats.go/go_test.mod +++ b/vendor/github.com/nats-io/nats.go/go_test.mod @@ -1,10 +1,10 @@ module github.com/nats-io/nats.go -go 1.15 +go 1.16 require ( github.com/golang/protobuf v1.4.2 - github.com/nats-io/nats-server/v2 v2.2.3-0.20210501163444-670f44f1e82e + github.com/nats-io/nats-server/v2 v2.5.1-0.20210921161523-29037a4f5cd6 github.com/nats-io/nkeys v0.3.0 github.com/nats-io/nuid v1.0.1 google.golang.org/protobuf v1.23.0 diff --git a/vendor/github.com/nats-io/nats.go/go_test.sum b/vendor/github.com/nats-io/nats.go/go_test.sum index 7567402c9..05586f46f 100644 --- a/vendor/github.com/nats-io/nats.go/go_test.sum +++ b/vendor/github.com/nats-io/nats.go/go_test.sum @@ -5,83 +5,41 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.12 h1:famVnQVu7QwryBN4jNseQdUKES71ZAOnB6UQQJPZvqk= -github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/minio/highwayhash v1.0.0/go.mod h1:xQboMTeM9nY9v/LlAOxFctujiv5+Aq2hR5dxBpaMbdc= +github.com/klauspost/compress v1.13.4 h1:0zhec2I8zGnjWcKyLl6i3gPqKANCCn5e9xmviEEeX6s= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/jwt v0.3.3-0.20200519195258-f2bf5ce574c7/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= -github.com/nats-io/jwt v1.1.0/go.mod h1:n3cvmLfBfnpV4JJRN7lRYCyZnw48ksGsbThGXEk4w9M= github.com/nats-io/jwt v1.2.2 h1:w3GMTO969dFg+UOKTmmyuu7IGdusK+7Ytlt//OYH/uU= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/jwt/v2 v2.0.0-20200916203241-1f8ce17dff02/go.mod h1:vs+ZEjP+XKy8szkBmQwCB7RjYdIlMaPsFPs4VdS4bTQ= -github.com/nats-io/jwt/v2 v2.0.0-20201015190852-e11ce317263c/go.mod h1:vs+ZEjP+XKy8szkBmQwCB7RjYdIlMaPsFPs4VdS4bTQ= -github.com/nats-io/jwt/v2 v2.0.0-20210125223648-1c24d462becc/go.mod h1:PuO5FToRL31ecdFqVjc794vK0Bj0CwzveQEDvkb7MoQ= -github.com/nats-io/jwt/v2 v2.0.0-20210208203759-ff814ca5f813/go.mod h1:PuO5FToRL31ecdFqVjc794vK0Bj0CwzveQEDvkb7MoQ= -github.com/nats-io/jwt/v2 v2.0.1 h1:SycklijeduR742i/1Y3nRhURYM7imDzZZ3+tuAQqhQA= -github.com/nats-io/jwt/v2 v2.0.1/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.1.8-0.20200524125952-51ebd92a9093/go.mod h1:rQnBf2Rv4P9adtAs/Ti6LfFmVtFG6HLhl/H7cVshcJU= -github.com/nats-io/nats-server/v2 v2.1.8-0.20200601203034-f8d6dd992b71/go.mod h1:Nan/1L5Sa1JRW+Thm4HNYcIDcVRFc5zK9OpSZeI2kk4= -github.com/nats-io/nats-server/v2 v2.1.8-0.20200929001935-7f44d075f7ad/go.mod h1:TkHpUIDETmTI7mrHN40D1pzxfzHZuGmtMbtb83TGVQw= -github.com/nats-io/nats-server/v2 v2.1.8-0.20201129161730-ebe63db3e3ed/go.mod h1:XD0zHR/jTXdZvWaQfS5mQgsXj6x12kMjKLyAk/cOGgY= -github.com/nats-io/nats-server/v2 v2.1.8-0.20210205154825-f7ab27f7dad4/go.mod h1:kauGd7hB5517KeSqspW2U1Mz/jhPbTrE8eOXzUPk1m0= -github.com/nats-io/nats-server/v2 v2.1.8-0.20210227190344-51550e242af8/go.mod h1:/QQ/dpqFavkNhVnjvMILSQ3cj5hlmhB66adlgNbjuoA= -github.com/nats-io/nats-server/v2 v2.2.1-0.20210330155036-61cbd74e213d/go.mod h1:eKlAaGmSQHZMFQA6x56AaP5/Bl9N3mWF4awyT2TTpzc= -github.com/nats-io/nats-server/v2 v2.2.1 h1:QaWKih9qAa1kod7xXy0G1ry0AEUGmDEaptaiqzuO1e8= -github.com/nats-io/nats-server/v2 v2.2.1/go.mod h1:A+5EOqdnhH7FvLxtAK6SEDx6hyHriVOwf+FT/eEV99c= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421001316-7ac0ff667439 h1:wbm+DoCrBx3XUkfgfnzSGKGKXSSnR8z0EzaH8iEsYT4= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421001316-7ac0ff667439/go.mod h1:A+5EOqdnhH7FvLxtAK6SEDx6hyHriVOwf+FT/eEV99c= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421031524-a3f66508dd3a h1:Ihh+7S9hHb3zn4nibE9EV8P3Ed7OrH4TlGXHqIUYDfk= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421031524-a3f66508dd3a/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421135834-a9607573b30c h1:URcPI+y2OIGWM1pKzHhHTvRItB0Czlv3dzuJA0rklvk= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421135834-a9607573b30c/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421164150-3d928c847a0c h1:cbbxAcABuk2WdXKRm9VezFcGsceRhls4VCmQ/2aRJjQ= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421164150-3d928c847a0c/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421195432-ea21e86996f7 h1:wcd++VZMdwDpQ7P1VXJ7NpAwtgdlxcjFLZ12Y/pL8Nw= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421195432-ea21e86996f7/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421215445-a48a39251636 h1:iy6c/tV66xi5DT9WLUu9rJ8uQj8Kf7kmwHAqlYfczP4= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421215445-a48a39251636/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421232642-f2d3f5fb81d0 h1:e2MoeAShQE/oOSjkkV6J6R+l5ugbfkXI5spxgQykgoM= -github.com/nats-io/nats-server/v2 v2.2.2-0.20210421232642-f2d3f5fb81d0/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats-server/v2 v2.2.3-0.20210501163444-670f44f1e82e h1:Hvpz1/Epth4q7LnaU0U9SqMFd8grUMFTL8LMO5HFVok= -github.com/nats-io/nats-server/v2 v2.2.3-0.20210501163444-670f44f1e82e/go.mod h1:aF2IwMZdYktJswITm41c/k66uCHjTvpTxGQ7+d4cPeg= -github.com/nats-io/nats.go v1.10.0/go.mod h1:AjGArbfyR50+afOUotNX2Xs5SYHf+CoOa5HH1eEl2HE= -github.com/nats-io/nats.go v1.10.1-0.20200531124210-96f2130e4d55/go.mod h1:ARiFsjW9DVxk48WJbO3OSZ2DG8fjkMi7ecLmXoY/n9I= -github.com/nats-io/nats.go v1.10.1-0.20200606002146-fc6fed82929a/go.mod h1:8eAIv96Mo9QW6Or40jUHejS7e4VwZ3VRYD6Sf0BTDp4= -github.com/nats-io/nats.go v1.10.1-0.20201021145452-94be476ad6e0/go.mod h1:VU2zERjp8xmF+Lw2NH4u2t5qWZxwc7jB3+7HVMWQXPI= -github.com/nats-io/nats.go v1.10.1-0.20210127212649-5b4924938a9a/go.mod h1:Sa3kLIonafChP5IF0b55i9uvGR10I3hPETFbi4+9kOI= -github.com/nats-io/nats.go v1.10.1-0.20210211000709-75ded9c77585/go.mod h1:uBWnCKg9luW1g7hgzPxUjHFRI40EuTSX7RCzgnc74Jk= -github.com/nats-io/nats.go v1.10.1-0.20210228004050-ed743748acac/go.mod h1:hxFvLNbNmT6UppX5B5Tr/r3g+XSwGjJzFn6mxPNJEHc= -github.com/nats-io/nats.go v1.10.1-0.20210330225420-a0b1f60162f8/go.mod h1:Zq9IEHy7zurF0kFbU5aLIknnFI7guh8ijHk+2v+Vf5g= -github.com/nats-io/nats.go v1.10.1-0.20210419223411-20527524c393/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.4/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/jwt/v2 v2.0.3 h1:i/O6cmIsjpcQyWDYNcq2JyZ3/VTF8SJ4JWluI5OhpvI= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.1-0.20210921161523-29037a4f5cd6 h1:TYI6K487xhbbpKjz4gIIVBWL6l2gFI3JHu/N0XySwRY= +github.com/nats-io/nats-server/v2 v2.5.1-0.20210921161523-29037a4f5cd6/go.mod h1:xZLDZ6cRUu9FCh7+mKXGEy16O66CdWVxttxNIiUuNCk= +github.com/nats-io/nats.go v1.12.2-0.20210916222008-92921544b891/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b h1:wSOdpTq0/eI46Ez/LkDwIsAKA71YP2SRKBODiRWM0as= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e h1:gsTQYXdTw2Gq7RBsWvlQ91b+aEQ6bXFUngBGuR8sPpI= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/vendor/github.com/nats-io/nats.go/js.go b/vendor/github.com/nats-io/nats.go/js.go index 7b70bb1e1..4d4adbdac 100644 --- a/vendor/github.com/nats-io/nats.go/js.go +++ b/vendor/github.com/nats-io/nats.go/js.go @@ -35,6 +35,9 @@ const ( // defaultAPIPrefix is the default prefix for the JetStream API. defaultAPIPrefix = "$JS.API." + // jsDomainT is used to create JetStream API prefix by specifying only Domain + jsDomainT = "$JS.%s.API." + // apiAccountInfo is for obtaining general information about JetStream. apiAccountInfo = "INFO" @@ -85,6 +88,18 @@ const ( // apiMsgDeleteT is the endpoint to remove a message. apiMsgDeleteT = "STREAM.MSG.DELETE.%s" + + // orderedHeartbeatsInterval is how fast we want HBs from the server during idle. + orderedHeartbeatsInterval = 5 * time.Second + + // Scale for threshold of missed HBs or lack of activity. + hbcThresh = 2 +) + +// Types of control messages, so far heartbeat and flow control +const ( + jsCtrlHB = 1 + jsCtrlFC = 2 ) // JetStream allows persistent messaging through JetStream. @@ -110,21 +125,51 @@ type JetStream interface { PublishAsyncComplete() <-chan struct{} // Subscribe creates an async Subscription for JetStream. + // The stream and consumer names can be provided with the nats.Bind() option. + // For creating an ephemeral (where the consumer name is picked by the server), + // you can provide the stream name with nats.BindStream(). + // If no stream name is specified, the library will attempt to figure out which + // stream the subscription is for. See important notes below for more details. + // + // IMPORTANT NOTES: + // * If none of the options Bind() nor Durable() are specified, the library will + // send a request to the server to create an ephemeral JetStream consumer, + // which will be deleted after an Unsubscribe() or Drain(), or automatically + // by the server after a short period of time after the NATS subscription is + // gone. + // * If Durable() option is specified, the library will attempt to lookup a JetStream + // consumer with this name, and if found, will bind to it and not attempt to + // delete it. However, if not found, the library will send a request to create + // such durable JetStream consumer. The library will delete the JetStream consumer + // after an Unsubscribe() or Drain(). + // * If Bind() option is provided, the library will attempt to lookup the + // consumer with the given name, and if successful, bind to it. If the lookup fails, + // then the Subscribe() call will return an error. Subscribe(subj string, cb MsgHandler, opts ...SubOpt) (*Subscription, error) // SubscribeSync creates a Subscription that can be used to process messages synchronously. + // See important note in Subscribe() SubscribeSync(subj string, opts ...SubOpt) (*Subscription, error) // ChanSubscribe creates channel based Subscription. + // See important note in Subscribe() ChanSubscribe(subj string, ch chan *Msg, opts ...SubOpt) (*Subscription, error) + // ChanQueueSubscribe creates channel based Subscription with a queue group. + // See important note in QueueSubscribe() + ChanQueueSubscribe(subj, queue string, ch chan *Msg, opts ...SubOpt) (*Subscription, error) + // QueueSubscribe creates a Subscription with a queue group. + // If no optional durable name nor binding options are specified, the queue name will be used as a durable name. + // See important note in Subscribe() QueueSubscribe(subj, queue string, cb MsgHandler, opts ...SubOpt) (*Subscription, error) // QueueSubscribeSync creates a Subscription with a queue group that can be used to process messages synchronously. + // See important note in QueueSubscribe() QueueSubscribeSync(subj, queue string, opts ...SubOpt) (*Subscription, error) // PullSubscribe creates a Subscription that can fetch messages. + // See important note in Subscribe() PullSubscribe(subj, durable string, opts ...SubOpt) (*Subscription, error) } @@ -167,6 +212,7 @@ const ( ) // JetStream returns a JetStreamContext for messaging and stream management. +// Errors are only returned if inconsistent options are provided. func (nc *Conn) JetStream(opts ...JSOpt) (JetStreamContext, error) { js := &js{ nc: nc, @@ -181,26 +227,6 @@ func (nc *Conn) JetStream(opts ...JSOpt) (JetStreamContext, error) { return nil, err } } - - // If we have check recently we can avoid another account lookup here. - // We want these to be lighweight and created at will. - nc.mu.Lock() - now := time.Now() - checkAccount := now.Sub(nc.jsLastCheck) > defaultAccountCheck - if checkAccount { - nc.jsLastCheck = now - } - nc.mu.Unlock() - - if checkAccount { - if _, err := js.AccountInfo(); err != nil { - if err == ErrNoResponders { - err = ErrJetStreamNotEnabled - } - return nil, err - } - } - return js, nil } @@ -216,6 +242,11 @@ func (opt jsOptFn) configureJSContext(opts *jsOpts) error { return opt(opts) } +// Domain changes the domain part of JetSteam API prefix. +func Domain(domain string) JSOpt { + return APIPrefix(fmt.Sprintf(jsDomainT, domain)) +} + // APIPrefix changes the default prefix used for the JetStream API. func APIPrefix(pre string) JSOpt { return jsOptFn(func(js *jsOpts) error { @@ -256,6 +287,7 @@ type pubOpts struct { lid string // Expected last msgId str string // Expected stream name seq uint64 // Expected last sequence + lss uint64 // Expected last sequence per subject } // pubAckResponse is the ack response from the JetStream API when publishing a message. @@ -269,14 +301,16 @@ type PubAck struct { Stream string `json:"stream"` Sequence uint64 `json:"seq"` Duplicate bool `json:"duplicate,omitempty"` + Domain string `json:"domain,omitempty"` } // Headers for published messages. const ( - MsgIdHdr = "Nats-Msg-Id" - ExpectedStreamHdr = "Nats-Expected-Stream" - ExpectedLastSeqHdr = "Nats-Expected-Last-Sequence" - ExpectedLastMsgIdHdr = "Nats-Expected-Last-Msg-Id" + MsgIdHdr = "Nats-Msg-Id" + ExpectedStreamHdr = "Nats-Expected-Stream" + ExpectedLastSeqHdr = "Nats-Expected-Last-Sequence" + ExpectedLastSubjSeqHdr = "Nats-Expected-Last-Subject-Sequence" + ExpectedLastMsgIdHdr = "Nats-Expected-Last-Msg-Id" ) // PublishMsg publishes a Msg to a stream from JetStream. @@ -312,6 +346,9 @@ func (js *js) PublishMsg(m *Msg, opts ...PubOpt) (*PubAck, error) { if o.seq > 0 { m.Header.Set(ExpectedLastSeqHdr, strconv.FormatUint(o.seq, 10)) } + if o.lss > 0 { + m.Header.Set(ExpectedLastSubjSeqHdr, strconv.FormatUint(o.lss, 10)) + } var resp *Msg var err error @@ -402,27 +439,6 @@ func (paf *pubAckFuture) Msg() *Msg { return paf.msg } -// pullSubscribe creates the wildcard subscription used per pull subscriber -// to make fetch requests. -func (js *js) pullSubscribe(subj string) (*Subscription, error) { - jsi := &jsSub{js: js, pull: true} - - // Similar to async request handler we create a wildcard subscription for making requests, - // though we do not use the token based approach since we cannot match the response to - // the requestor due to JS subject being remapped on delivery. Instead, we just use an array - // of channels similar to how ping/pong interval is handled and send the message to the first - // available requestor via a channel. - jsi.rr = rand.New(rand.NewSource(time.Now().UnixNano())) - jsi.rpre = fmt.Sprintf("%s.", NewInbox()) - sub, err := js.nc.Subscribe(fmt.Sprintf("%s*", jsi.rpre), jsi.handleFetch) - if err != nil { - return nil, err - } - jsi.psub = sub - - return &Subscription{Subject: subj, conn: js.nc, typ: PullSubscription, jsi: jsi}, nil -} - // For quick token lookup etc. const aReplyPreLen = 14 const aReplyTokensize = 6 @@ -634,6 +650,9 @@ func (js *js) PublishMsgAsync(m *Msg, opts ...PubOpt) (PubAckFuture, error) { if o.seq > 0 { m.Header.Set(ExpectedLastSeqHdr, strconv.FormatUint(o.seq, 10)) } + if o.lss > 0 { + m.Header.Set(ExpectedLastSubjSeqHdr, strconv.FormatUint(o.lss, 10)) + } // Reply if m.Reply != _EMPTY_ { @@ -703,7 +722,15 @@ func ExpectLastSequence(seq uint64) PubOpt { }) } -// ExpectLastSequence sets the expected sequence in the response from the publish. +// ExpectLastSequencePerSubject sets the expected sequence per subject in the response from the publish. +func ExpectLastSequencePerSubject(seq uint64) PubOpt { + return pubOptFn(func(opts *pubOpts) error { + opts.lss = seq + return nil + }) +} + +// ExpectLastMsgId sets the expected last msgId in the response from the publish. func ExpectLastMsgId(id string) PubOpt { return pubOptFn(func(opts *pubOpts) error { opts.lid = id @@ -788,7 +815,9 @@ func Context(ctx context.Context) ContextOpt { // ConsumerConfig is the configuration of a JetStream consumer. type ConsumerConfig struct { Durable string `json:"durable_name,omitempty"` + Description string `json:"description,omitempty"` DeliverSubject string `json:"deliver_subject,omitempty"` + DeliverGroup string `json:"deliver_group,omitempty"` DeliverPolicy DeliverPolicy `json:"deliver_policy"` OptStartSeq uint64 `json:"opt_start_seq,omitempty"` OptStartTime *time.Time `json:"opt_start_time,omitempty"` @@ -811,13 +840,21 @@ type ConsumerInfo struct { Name string `json:"name"` Created time.Time `json:"created"` Config ConsumerConfig `json:"config"` - Delivered SequencePair `json:"delivered"` - AckFloor SequencePair `json:"ack_floor"` + Delivered SequenceInfo `json:"delivered"` + AckFloor SequenceInfo `json:"ack_floor"` NumAckPending int `json:"num_ack_pending"` NumRedelivered int `json:"num_redelivered"` NumWaiting int `json:"num_waiting"` NumPending uint64 `json:"num_pending"` Cluster *ClusterInfo `json:"cluster,omitempty"` + PushBound bool `json:"push_bound,omitempty"` +} + +// SequenceInfo has both the consumer and the stream sequence and last activity. +type SequenceInfo struct { + Consumer uint64 `json:"consumer_seq"` + Stream uint64 `json:"stream_seq"` + Last *time.Time `json:"last_active,omitempty"` } // SequencePair includes the consumer and stream sequence info from a JetStream consumer. @@ -837,114 +874,45 @@ type nextRequest struct { type jsSub struct { js *js - // To setup request mux handler for pull subscribers. - mu sync.RWMutex - psub *Subscription - rpre string - rr *rand.Rand - freqs []chan *Msg + // For pull subscribers, this is the next message subject to send requests to. + nms string + psubj string // the subject that was passed by user to the subscribe calls consumer string stream string deliver string pull bool - durable bool - attached bool + dc bool // Delete JS consumer - // Heartbeats and Flow Control handling from push consumers. - hbs bool - fc bool - cmeta string - fcs map[uint64]string -} - -// newFetchReply generates a unique inbox used for a fetch request. -func (jsi *jsSub) newFetchReply() string { - jsi.mu.Lock() - rpre := jsi.rpre - rn := jsi.rr.Int63() - jsi.mu.Unlock() - var sb strings.Builder - sb.WriteString(rpre) - var b [aReplyTokensize]byte - for i, l := 0, rn; i < len(b); i++ { - b[i] = rdigits[l%base] - l /= base - } - sb.Write(b[:]) - return sb.String() -} + // Ordered consumers + ordered bool + dseq uint64 + sseq uint64 + ccreq *createConsumerRequest -// handleFetch is delivered a message requested by pull subscribers -// when calling Fetch. -func (jsi *jsSub) handleFetch(m *Msg) { - jsi.mu.Lock() - if len(jsi.freqs) == 0 { - nc := jsi.js.nc - sub := jsi.psub - nc.mu.Lock() - errCB := nc.Opts.AsyncErrorCB - err := fmt.Errorf("nats: fetch response delivered but requestor has gone away") - if errCB != nil { - nc.ach.push(func() { errCB(nc, sub, err) }) - } - nc.mu.Unlock() - jsi.mu.Unlock() - return - } - mch := jsi.freqs[0] - if len(jsi.freqs) > 1 { - jsi.freqs = append(jsi.freqs[:0], jsi.freqs[1:]...) - } else { - jsi.freqs = jsi.freqs[:0] - } - jsi.mu.Unlock() - mch <- m -} - -// fetchNoWait makes a request to get a single message using no wait. -func (jsi *jsSub) fetchNoWait(ctx context.Context, subj string, payload []byte) (*Msg, error) { - nc := jsi.js.nc - m := NewMsg(subj) - m.Reply = jsi.newFetchReply() - m.Data = payload - - mch := make(chan *Msg, 1) - jsi.mu.Lock() - jsi.freqs = append(jsi.freqs, mch) - jsi.mu.Unlock() - if err := nc.PublishMsg(m); err != nil { - return nil, err - } - - var ok bool - var msg *Msg - - select { - case msg, ok = <-mch: - if !ok { - return nil, ErrConnectionClosed - } - case <-ctx.Done(): - return nil, ctx.Err() - } - - return msg, nil + // Heartbeats and Flow Control handling from push consumers. + hbc *time.Timer + hbi time.Duration + active bool + cmeta string + fcr string + fcd uint64 } -func (jsi *jsSub) unsubscribe(drainMode bool) error { - if drainMode && (jsi.durable || jsi.attached) { - // Skip deleting consumer for durables/attached - // consumers when using drain mode. +// Deletes the JS Consumer. +// No connection nor subscription lock must be held on entry. +func (sub *Subscription) deleteConsumer() error { + sub.mu.Lock() + jsi := sub.jsi + if jsi == nil { + sub.mu.Unlock() return nil } - // Clear the extra async pull subscription used for fetch requests. - if jsi.psub != nil { - jsi.psub.Drain() - } - + stream, consumer := jsi.stream, jsi.consumer js := jsi.js - return js.DeleteConsumer(jsi.stream, jsi.consumer) + sub.mu.Unlock() + + return js.DeleteConsumer(stream, consumer) } // SubOpt configures options for subscribing to JetStream consumers. @@ -959,75 +927,309 @@ func (opt subOptFn) configureSubscribe(opts *subOpts) error { return opt(opts) } -// Subscribe will create a subscription to the appropriate stream and consumer. +// Subscribe creates an async Subscription for JetStream. +// The stream and consumer names can be provided with the nats.Bind() option. +// For creating an ephemeral (where the consumer name is picked by the server), +// you can provide the stream name with nats.BindStream(). +// If no stream name is specified, the library will attempt to figure out which +// stream the subscription is for. See important notes below for more details. +// +// IMPORTANT NOTES: +// * If none of the options Bind() nor Durable() are specified, the library will +// send a request to the server to create an ephemeral JetStream consumer, +// which will be deleted after an Unsubscribe() or Drain(), or automatically +// by the server after a short period of time after the NATS subscription is +// gone. +// * If Durable() option is specified, the library will attempt to lookup a JetStream +// consumer with this name, and if found, will bind to it and not attempt to +// delete it. However, if not found, the library will send a request to create +// such durable JetStream consumer. The library will delete the JetStream consumer +// after an Unsubscribe() or Drain(). +// * If Bind() option is provided, the library will attempt to lookup the +// consumer with the given name, and if successful, bind to it. If the lookup fails, +// then the Subscribe() call will return an error. func (js *js) Subscribe(subj string, cb MsgHandler, opts ...SubOpt) (*Subscription, error) { if cb == nil { return nil, ErrBadSubscription } - return js.subscribe(subj, _EMPTY_, cb, nil, false, opts) + return js.subscribe(subj, _EMPTY_, cb, nil, false, false, opts) } -// SubscribeSync will create a sync subscription to the appropriate stream and consumer. +// SubscribeSync creates a Subscription that can be used to process messages synchronously. +// See important note in Subscribe() func (js *js) SubscribeSync(subj string, opts ...SubOpt) (*Subscription, error) { mch := make(chan *Msg, js.nc.Opts.SubChanLen) - return js.subscribe(subj, _EMPTY_, nil, mch, true, opts) + return js.subscribe(subj, _EMPTY_, nil, mch, true, false, opts) } -// QueueSubscribe will create a subscription to the appropriate stream and consumer with queue semantics. +// QueueSubscribe creates a Subscription with a queue group. +// If no optional durable name nor binding options are specified, the queue name will be used as a durable name. +// See important note in Subscribe() func (js *js) QueueSubscribe(subj, queue string, cb MsgHandler, opts ...SubOpt) (*Subscription, error) { if cb == nil { return nil, ErrBadSubscription } - return js.subscribe(subj, queue, cb, nil, false, opts) + return js.subscribe(subj, queue, cb, nil, false, false, opts) } -// QueueSubscribeSync will create a sync subscription to the appropriate stream and consumer with queue semantics. +// QueueSubscribeSync creates a Subscription with a queue group that can be used to process messages synchronously. +// See important note in QueueSubscribe() func (js *js) QueueSubscribeSync(subj, queue string, opts ...SubOpt) (*Subscription, error) { mch := make(chan *Msg, js.nc.Opts.SubChanLen) - return js.subscribe(subj, queue, nil, mch, true, opts) + return js.subscribe(subj, queue, nil, mch, true, false, opts) } -// Subscribe will create a subscription to the appropriate stream and consumer. +// ChanSubscribe creates channel based Subscription. +// See important note in Subscribe() func (js *js) ChanSubscribe(subj string, ch chan *Msg, opts ...SubOpt) (*Subscription, error) { - return js.subscribe(subj, _EMPTY_, nil, ch, false, opts) + return js.subscribe(subj, _EMPTY_, nil, ch, false, false, opts) } -// PullSubscribe creates a pull subscriber. +// ChanQueueSubscribe creates channel based Subscription with a queue group. +// See important note in QueueSubscribe() +func (js *js) ChanQueueSubscribe(subj, queue string, ch chan *Msg, opts ...SubOpt) (*Subscription, error) { + return js.subscribe(subj, queue, nil, ch, false, false, opts) +} + +// PullSubscribe creates a Subscription that can fetch messages. +// See important note in Subscribe() func (js *js) PullSubscribe(subj, durable string, opts ...SubOpt) (*Subscription, error) { - return js.subscribe(subj, _EMPTY_, nil, nil, false, append(opts, Durable(durable))) + mch := make(chan *Msg, js.nc.Opts.SubChanLen) + return js.subscribe(subj, _EMPTY_, nil, mch, true, true, append(opts, Durable(durable))) } -func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync bool, opts []SubOpt) (*Subscription, error) { - cfg := ConsumerConfig{AckPolicy: ackPolicyNotSet} +func processConsInfo(info *ConsumerInfo, userCfg *ConsumerConfig, isPullMode bool, subj, queue string) (string, error) { + ccfg := &info.Config + + // Make sure this new subject matches or is a subset. + if ccfg.FilterSubject != _EMPTY_ && subj != ccfg.FilterSubject { + return _EMPTY_, ErrSubjectMismatch + } + + // Prevent binding a subscription against incompatible consumer types. + if isPullMode && ccfg.DeliverSubject != _EMPTY_ { + return _EMPTY_, ErrPullSubscribeToPushConsumer + } else if !isPullMode && ccfg.DeliverSubject == _EMPTY_ { + return _EMPTY_, ErrPullSubscribeRequired + } + + // If pull mode, nothing else to check here. + if isPullMode { + return _EMPTY_, checkConfig(ccfg, userCfg) + } + + // At this point, we know the user wants push mode, and the JS consumer is + // really push mode. + + dg := info.Config.DeliverGroup + if dg == _EMPTY_ { + // Prevent an user from attempting to create a queue subscription on + // a JS consumer that was not created with a deliver group. + if queue != _EMPTY_ { + return _EMPTY_, fmt.Errorf("cannot create a queue subscription for a consumer without a deliver group") + } else if info.PushBound { + // Need to reject a non queue subscription to a non queue consumer + // if the consumer is already bound. + return _EMPTY_, fmt.Errorf("consumer is already bound to a subscription") + } + } else { + // If the JS consumer has a deliver group, we need to fail a non queue + // subscription attempt: + if queue == _EMPTY_ { + return _EMPTY_, fmt.Errorf("cannot create a subscription for a consumer with a deliver group %q", dg) + } else if queue != dg { + // Here the user's queue group name does not match the one associated + // with the JS consumer. + return _EMPTY_, fmt.Errorf("cannot create a queue subscription %q for a consumer with a deliver group %q", + queue, dg) + } + } + if err := checkConfig(ccfg, userCfg); err != nil { + return _EMPTY_, err + } + return ccfg.DeliverSubject, nil +} + +func checkConfig(s, u *ConsumerConfig) error { + makeErr := func(fieldName string, usrVal, srvVal interface{}) error { + return fmt.Errorf("configuration requests %s to be %v, but consumer's value is %v", fieldName, usrVal, srvVal) + } + + if u.Durable != _EMPTY_ && u.Durable != s.Durable { + return makeErr("durable", u.Durable, s.Durable) + } + if u.Description != _EMPTY_ && u.Description != s.Description { + return makeErr("description", u.Description, s.Description) + } + if u.DeliverPolicy != deliverPolicyNotSet && u.DeliverPolicy != s.DeliverPolicy { + return makeErr("deliver policy", u.DeliverPolicy, s.DeliverPolicy) + } + if u.OptStartSeq > 0 && u.OptStartSeq != s.OptStartSeq { + return makeErr("optional start sequence", u.OptStartSeq, s.OptStartSeq) + } + if u.OptStartTime != nil && !u.OptStartTime.IsZero() && u.OptStartTime != s.OptStartTime { + return makeErr("optional start time", u.OptStartTime, s.OptStartTime) + } + if u.AckPolicy != ackPolicyNotSet && u.AckPolicy != s.AckPolicy { + return makeErr("ack policy", u.AckPolicy, s.AckPolicy) + } + if u.AckWait > 0 && u.AckWait != s.AckWait { + return makeErr("ack wait", u.AckWait, s.AckWait) + } + if u.MaxDeliver > 0 && u.MaxDeliver != s.MaxDeliver { + return makeErr("max deliver", u.MaxDeliver, s.MaxDeliver) + } + if u.ReplayPolicy != replayPolicyNotSet && u.ReplayPolicy != s.ReplayPolicy { + return makeErr("replay policy", u.ReplayPolicy, s.ReplayPolicy) + } + if u.RateLimit > 0 && u.RateLimit != s.RateLimit { + return makeErr("rate limit", u.RateLimit, s.RateLimit) + } + if u.SampleFrequency != _EMPTY_ && u.SampleFrequency != s.SampleFrequency { + return makeErr("sample frequency", u.SampleFrequency, s.SampleFrequency) + } + if u.MaxWaiting > 0 && u.MaxWaiting != s.MaxWaiting { + return makeErr("max waiting", u.MaxWaiting, s.MaxWaiting) + } + if u.MaxAckPending > 0 && u.MaxAckPending != s.MaxAckPending { + return makeErr("max ack pending", u.MaxAckPending, s.MaxAckPending) + } + // For flow control, we want to fail if the user explicit wanted it, but + // it is not set in the existing consumer. If it is not asked by the user, + // the library still handles it and so no reason to fail. + if u.FlowControl && !s.FlowControl { + return makeErr("flow control", u.FlowControl, s.FlowControl) + } + if u.Heartbeat > 0 && u.Heartbeat != s.Heartbeat { + return makeErr("heartbeat", u.Heartbeat, s.Heartbeat) + } + return nil +} + +func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync, isPullMode bool, opts []SubOpt) (*Subscription, error) { + cfg := ConsumerConfig{ + DeliverPolicy: deliverPolicyNotSet, + AckPolicy: ackPolicyNotSet, + ReplayPolicy: replayPolicyNotSet, + } o := subOpts{cfg: &cfg} if len(opts) > 0 { for _, opt := range opts { + if opt == nil { + continue + } if err := opt.configureSubscribe(&o); err != nil { return nil, err } } } - isPullMode := ch == nil && cb == nil - badPullAck := o.cfg.AckPolicy == AckNonePolicy || o.cfg.AckPolicy == AckAllPolicy + // If no stream name is specified, or if option SubjectIsDelivery is + // specified, the subject cannot be empty. + if subj == _EMPTY_ && o.stream == _EMPTY_ { + return nil, fmt.Errorf("nats: subject required") + } + + // Note that these may change based on the consumer info response we may get. hasHeartbeats := o.cfg.Heartbeat > 0 hasFC := o.cfg.FlowControl - if isPullMode && badPullAck { - return nil, fmt.Errorf("nats: invalid ack mode for pull consumers: %s", o.cfg.AckPolicy) + + // Some checks for pull subscribers + if isPullMode { + // Check for bad ack policy + if o.cfg.AckPolicy == AckNonePolicy || o.cfg.AckPolicy == AckAllPolicy { + return nil, fmt.Errorf("nats: invalid ack mode for pull consumers: %s", o.cfg.AckPolicy) + } + // No deliver subject should be provided + if o.cfg.DeliverSubject != _EMPTY_ { + return nil, ErrPullSubscribeToPushConsumer + } + } + + // Some check/setting specific to queue subs + if queue != _EMPTY_ { + // Queue subscriber cannot have HB or FC (since messages will be randomly dispatched + // to members). We may in the future have a separate NATS subscription that all members + // would subscribe to and server would send on. + if o.cfg.Heartbeat > 0 || o.cfg.FlowControl { + // Not making this a public ErrXXX in case we allow in the future. + return nil, fmt.Errorf("nats: queue subscription doesn't support idle heartbeat nor flow control") + } + + // If this is a queue subscription and no consumer nor durable name was specified, + // then we will use the queue name as a durable name. + if queue != _EMPTY_ && o.consumer == _EMPTY_ && o.cfg.Durable == _EMPTY_ { + o.cfg.Durable = queue + } } var ( - err error - shouldCreate bool - ccfg *ConsumerConfig - info *ConsumerInfo - deliver string - attached bool - stream = o.stream - consumer = o.consumer - isDurable = o.cfg.Durable != _EMPTY_ + err error + shouldCreate bool + info *ConsumerInfo + deliver string + stream = o.stream + consumer = o.consumer + isDurable = o.cfg.Durable != _EMPTY_ + consumerBound = o.bound + notFoundErr bool + lookupErr bool + nc = js.nc + nms string + hbi time.Duration + ccreq *createConsumerRequest // In case we need to hold onto it for ordered consumers. ) + // Do some quick checks here for ordered consumers. We do these here instead of spread out + // in the individual SubOpts. + if o.ordered { + // Make sure we are not durable. + if isDurable { + return nil, fmt.Errorf("nats: durable can not be set for an ordered consumer") + } + // Check ack policy. + if o.cfg.AckPolicy != ackPolicyNotSet { + return nil, fmt.Errorf("nats: ack policy can not be set for an ordered consumer") + } + // Check max deliver. + if o.cfg.MaxDeliver != 1 && o.cfg.MaxDeliver != 0 { + return nil, fmt.Errorf("nats: max deliver can not be set for an ordered consumer") + } + // No deliver subject, we pick our own. + if o.cfg.DeliverSubject != _EMPTY_ { + return nil, fmt.Errorf("nats: deliver subject can not be set for an ordered consumer") + } + // Queue groups not allowed. + if queue != _EMPTY_ { + return nil, fmt.Errorf("nats: queues not be set for an ordered consumer") + } + // Check for bound consumers. + if consumer != _EMPTY_ { + return nil, fmt.Errorf("nats: can not bind existing consumer for an ordered consumer") + } + // Check for pull mode. + if isPullMode { + return nil, fmt.Errorf("nats: can not use pull mode for an ordered consumer") + } + // Setup how we need it to be here. + o.cfg.FlowControl = true + o.cfg.AckPolicy = AckNonePolicy + o.cfg.MaxDeliver = 1 + o.cfg.AckWait = 22 * time.Hour // Just set to something known, not utilized. + if !hasHeartbeats { + o.cfg.Heartbeat = orderedHeartbeatsInterval + } + hasFC, hasHeartbeats = true, true + o.mack = true // To avoid auto-ack wrapping call below. + hbi = o.cfg.Heartbeat + } + + // In case a consumer has not been set explicitly, then the + // durable name will be used as the consumer name. + if consumer == _EMPTY_ { + consumer = o.cfg.Durable + } + // Find the stream mapped to the subject if not bound to a stream already. if o.stream == _EMPTY_ { stream, err = js.lookupStreamBySubject(subj) @@ -1038,55 +1240,104 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync stream = o.stream } - // With an explicit durable name, then can lookup - // the consumer to which it should be attaching to. - consumer = o.cfg.Durable + // With an explicit durable name, we can lookup the consumer first + // to which it should be attaching to. if consumer != _EMPTY_ { - // Only create in case there is no consumer already. info, err = js.ConsumerInfo(stream, consumer) - if err != nil && err.Error() != "nats: consumer not found" { - return nil, err - } + notFoundErr = errors.Is(err, ErrConsumerNotFound) + lookupErr = err == ErrJetStreamNotEnabled || err == ErrTimeout || err == context.DeadlineExceeded } - if info != nil { - // Attach using the found consumer config. - ccfg = &info.Config - attached = true - - // Make sure this new subject matches or is a subset. - if ccfg.FilterSubject != _EMPTY_ && subj != ccfg.FilterSubject { - return nil, ErrSubjectMismatch + switch { + case info != nil: + deliver, err = processConsInfo(info, o.cfg, isPullMode, subj, queue) + if err != nil { + return nil, err } - - if ccfg.DeliverSubject != _EMPTY_ { - deliver = ccfg.DeliverSubject - } else { - deliver = NewInbox() + icfg := &info.Config + hasFC, hbi = icfg.FlowControl, icfg.Heartbeat + hasHeartbeats = hbi > 0 + case (err != nil && !notFoundErr) || (notFoundErr && consumerBound): + // If the consumer is being bound and we got an error on pull subscribe then allow the error. + if !(isPullMode && lookupErr && consumerBound) { + return nil, err } - } else { + default: + // Attempt to create consumer if not found nor using Bind. shouldCreate = true - deliver = NewInbox() - if !isPullMode { + if o.cfg.DeliverSubject != _EMPTY_ { + deliver = o.cfg.DeliverSubject + } else if !isPullMode { + deliver = nc.newInbox() cfg.DeliverSubject = deliver } + // Do filtering always, server will clear as needed. cfg.FilterSubject = subj + + // Pass the queue to the consumer config + if queue != _EMPTY_ { + cfg.DeliverGroup = queue + } + + // If not set, default to deliver all + if cfg.DeliverPolicy == deliverPolicyNotSet { + cfg.DeliverPolicy = DeliverAllPolicy + } + // If not set, default to ack explicit. + if cfg.AckPolicy == ackPolicyNotSet { + cfg.AckPolicy = AckExplicitPolicy + } + // If not set, default to instant + if cfg.ReplayPolicy == replayPolicyNotSet { + cfg.ReplayPolicy = ReplayInstantPolicy + } + + // If we have acks at all and the MaxAckPending is not set go ahead + // and set to the internal max. + // TODO(dlc) - We should be able to update this if client updates PendingLimits. + if cfg.MaxAckPending == 0 && cfg.AckPolicy != AckNonePolicy { + if !isPullMode && cb != nil && hasFC { + cfg.MaxAckPending = DefaultSubPendingMsgsLimit * 16 + } else if ch != nil { + cfg.MaxAckPending = cap(ch) + } else { + cfg.MaxAckPending = DefaultSubPendingMsgsLimit + } + } + // Create request here. + ccreq = &createConsumerRequest{ + Stream: stream, + Config: &cfg, + } + hbi = cfg.Heartbeat + } + + if isPullMode { + nms = fmt.Sprintf(js.apiSubj(apiRequestNextT), stream, consumer) + deliver = nc.newInbox() } - var sub *Subscription + jsi := &jsSub{ + js: js, + stream: stream, + consumer: consumer, + deliver: deliver, + hbi: hbi, + ordered: o.ordered, + ccreq: ccreq, + dseq: 1, + pull: isPullMode, + nms: nms, + psubj: subj, + } // Check if we are manual ack. if cb != nil && !o.mack { ocb := cb cb = func(m *Msg) { ocb(m); m.Ack() } } - - if isPullMode { - sub, err = js.pullSubscribe(subj) - } else { - sub, err = js.nc.subscribe(deliver, queue, cb, ch, isSync, &jsSub{js: js, hbs: hasHeartbeats, fc: hasFC}) - } + sub, err := nc.subscribe(deliver, queue, cb, ch, isSync, jsi) if err != nil { return nil, err } @@ -1097,27 +1348,22 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync sub.SetPendingLimits(DefaultSubPendingMsgsLimit*16, DefaultSubPendingBytesLimit) } - // If we are creating or updating let's process that request. - if shouldCreate { - // If not set default to ack explicit. - if cfg.AckPolicy == ackPolicyNotSet { - cfg.AckPolicy = AckExplicitPolicy - } - // If we have acks at all and the MaxAckPending is not set go ahead - // and set to the internal max. - // TODO(dlc) - We should be able to update this if client updates PendingLimits. - if cfg.MaxAckPending == 0 && cfg.AckPolicy != AckNonePolicy { - maxMsgs, _, _ := sub.PendingLimits() - cfg.MaxAckPending = maxMsgs - } - - req := &createConsumerRequest{ - Stream: stream, - Config: &cfg, + // If we fail and we had the sub we need to cleanup, but can't just do a straight Unsubscribe or Drain. + // We need to clear the jsi so we do not remove any durables etc. + cleanUpSub := func() { + if sub != nil { + sub.mu.Lock() + sub.jsi = nil + sub.mu.Unlock() + sub.Unsubscribe() } + } - j, err := json.Marshal(req) + // If we are creating or updating let's process that request. + if shouldCreate { + j, err := json.Marshal(ccreq) if err != nil { + cleanUpSub() return nil, err } @@ -1128,9 +1374,9 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync ccSubj = fmt.Sprintf(apiConsumerCreateT, stream) } - resp, err := js.nc.Request(js.apiSubj(ccSubj), j, js.opts.wait) + resp, err := nc.Request(js.apiSubj(ccSubj), j, js.opts.wait) if err != nil { - sub.Drain() + cleanUpSub() if err == ErrNoResponders { err = ErrJetStreamNotEnabled } @@ -1139,58 +1385,63 @@ func (js *js) subscribe(subj, queue string, cb MsgHandler, ch chan *Msg, isSync var cinfo consumerResponse err = json.Unmarshal(resp.Data, &cinfo) if err != nil { - sub.Drain() + cleanUpSub() return nil, err } info = cinfo.ConsumerInfo + if cinfo.Error != nil { - // Remove interest from previous subscribe since it - // may have an incorrect delivery subject. - sub.Drain() - - // Multiple subscribers could compete in creating the first consumer - // that will be shared using the same durable name. If this happens, then - // do a lookup of the consumer info and resubscribe using the latest info. - if consumer != _EMPTY_ && (strings.Contains(cinfo.Error.Description, `consumer already exists`) || strings.Contains(cinfo.Error.Description, `consumer name already in use`)) { + // We will not be using this sub here if we were push based. + if !isPullMode { + cleanUpSub() + } + if consumer != _EMPTY_ && + (strings.Contains(cinfo.Error.Description, `consumer already exists`) || + strings.Contains(cinfo.Error.Description, `consumer name already in use`)) { + info, err = js.ConsumerInfo(stream, consumer) if err != nil { return nil, err } - ccfg = &info.Config - - // Validate that the original subject does still match. - if ccfg.FilterSubject != _EMPTY_ && subj != ccfg.FilterSubject { - return nil, ErrSubjectMismatch + deliver, err = processConsInfo(info, o.cfg, isPullMode, subj, queue) + if err != nil { + return nil, err } - - // Use the deliver subject from latest consumer config to attach. - if ccfg.DeliverSubject != _EMPTY_ { + if !isPullMode { // We can't reuse the channel, so if one was passed, we need to create a new one. if ch != nil { ch = make(chan *Msg, cap(ch)) } - sub, err = js.nc.subscribe(ccfg.DeliverSubject, queue, cb, ch, isSync, - &jsSub{js: js, hbs: hasHeartbeats, fc: hasFC}) + jsi.deliver = deliver + // Recreate the subscription here. + sub, err = nc.subscribe(jsi.deliver, queue, cb, ch, isSync, jsi) if err != nil { return nil, err } } - attached = true } else { + if cinfo.Error.Code == 404 { + return nil, ErrStreamNotFound + } return nil, fmt.Errorf("nats: %s", cinfo.Error.Description) } + } else { + // Since the library created the JS consumer, it will delete it on Unsubscribe()/Drain() + sub.mu.Lock() + sub.jsi.dc = true + // If this is an ephemeral, we did not have a consumer name, we get it from the info + // after the AddConsumer returns. + if consumer == _EMPTY_ { + sub.jsi.consumer = info.Name + } + sub.mu.Unlock() } - stream = info.Stream - consumer = info.Name - deliver = info.Config.DeliverSubject } - sub.mu.Lock() - sub.jsi.stream = stream - sub.jsi.consumer = consumer - sub.jsi.durable = isDurable - sub.jsi.attached = attached - sub.jsi.deliver = deliver - sub.mu.Unlock() + + // Do heartbeats last if needed. + if hasHeartbeats { + sub.scheduleHeartbeatCheck() + } return sub, nil } @@ -1219,47 +1470,225 @@ func (ecs *ErrConsumerSequenceMismatch) Error() string { ) } -// isControlMessage will return true if this is an empty control status message. -func isControlMessage(msg *Msg) bool { - return len(msg.Data) == 0 && msg.Header.Get(statusHdr) == controlMsg +// isJSControlMessage will return true if this is an empty control status message +// and indicate what type of control message it is, say jsCtrlHB or jsCtrlFC +func isJSControlMessage(msg *Msg) (bool, int) { + if len(msg.Data) > 0 || msg.Header.Get(statusHdr) != controlMsg { + return false, 0 + } + val := msg.Header.Get(descrHdr) + if strings.HasPrefix(val, "Idle") { + return true, jsCtrlHB + } + if strings.HasPrefix(val, "Flow") { + return true, jsCtrlFC + } + return true, 0 } -func (jsi *jsSub) trackSequences(reply string) { - jsi.mu.Lock() - jsi.cmeta = reply - jsi.mu.Unlock() +// Keeps track of the incoming message's reply subject so that the consumer's +// state (deliver sequence, etc..) can be checked against heartbeats. +// Runs under the subscription lock +func (sub *Subscription) trackSequences(reply string) { + sub.jsi.cmeta = reply } -// checkForFlowControlResponse will check to see if we should send a flow control response -// based on the delivered index. +// Check to make sure messages are arriving in order. +// Returns true if the sub had to be replaced. Will cause upper layers to return. +// The caller has verified that sub.jsi != nil and that this is not a control message. // Lock should be held. -func (sub *Subscription) checkForFlowControlResponse(delivered uint64) { - jsi, nc := sub.jsi, sub.conn - if jsi == nil { - return +func (sub *Subscription) checkOrderedMsgs(m *Msg) bool { + // Ignore msgs with no reply like HBs and flowcontrol, they are handled elsewhere. + if m.Reply == _EMPTY_ { + return false + } + + // Normal message here. + tokens, err := getMetadataFields(m.Reply) + if err != nil { + return false + } + sseq, dseq := uint64(parseNum(tokens[ackStreamSeqTokenPos])), uint64(parseNum(tokens[ackConsumerSeqTokenPos])) + + jsi := sub.jsi + if dseq != jsi.dseq { + sub.resetOrderedConsumer(jsi.sseq + 1) + return true } + // Update our tracking here. + jsi.dseq, jsi.sseq = dseq+1, sseq + return false +} + +// Update and replace sid. +// Lock should be held on entry but will be unlocked to prevent lock inversion. +func (sub *Subscription) applyNewSID() (osid int64) { + nc := sub.conn + sub.mu.Unlock() - jsi.mu.Lock() - defer jsi.mu.Unlock() + nc.subsMu.Lock() + osid = sub.sid + delete(nc.subs, osid) + // Place new one. + nc.ssid++ + nsid := nc.ssid + nc.subs[nsid] = sub + nc.subsMu.Unlock() + + sub.mu.Lock() + sub.sid = nsid + return osid +} - if len(jsi.fcs) == 0 { +// We are here if we have detected a gap with an ordered consumer. +// We will create a new consumer and rewire the low level subscription. +// Lock should be held. +func (sub *Subscription) resetOrderedConsumer(sseq uint64) { + nc := sub.conn + if sub.jsi == nil || nc == nil || sub.closed { return } - if reply := jsi.fcs[delivered]; reply != _EMPTY_ { - delete(jsi.fcs, delivered) - nc.Publish(reply, nil) + // Quick unsubscribe. Since we know this is a simple push subscriber we do in place. + osid := sub.applyNewSID() + + // Grab new inbox. + newDeliver := nc.newInbox() + sub.Subject = newDeliver + + // Snapshot the new sid under sub lock. + nsid := sub.sid + + // We are still in the low level readloop for the connection so we need + // to spin a go routine to try to create the new consumer. + go func() { + // Unsubscribe and subscribe with new inbox and sid. + // Remap a new low level sub into this sub since its client accessible. + // This is done here in this go routine to prevent lock inversion. + nc.mu.Lock() + nc.bw.appendString(fmt.Sprintf(unsubProto, osid, _EMPTY_)) + nc.bw.appendString(fmt.Sprintf(subProto, newDeliver, _EMPTY_, nsid)) + nc.kickFlusher() + nc.mu.Unlock() + + pushErr := func(err error) { + nc.handleConsumerSequenceMismatch(sub, err) + nc.unsubscribe(sub, 0, true) + } + + sub.mu.Lock() + jsi := sub.jsi + // Reset some items in jsi. + jsi.dseq = 1 + jsi.cmeta = _EMPTY_ + jsi.fcr, jsi.fcd = _EMPTY_, 0 + jsi.deliver = newDeliver + // Reset consumer request for starting policy. + cfg := jsi.ccreq.Config + cfg.DeliverSubject = newDeliver + cfg.DeliverPolicy = DeliverByStartSequencePolicy + cfg.OptStartSeq = sseq + + ccSubj := fmt.Sprintf(apiConsumerCreateT, jsi.stream) + j, err := json.Marshal(jsi.ccreq) + js := jsi.js + sub.mu.Unlock() + + if err != nil { + pushErr(err) + return + } + + resp, err := nc.Request(js.apiSubj(ccSubj), j, js.opts.wait) + if err != nil { + if err == ErrNoResponders { + err = ErrJetStreamNotEnabled + } + pushErr(err) + return + } + + var cinfo consumerResponse + err = json.Unmarshal(resp.Data, &cinfo) + if err != nil { + pushErr(err) + return + } + + if cinfo.Error != nil { + pushErr(fmt.Errorf("nats: %s", cinfo.Error.Description)) + return + } + + sub.mu.Lock() + jsi.consumer = cinfo.Name + sub.mu.Unlock() + }() +} + +// checkForFlowControlResponse will check to see if we should send a flow control response +// based on the subscription current delivered index and the target. +// Runs under subscription lock +func (sub *Subscription) checkForFlowControlResponse() string { + // Caller has verified that there is a sub.jsi and fc + jsi := sub.jsi + if jsi.fcd == sub.delivered { + fcr := jsi.fcr + jsi.fcr, jsi.fcd = _EMPTY_, 0 + return fcr } + return _EMPTY_ } // Record an inbound flow control message. -func (jsi *jsSub) scheduleFlowControlResponse(dfuture uint64, reply string) { - jsi.mu.Lock() - if jsi.fcs == nil { - jsi.fcs = make(map[uint64]string) +// Runs under subscription lock +func (sub *Subscription) scheduleFlowControlResponse(dfuture uint64, reply string) { + jsi := sub.jsi + jsi.fcr, jsi.fcd = reply, dfuture +} + +// Checks for activity from our consumer. +// If we do not think we are active send an async error. +func (sub *Subscription) activityCheck() { + sub.mu.Lock() + jsi := sub.jsi + if jsi == nil { + sub.mu.Unlock() + return + } + + active := jsi.active + jsi.hbc.Reset(jsi.hbi) + jsi.active = false + nc := sub.conn + closed := sub.closed + sub.mu.Unlock() + + if !active && !closed { + nc.mu.Lock() + if errCB := nc.Opts.AsyncErrorCB; errCB != nil { + nc.ach.push(func() { errCB(nc, sub, ErrConsumerNotActive) }) + } + nc.mu.Unlock() + } +} + +// scheduleHeartbeatCheck sets up the timer check to make sure we are active +// or receiving idle heartbeats.. +func (sub *Subscription) scheduleHeartbeatCheck() { + sub.mu.Lock() + defer sub.mu.Unlock() + + jsi := sub.jsi + if jsi == nil { + return + } + + if jsi.hbc == nil { + jsi.hbc = time.AfterFunc(jsi.hbi*hbcThresh, sub.activityCheck) + } else { + jsi.hbc.Reset(jsi.hbi) } - jsi.fcs[dfuture] = reply - jsi.mu.Unlock() } // handleConsumerSequenceMismatch will send an async error that can be used to restart a push based consumer. @@ -1272,12 +1701,13 @@ func (nc *Conn) handleConsumerSequenceMismatch(sub *Subscription, err error) { nc.mu.Unlock() } -// processControlFlow will automatically respond to control messages sent by the server. -func (nc *Conn) processSequenceMismatch(msg *Msg, s *Subscription, jsi *jsSub) { +// checkForSequenceMismatch will make sure we have not missed any messages since last seen. +func (nc *Conn) checkForSequenceMismatch(msg *Msg, s *Subscription, jsi *jsSub) { // Process heartbeat received, get latest control metadata if present. - jsi.mu.RLock() - ctrl := jsi.cmeta - jsi.mu.RUnlock() + s.mu.Lock() + ctrl, ordered := jsi.cmeta, jsi.ordered + jsi.active = true + s.mu.Unlock() if ctrl == _EMPTY_ { return @@ -1290,7 +1720,7 @@ func (nc *Conn) processSequenceMismatch(msg *Msg, s *Subscription, jsi *jsSub) { // Consumer sequence. var ldseq string - dseq := tokens[6] + dseq := tokens[ackConsumerSeqTokenPos] hdr := msg.Header[lastConsumerSeqHdr] if len(hdr) == 1 { ldseq = hdr[0] @@ -1301,13 +1731,19 @@ func (nc *Conn) processSequenceMismatch(msg *Msg, s *Subscription, jsi *jsSub) { if ldseq != dseq { // Dispatch async error including details such as // from where the consumer could be restarted. - sseq := parseNum(tokens[5]) - ecs := &ErrConsumerSequenceMismatch{ - StreamResumeSequence: uint64(sseq), - ConsumerSequence: uint64(parseNum(dseq)), - LastConsumerSequence: uint64(parseNum(ldseq)), + sseq := parseNum(tokens[ackStreamSeqTokenPos]) + if ordered { + s.mu.Lock() + s.resetOrderedConsumer(jsi.sseq + 1) + s.mu.Unlock() + } else { + ecs := &ErrConsumerSequenceMismatch{ + StreamResumeSequence: uint64(sseq), + ConsumerSequence: uint64(parseNum(dseq)), + LastConsumerSequence: uint64(parseNum(ldseq)), + } + nc.handleConsumerSequenceMismatch(s, ecs) } - nc.handleConsumerSequenceMismatch(s, ecs) } } @@ -1338,6 +1774,7 @@ func (js *js) lookupStreamBySubject(subj string) (string, error) { if err := json.Unmarshal(resp.Data, &slr); err != nil { return _EMPTY_, err } + if slr.Error != nil || len(slr.Streams) != 1 { return _EMPTY_, ErrNoMatchingStream } @@ -1347,10 +1784,24 @@ func (js *js) lookupStreamBySubject(subj string) (string, error) { type subOpts struct { // For attaching. stream, consumer string - // For manual ack - mack bool // For creating or updating. cfg *ConsumerConfig + // For binding a subscription to a consumer without creating it. + bound bool + // For manual ack + mack bool + // For an ordered consumer. + ordered bool +} + +// OrderedConsumer will create a fifo direct/ephemeral consumer for in order delivery of messages. +// There are no redeliveries and no acks, and flow control and heartbeats will be added but +// will be taken care of without additional client code. +func OrderedConsumer() SubOpt { + return subOptFn(func(opts *subOpts) error { + opts.ordered = true + return nil + }) } // ManualAck disables auto ack functionality for async subscriptions. @@ -1361,17 +1812,28 @@ func ManualAck() SubOpt { }) } +// Description will set the description for the created consumer. +func Description(description string) SubOpt { + return subOptFn(func(opts *subOpts) error { + opts.cfg.Description = description + return nil + }) +} + // Durable defines the consumer name for JetStream durable subscribers. -func Durable(name string) SubOpt { +func Durable(consumer string) SubOpt { return subOptFn(func(opts *subOpts) error { - if opts.cfg.Durable != "" { + if opts.cfg.Durable != _EMPTY_ { return fmt.Errorf("nats: option Durable set more than once") } - if strings.Contains(name, ".") { + if opts.consumer != _EMPTY_ && opts.consumer != consumer { + return fmt.Errorf("nats: duplicate consumer names (%s and %s)", opts.consumer, consumer) + } + if strings.Contains(consumer, ".") { return ErrInvalidDurableName } - opts.cfg.Durable = name + opts.cfg.Durable = consumer return nil }) } @@ -1394,6 +1856,15 @@ func DeliverLast() SubOpt { }) } +// DeliverLastPerSubject configures a Consumer to receive messages +// starting with the latest one for each filtered subject. +func DeliverLastPerSubject() SubOpt { + return subOptFn(func(opts *subOpts) error { + opts.cfg.DeliverPolicy = DeliverLastPerSubjectPolicy + return nil + }) +} + // DeliverNew configures a Consumer to receive messages // published after the subscription. func DeliverNew() SubOpt { @@ -1473,6 +1944,14 @@ func ReplayOriginal() SubOpt { }) } +// ReplayInstant replays the messages as fast as possible. +func ReplayInstant() SubOpt { + return subOptFn(func(opts *subOpts) error { + opts.cfg.ReplayPolicy = ReplayInstantPolicy + return nil + }) +} + // RateLimit is the Bits per sec rate limit applied to a push consumer. func RateLimit(n uint64) SubOpt { return subOptFn(func(opts *subOpts) error { @@ -1482,9 +1961,46 @@ func RateLimit(n uint64) SubOpt { } // BindStream binds a consumer to a stream explicitly based on a name. -func BindStream(name string) SubOpt { +// When a stream name is not specified, the library uses the subscribe +// subject as a way to find the stream name. It is done by making a request +// to the server to get list of stream names that have a fileter for this +// subject. If the returned list contains a single stream, then this +// stream name will be used, otherwise the `ErrNoMatchingStream` is returned. +// To avoid the stream lookup, provide the stream name with this function. +// See also `Bind()`. +func BindStream(stream string) SubOpt { return subOptFn(func(opts *subOpts) error { - opts.stream = name + if opts.stream != _EMPTY_ && opts.stream != stream { + return fmt.Errorf("nats: duplicate stream name (%s and %s)", opts.stream, stream) + } + + opts.stream = stream + return nil + }) +} + +// Bind binds a subscription to an existing consumer from a stream without attempting to create. +// The first argument is the stream name and the second argument will be the consumer name. +func Bind(stream, consumer string) SubOpt { + return subOptFn(func(opts *subOpts) error { + if stream == _EMPTY_ { + return ErrStreamNameRequired + } + if consumer == _EMPTY_ { + return ErrConsumerNameRequired + } + + // In case of pull subscribers, the durable name is a required parameter + // so check that they are not different. + if opts.cfg.Durable != _EMPTY_ && opts.cfg.Durable != consumer { + return fmt.Errorf("nats: duplicate consumer names (%s and %s)", opts.cfg.Durable, consumer) + } + if opts.stream != _EMPTY_ && opts.stream != stream { + return fmt.Errorf("nats: duplicate stream name (%s and %s)", opts.stream, stream) + } + opts.stream = stream + opts.consumer = consumer + opts.bound = true return nil }) } @@ -1505,6 +2021,20 @@ func IdleHeartbeat(duration time.Duration) SubOpt { }) } +// DeliverSubject specifies the JetStream consumer deliver subject. +// +// This option is used only in situations where the consumer does not exist +// and a creation request is sent to the server. If not provided, an inbox +// will be selected. +// If a consumer exists, then the NATS subscription will be created on +// the JetStream consumer's DeliverSubject, not necessarily this subject. +func DeliverSubject(subject string) SubOpt { + return subOptFn(func(opts *subOpts) error { + opts.cfg.DeliverSubject = subject + return nil + }) +} + func (sub *Subscription) ConsumerInfo() (*ConsumerInfo, error) { sub.mu.Lock() // TODO(dlc) - Better way to mark especially if we attach. @@ -1541,11 +2071,57 @@ func PullMaxWaiting(n int) SubOpt { var errNoMessages = errors.New("nats: no messages") +// Returns if the given message is a user message or not, and if +// `checkSts` is true, returns appropriate error based on the +// content of the status (404, etc..) +func checkMsg(msg *Msg, checkSts bool) (usrMsg bool, err error) { + // Assume user message + usrMsg = true + + // If payload or no header, consider this a user message + if len(msg.Data) > 0 || len(msg.Header) == 0 { + return + } + // Look for status header + val := msg.Header.Get(statusHdr) + // If not present, then this is considered a user message + if val == _EMPTY_ { + return + } + // At this point, this is not a user message since there is + // no payload and a "Status" header. + usrMsg = false + + // If we don't care about status, we are done. + if !checkSts { + return + } + switch val { + case noResponders: + err = ErrNoResponders + case noMessagesSts: + // 404 indicates that there are no messages. + err = errNoMessages + case reqTimeoutSts: + // Older servers may send a 408 when a request in the server was expired + // and interest is still found, which will be the case for our + // implementation. Regardless, ignore 408 errors until receiving at least + // one message. + err = ErrTimeout + default: + err = fmt.Errorf("nats: %s", msg.Header.Get(descrHdr)) + } + return +} + // Fetch pulls a batch of messages from a stream for a pull consumer. func (sub *Subscription) Fetch(batch int, opts ...PullOpt) ([]*Msg, error) { if sub == nil { return nil, ErrBadSubscription } + if batch < 1 { + return nil, ErrInvalidArg + } var o pullOpts for _, opt := range opts { @@ -1559,14 +2135,18 @@ func (sub *Subscription) Fetch(batch int, opts ...PullOpt) ([]*Msg, error) { sub.mu.Lock() jsi := sub.jsi - if jsi == nil || sub.typ != PullSubscription { + // Reject if this is not a pull subscription. Note that sub.typ is SyncSubscription, + // so check for jsi.pull boolean instead. + if jsi == nil || !jsi.pull { sub.mu.Unlock() return nil, ErrTypeSubscription } - nc, _ := sub.conn, sub.Subject - stream, consumer := sub.jsi.stream, sub.jsi.consumer + nc := sub.conn + nms := sub.jsi.nms + rply := sub.jsi.deliver js := sub.jsi.js + pmc := len(sub.mch) > 0 ttl := o.ttl if ttl == 0 { @@ -1600,22 +2180,6 @@ func (sub *Subscription) Fetch(batch int, opts ...PullOpt) ([]*Msg, error) { return nil, err } - // Check for empty payload message and process synchronously - // any status messages. - checkMsg := func(msg *Msg) error { - if len(msg.Data) == 0 { - switch msg.Header.Get(statusHdr) { - case noResponders: - return ErrNoResponders - case noMessages: - return errNoMessages - case "400", "408", "409": - return fmt.Errorf("nats: %s", msg.Header.Get(descrHdr)) - } - } - return nil - } - checkCtxErr := func(err error) error { if o.ctx == nil && err == context.DeadlineExceeded { return ErrTimeout @@ -1624,195 +2188,82 @@ func (sub *Subscription) Fetch(batch int, opts ...PullOpt) ([]*Msg, error) { } var ( - gotNoMessages bool - nr = &nextRequest{Batch: batch, NoWait: true} - req, _ = json.Marshal(nr) - reqNext = js.apiSubj(fmt.Sprintf(apiRequestNextT, stream, consumer)) - expires = ttl - 10*time.Millisecond - msgs = make([]*Msg, 0) + msgs = make([]*Msg, 0, batch) + msg *Msg + start = time.Now() ) - - if batch == 1 { - // To optimize single message no wait fetch, we use a shared wildcard - // subscription per pull subscriber to wait for the response. - resp, err := jsi.fetchNoWait(ctx, reqNext, req) - if err != nil { - return nil, checkCtxErr(err) - } - - // In case of a no messages instant error, then fallback - // into longer version of pull batch request. - err = checkMsg(resp) + for pmc && len(msgs) < batch { + // Check next msg with booleans that say that this is an internal call + // for a pull subscribe (so don't reject it) and don't wait if there + // are no messages. + msg, err = sub.nextMsgWithContext(ctx, true, false) if err != nil { if err == errNoMessages { - // Use old request style for the retry of the pull request - // in order to use auto UNSUB 1 to prevent the server - // from delivering a message when there is no more interest. - nr.NoWait = false - nr.Expires = expires - req, _ = json.Marshal(nr) - resp, err = nc.oldRequestWithContext(ctx, reqNext, nil, req) - if err != nil { - return nil, checkCtxErr(err) - } - - // This next message, could also be an error - // (e.g. 408 due to request timeout). - err = checkMsg(resp) - if err != nil { - return nil, err - } - return []*Msg{resp}, nil - } else { - // Hard error - return nil, checkCtxErr(err) + err = nil } + break } - return []*Msg{resp}, nil - } - - // Setup a request where we will wait for the first response - // in case of errors, then dispatch the rest of the replies - // to the channel. - inbox := NewInbox() - - mch := make(chan *Msg, batch) - s, err := nc.subscribe(inbox, _EMPTY_, nil, mch, true, nil) - if err != nil { - return nil, err - } - - // Remove interest in the subscription at the end so that the - // this inbox does not get delivered the results intended - // for another request. - defer s.Unsubscribe() - - // Make a publish request to get results of the pull. - err = nc.publish(reqNext, inbox, nil, req) - if err != nil { - s.Unsubscribe() - return nil, err - } - - // Try to get the first message or error with NoWait. - var ( - firstMsg *Msg - ok bool - ) - select { - case firstMsg, ok = <-mch: - if !ok { - err = s.getNextMsgErr() - } else { - err = s.processNextMsgDelivered(firstMsg) - if err == nil { - err = checkMsg(firstMsg) - } + // Check msg but just to determine if this is a user message + // or status message, however, we don't care about values of status + // messages at this point in the Fetch() call, so checkMsg can't + // return an error. + if usrMsg, _ := checkMsg(msg, false); usrMsg { + msgs = append(msgs, msg) } - case <-ctx.Done(): - err = checkCtxErr(ctx.Err()) - } - - // If the first error is 'no more messages', then switch into - // longer form version of the request that waits for messages. - if err == errNoMessages { - gotNoMessages = true - } else if err != nil { - // We should be getting the response from the server - // in case we got a poll error, so stop and cleanup. - s.Unsubscribe() - return nil, err } + if err == nil && len(msgs) < batch { + // For batch real size of 1, it does not make sense to set no_wait in + // the request. + noWait := batch-len(msgs) > 1 + var nr nextRequest + + sendReq := func() error { + ttl -= time.Since(start) + if ttl < 0 { + // At this point consider that we have timed-out + return context.DeadlineExceeded + } + // Make our request expiration a bit shorter than the current timeout. + expires := ttl + if ttl >= 20*time.Millisecond { + expires = ttl - 10*time.Millisecond + } - if gotNoMessages { - // We started with a 404 response right away, so fallback into - // second request that waits longer for messages to delivered. - nr.NoWait = false - nr.Expires = expires - req, _ = json.Marshal(nr) - - // Since first message was an error we UNSUB (batch+1) - // since we are counting it as the first message. - err = s.AutoUnsubscribe(batch + 1) - if err != nil { - return nil, err - } - - // Make another request and wait for the messages... - err = nc.publish(reqNext, inbox, nil, req) - if err != nil { - s.Unsubscribe() - return nil, err + nr.Batch = batch - len(msgs) + nr.Expires = expires + nr.NoWait = noWait + req, _ := json.Marshal(nr) + return nc.PublishRequest(nms, rply, req) } - // Try to get the first result again or return the error. - select { - case firstMsg, ok = <-mch: - if !ok { - err = s.getNextMsgErr() - } else { - err = s.processNextMsgDelivered(firstMsg) - if err == nil { - err = checkMsg(firstMsg) + err = sendReq() + for err == nil && len(msgs) < batch { + // Ask for next message and wait if there are no messages + msg, err = sub.nextMsgWithContext(ctx, true, true) + if err == nil { + var usrMsg bool + + usrMsg, err = checkMsg(msg, true) + if err == nil && usrMsg { + msgs = append(msgs, msg) + } else if noWait && (err == errNoMessages) && len(msgs) == 0 { + // If we have a 404 for our "no_wait" request and have + // not collected any message, then resend request to + // wait this time. + noWait = false + err = sendReq() + } else if err == ErrTimeout && len(msgs) == 0 { + // If we get a 408, we will bail if we already collected some + // messages, otherwise ignore and go back calling nextMsg. + err = nil } } - case <-ctx.Done(): - err = checkCtxErr(ctx.Err()) - } - if err != nil { - s.Unsubscribe() - return nil, err - } - // Check again if the delivered next message is a status error. - err = checkMsg(firstMsg) - if err != nil { - s.Unsubscribe() - return nil, err - } - } else { - // We are receiving messages at this point. Send UNSUB to let - // the server clear interest once enough replies are delivered. - err = s.AutoUnsubscribe(batch) - if err != nil { - return nil, err } } - - msgs = append(msgs, firstMsg) - for { - var ( - msg *Msg - ok bool - ) - select { - case msg, ok = <-mch: - if !ok { - err = s.getNextMsgErr() - } else { - err = s.processNextMsgDelivered(msg) - if err == nil { - err = checkMsg(msg) - } - } - case <-ctx.Done(): - return msgs, checkCtxErr(err) - } - if err != nil { - // Discard the error which may have been a timeout - // or 408 request timeout status from the server, - // and just the return delivered messages. - break - } - if msg != nil { - msgs = append(msgs, msg) - } - - if len(msgs) == batch { - // Done! - break - } + // If there is at least a message added to msgs, then need to return OK and no error + if err != nil && len(msgs) == 0 { + return nil, checkCtxErr(err) } - return msgs, nil } @@ -1837,6 +2288,9 @@ func (js *js) getConsumerInfoContext(ctx context.Context, stream, consumer strin return nil, err } if info.Error != nil { + if info.Error.Code == 404 { + return nil, ErrConsumerNotFound + } return nil, fmt.Errorf("nats: %s", info.Error.Description) } return info.ConsumerInfo, nil @@ -1850,13 +2304,11 @@ func (m *Msg) checkReply() (*js, *jsSub, error) { return nil, nil, ErrMsgNoReply } sub := m.Sub - sub.mu.Lock() if sub.jsi == nil { - sub.mu.Unlock() - // Not using a JS context. return nil, nil, nil } + sub.mu.Lock() js := sub.jsi.js jsi := sub.jsi sub.mu.Unlock() @@ -1925,7 +2377,7 @@ func (m *Msg) Ack(opts ...AckOpt) error { return m.ackReply(ackAck, false, opts...) } -// Ack is the synchronous version of Ack. This indicates successful message +// AckSync is the synchronous version of Ack. This indicates successful message // processing. func (m *Msg) AckSync(opts ...AckOpt) error { return m.ackReply(ackAck, true, opts...) @@ -1958,13 +2410,28 @@ type MsgMetadata struct { Timestamp time.Time Stream string Consumer string + Domain string } +const ( + ackDomainTokenPos = 2 + ackAccHashTokenPos = 3 + ackStreamTokenPos = 4 + ackConsumerTokenPos = 5 + ackNumDeliveredTokenPos = 6 + ackStreamSeqTokenPos = 7 + ackConsumerSeqTokenPos = 8 + ackTimestampSeqTokenPos = 9 + ackNumPendingTokenPos = 10 +) + func getMetadataFields(subject string) ([]string, error) { - const expectedTokens = 9 - const btsep = '.' + const v1TokenCounts = 9 + const v2TokenCounts = 12 + const noDomainName = "_" - tsa := [expectedTokens]string{} + const btsep = '.' + tsa := [v2TokenCounts]string{} start, tokens := 0, tsa[:0] for i := 0; i < len(subject); i++ { if subject[i] == btsep { @@ -1973,9 +2440,42 @@ func getMetadataFields(subject string) ([]string, error) { } } tokens = append(tokens, subject[start:]) - if len(tokens) != expectedTokens || tokens[0] != "$JS" || tokens[1] != "ACK" { + // + // Newer server will include the domain name and account hash in the subject, + // and a token at the end. + // + // Old subject was: + // $JS.ACK....... + // + // New subject would be: + // $JS.ACK.......... + // + // v1 has 9 tokens, v2 has 12, but we must not be strict on the 12th since + // it may be removed in the future. Also, the library has no use for it. + // The point is that a v2 ACK subject is valid if it has at least 11 tokens. + // + l := len(tokens) + // If lower than 9 or more than 9 but less than 11, report an error + if l < v1TokenCounts || (l > v1TokenCounts && l < v2TokenCounts-1) { + return nil, ErrNotJSMessage + } + if tokens[0] != "$JS" || tokens[1] != "ACK" { return nil, ErrNotJSMessage } + // For v1 style, we insert 2 empty tokens (domain and hash) so that the + // rest of the library references known fields at a constant location. + if l == 9 { + // Extend the array (we know the backend is big enough) + tokens = append(tokens, _EMPTY_, _EMPTY_) + // Move to the right anything that is after "ACK" token. + copy(tokens[ackDomainTokenPos+2:], tokens[ackDomainTokenPos:]) + // Clear the domain and hash tokens + tokens[ackDomainTokenPos], tokens[ackAccHashTokenPos] = _EMPTY_, _EMPTY_ + + } else if tokens[ackDomainTokenPos] == noDomainName { + // If domain is "_", replace with empty value. + tokens[ackDomainTokenPos] = _EMPTY_ + } return tokens, nil } @@ -1992,14 +2492,15 @@ func (m *Msg) Metadata() (*MsgMetadata, error) { } meta := &MsgMetadata{ - NumDelivered: uint64(parseNum(tokens[4])), - NumPending: uint64(parseNum(tokens[8])), - Timestamp: time.Unix(0, parseNum(tokens[7])), - Stream: tokens[2], - Consumer: tokens[3], - } - meta.Sequence.Stream = uint64(parseNum(tokens[5])) - meta.Sequence.Consumer = uint64(parseNum(tokens[6])) + Domain: tokens[ackDomainTokenPos], + NumDelivered: uint64(parseNum(tokens[ackNumDeliveredTokenPos])), + NumPending: uint64(parseNum(tokens[ackNumPendingTokenPos])), + Timestamp: time.Unix(0, parseNum(tokens[ackTimestampSeqTokenPos])), + Stream: tokens[ackStreamTokenPos], + Consumer: tokens[ackConsumerTokenPos], + } + meta.Sequence.Stream = uint64(parseNum(tokens[ackStreamSeqTokenPos])) + meta.Sequence.Consumer = uint64(parseNum(tokens[ackConsumerSeqTokenPos])) return meta, nil } @@ -2038,7 +2539,7 @@ const ( // AckExplicitPolicy requires ack or nack for all messages. AckExplicitPolicy - // For setting + // For configuration mismatch check ackPolicyNotSet = 99 ) @@ -2098,6 +2599,9 @@ const ( // ReplayOriginalPolicy will maintain the same timing as the messages were received. ReplayOriginalPolicy + + // For configuration mismatch check + replayPolicyNotSet = 99 ) func (p *ReplayPolicy) UnmarshalJSON(data []byte) error { @@ -2147,13 +2651,20 @@ const ( // consumer is created. DeliverNewPolicy - // DeliverByStartTimePolicy will deliver messages starting from a given + // DeliverByStartSequencePolicy will deliver messages starting from a given // sequence. DeliverByStartSequencePolicy // DeliverByStartTimePolicy will deliver messages starting from a given // time. DeliverByStartTimePolicy + + // DeliverLastPerSubjectPolicy will start the consumer with the last message + // for all subjects received. + DeliverLastPerSubjectPolicy + + // For configuration mismatch check + deliverPolicyNotSet = 99 ) func (p *DeliverPolicy) UnmarshalJSON(data []byte) error { @@ -2168,6 +2679,8 @@ func (p *DeliverPolicy) UnmarshalJSON(data []byte) error { *p = DeliverByStartSequencePolicy case jsonString("by_start_time"): *p = DeliverByStartTimePolicy + case jsonString("last_per_subject"): + *p = DeliverLastPerSubjectPolicy } return nil @@ -2185,6 +2698,8 @@ func (p DeliverPolicy) MarshalJSON() ([]byte, error) { return json.Marshal("by_start_sequence") case DeliverByStartTimePolicy: return json.Marshal("by_start_time") + case DeliverLastPerSubjectPolicy: + return json.Marshal("last_per_subject") default: return nil, fmt.Errorf("nats: unknown deliver policy %v", p) } diff --git a/vendor/github.com/nats-io/nats.go/jsm.go b/vendor/github.com/nats-io/nats.go/jsm.go index b6a3f8b7a..f40086b29 100644 --- a/vendor/github.com/nats-io/nats.go/jsm.go +++ b/vendor/github.com/nats-io/nats.go/jsm.go @@ -74,23 +74,25 @@ type JetStreamManager interface { // There are sensible defaults for most. If no subjects are // given the name will be used as the only subject. type StreamConfig struct { - Name string `json:"name"` - Subjects []string `json:"subjects,omitempty"` - Retention RetentionPolicy `json:"retention"` - MaxConsumers int `json:"max_consumers"` - MaxMsgs int64 `json:"max_msgs"` - MaxBytes int64 `json:"max_bytes"` - Discard DiscardPolicy `json:"discard"` - MaxAge time.Duration `json:"max_age"` - MaxMsgSize int32 `json:"max_msg_size,omitempty"` - Storage StorageType `json:"storage"` - Replicas int `json:"num_replicas"` - NoAck bool `json:"no_ack,omitempty"` - Template string `json:"template_owner,omitempty"` - Duplicates time.Duration `json:"duplicate_window,omitempty"` - Placement *Placement `json:"placement,omitempty"` - Mirror *StreamSource `json:"mirror,omitempty"` - Sources []*StreamSource `json:"sources,omitempty"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Subjects []string `json:"subjects,omitempty"` + Retention RetentionPolicy `json:"retention"` + MaxConsumers int `json:"max_consumers"` + MaxMsgs int64 `json:"max_msgs"` + MaxBytes int64 `json:"max_bytes"` + Discard DiscardPolicy `json:"discard"` + MaxAge time.Duration `json:"max_age"` + MaxMsgsPerSubject int64 `json:"max_msgs_per_subject"` + MaxMsgSize int32 `json:"max_msg_size,omitempty"` + Storage StorageType `json:"storage"` + Replicas int `json:"num_replicas"` + NoAck bool `json:"no_ack,omitempty"` + Template string `json:"template_owner,omitempty"` + Duplicates time.Duration `json:"duplicate_window,omitempty"` + Placement *Placement `json:"placement,omitempty"` + Mirror *StreamSource `json:"mirror,omitempty"` + Sources []*StreamSource `json:"sources,omitempty"` } // Placement is used to guide placement of streams in clustered JetStream. @@ -146,6 +148,7 @@ type AccountInfo struct { Store uint64 `json:"storage"` Streams int `json:"streams"` Consumers int `json:"consumers"` + Domain string `json:"domain"` API APIStats `json:"api"` Limits AccountLimits `json:"limits"` } @@ -170,6 +173,8 @@ type accountInfoResponse struct { } // AccountInfo retrieves info about the JetStream usage from the current account. +// If JetStream is not enabled, this will return ErrJetStreamNotEnabled +// Other errors can happen but are generally considered retryable func (js *js) AccountInfo(opts ...JSOpt) (*AccountInfo, error) { o, cancel, err := getJSContextOpts(js.opts, opts...) if err != nil { @@ -181,6 +186,10 @@ func (js *js) AccountInfo(opts ...JSOpt) (*AccountInfo, error) { resp, err := js.nc.RequestWithContext(o.ctx, js.apiSubj(apiAccountInfo), nil) if err != nil { + // todo maybe nats server should never have no responder on this subject and always respond if they know there is no js to be had + if err == ErrNoResponders { + err = ErrJetStreamNotEnabled + } return nil, err } var info accountInfoResponse @@ -251,6 +260,9 @@ func (js *js) AddConsumer(stream string, cfg *ConsumerConfig, opts ...JSOpt) (*C return nil, err } if info.Error != nil { + if info.Error.Code == 404 { + return nil, ErrConsumerNotFound + } return nil, errors.New(info.Error.Description) } return info.ConsumerInfo, nil @@ -285,7 +297,11 @@ func (js *js) DeleteConsumer(stream, consumer string, opts ...JSOpt) error { if err := json.Unmarshal(r.Data, &resp); err != nil { return err } + if resp.Error != nil { + if resp.Error.Code == 404 { + return ErrConsumerNotFound + } return errors.New(resp.Error.Description) } return nil @@ -552,6 +568,7 @@ func (js *js) AddStream(cfg *StreamConfig, opts ...JSOpt) (*StreamInfo, error) { if resp.Error != nil { return nil, errors.New(resp.Error.Description) } + return resp.StreamInfo, nil } @@ -580,8 +597,12 @@ func (js *js) StreamInfo(stream string, opts ...JSOpt) (*StreamInfo, error) { return nil, err } if resp.Error != nil { + if resp.Error.Code == 404 { + return nil, ErrStreamNotFound + } return nil, errors.New(resp.Error.Description) } + return resp.StreamInfo, nil } @@ -694,7 +715,11 @@ func (js *js) DeleteStream(name string, opts ...JSOpt) error { if err := json.Unmarshal(r.Data, &resp); err != nil { return err } + if resp.Error != nil { + if resp.Error.Code == 404 { + return ErrStreamNotFound + } return errors.New(resp.Error.Description) } return nil diff --git a/vendor/github.com/nats-io/nats.go/nats.go b/vendor/github.com/nats-io/nats.go/nats.go index 88f528109..ed8506eb2 100644 --- a/vendor/github.com/nats-io/nats.go/nats.go +++ b/vendor/github.com/nats-io/nats.go/nats.go @@ -46,7 +46,7 @@ import ( // Default Constants const ( - Version = "1.11.0" + Version = "1.12.3" DefaultURL = "nats://127.0.0.1:4222" DefaultPort = 4222 DefaultMaxReconnect = 60 @@ -146,9 +146,15 @@ var ( ErrInvalidJSAck = errors.New("nats: invalid jetstream publish response") ErrMultiStreamUnsupported = errors.New("nats: multiple streams are not supported") ErrStreamNameRequired = errors.New("nats: stream name is required") + ErrStreamNotFound = errors.New("nats: stream not found") + ErrConsumerNotFound = errors.New("nats: consumer not found") + ErrConsumerNameRequired = errors.New("nats: consumer name is required") ErrConsumerConfigRequired = errors.New("nats: consumer configuration is required") ErrStreamSnapshotConfigRequired = errors.New("nats: stream snapshot configuration is required") ErrDeliverSubjectRequired = errors.New("nats: deliver subject is required") + ErrPullSubscribeToPushConsumer = errors.New("nats: cannot pull subscribe to push based consumer") + ErrPullSubscribeRequired = errors.New("nats: must use pull subscribe to bind to pull based consumer") + ErrConsumerNotActive = errors.New("nats: consumer not active") ) func init() { @@ -190,6 +196,26 @@ const ( DRAINING_PUBS ) +func (s Status) String() string { + switch s { + case DISCONNECTED: + return "DISCONNECTED" + case CONNECTED: + return "CONNECTED" + case CLOSED: + return "CLOSED" + case RECONNECTING: + return "RECONNECTING" + case CONNECTING: + return "CONNECTING" + case DRAINING_SUBS: + return "DRAINING_SUBS" + case DRAINING_PUBS: + return "DRAINING_PUBS" + } + return "unknown status" +} + // ConnHandler is used for asynchronous events such as // disconnected and closed connections. type ConnHandler func(*Conn) @@ -430,6 +456,9 @@ type Options struct { // For websocket connections, indicates to the server that the connection // supports compression. If the server does too, then data will be compressed. Compression bool + + // InboxPrefix allows the default _INBOX prefix to be customized + InboxPrefix string } const ( @@ -491,14 +520,17 @@ type Conn struct { ws bool // true if a websocket connection // New style response handler - respSub string // The wildcard subject - respScanf string // The scanf template to extract mux token - respMux *Subscription // A single response subscription - respMap map[string]chan *Msg // Request map for the response msg channels - respRand *rand.Rand // Used for generating suffix + respSub string // The wildcard subject + respSubPrefix string // the wildcard prefix including trailing . + respSubLen int // the length of the wildcard prefix excluding trailing . + respScanf string // The scanf template to extract mux token + respMux *Subscription // A single response subscription + respMap map[string]chan *Msg // Request map for the response msg channels + respRand *rand.Rand // Used for generating suffix - // JetStream Contexts last account check. - jsLastCheck time.Time + // Msg filters for testing. + // Protected by subsMu + filters map[string]msgFilter } type natsReader struct { @@ -1101,6 +1133,17 @@ func Compression(enabled bool) Option { } } +// CustomInboxPrefix configures the request + reply inbox prefix +func CustomInboxPrefix(p string) Option { + return func(o *Options) error { + if p == "" || strings.Contains(p, ">") || strings.Contains(p, "*") || strings.HasSuffix(p, ".") { + return fmt.Errorf("nats: invald custom prefix") + } + o.InboxPrefix = p + return nil + } +} + // Handler processing // SetDisconnectHandler will set the disconnect event handler. @@ -1247,7 +1290,15 @@ func defaultErrHandler(nc *Conn, sub *Subscription, err error) { } var errStr string if sub != nil { - errStr = fmt.Sprintf("%s on connection [%d] for subscription on %q\n", err.Error(), cid, sub.Subject) + var subject string + sub.mu.Lock() + if sub.jsi != nil { + subject = sub.jsi.psubj + } else { + subject = sub.Subject + } + sub.mu.Unlock() + errStr = fmt.Sprintf("%s on connection [%d] for subscription on %q\n", err.Error(), cid, subject) } else { errStr = fmt.Sprintf("%s on connection [%d]\n", err.Error(), cid) } @@ -2482,6 +2533,13 @@ func (nc *Conn) readLoop() { for { buf, err := br.Read() if err == nil { + // With websocket, it is possible that there is no error but + // also no buffer returned (either WS control message or read of a + // partial compressed message). We could call parse(buf) which + // would ignore an empty buffer, but simply go back to top of the loop. + if len(buf) == 0 { + continue + } err = nc.parse(buf) } if err != nil { @@ -2536,15 +2594,22 @@ func (nc *Conn) waitForMsgs(s *Subscription) { mcb := s.mcb max = s.max closed = s.closed + var fcReply string if !s.closed { s.delivered++ delivered = s.delivered - if s.jsi != nil && s.jsi.fc && len(s.jsi.fcs) > 0 { - s.checkForFlowControlResponse(delivered) + if s.jsi != nil { + fcReply = s.checkForFlowControlResponse() + s.jsi.active = true } } s.mu.Unlock() + // Respond to flow control if applicable + if fcReply != _EMPTY_ { + nc.Publish(fcReply, nil) + } + if closed { break } @@ -2576,6 +2641,32 @@ func (nc *Conn) waitForMsgs(s *Subscription) { s.mu.Unlock() } +// Used for debugging and simulating loss for certain tests. +// Return what is to be used. If we return nil the message will be dropped. +type msgFilter func(m *Msg) *Msg + +func (nc *Conn) addMsgFilter(subject string, filter msgFilter) { + nc.subsMu.Lock() + defer nc.subsMu.Unlock() + + if nc.filters == nil { + nc.filters = make(map[string]msgFilter) + } + nc.filters[subject] = filter +} + +func (nc *Conn) removeMsgFilter(subject string) { + nc.subsMu.Lock() + defer nc.subsMu.Unlock() + + if nc.filters != nil { + delete(nc.filters, subject) + if len(nc.filters) == 0 { + nc.filters = nil + } + } +} + // processMsg is called by parse and will place the msg on the // appropriate channel/pending queue for processing. If the channel is full, // or the pending queue is over the pending limits, the connection is @@ -2590,6 +2681,10 @@ func (nc *Conn) processMsg(data []byte) { // that is itself trying to send data to us. nc.subsMu.RLock() sub := nc.subs[nc.ps.ma.sid] + var mf msgFilter + if nc.filters != nil { + mf = nc.filters[string(nc.ps.ma.subject)] + } nc.subsMu.RUnlock() if sub == nil { @@ -2604,15 +2699,18 @@ func (nc *Conn) processMsg(data []byte) { // It's possible that we end-up not using the message, but that's ok. // FIXME(dlc): Need to copy, should/can do COW? - msgPayload := make([]byte, len(data)) - copy(msgPayload, data) + var msgPayload = data + if !nc.ps.msgCopied { + msgPayload = make([]byte, len(data)) + copy(msgPayload, data) + } // Check if we have headers encoded here. var h Header var err error var ctrlMsg bool - var hasFC bool - var hasHBs bool + var ctrlType int + var fcReply string if nc.ps.ma.hdr > 0 { hbuf := msgPayload[:nc.ps.ma.hdr] @@ -2632,6 +2730,14 @@ func (nc *Conn) processMsg(data []byte) { // FIXME(dlc): Should we recycle these containers? m := &Msg{Header: h, Data: msgPayload, Subject: subj, Reply: reply, Sub: sub} + // Check for message filters. + if mf != nil { + if m = mf(m); m == nil { + // Drop message. + return + } + } + sub.mu.Lock() // Check if closed. @@ -2643,7 +2749,21 @@ func (nc *Conn) processMsg(data []byte) { // Skip flow control messages in case of using a JetStream context. jsi := sub.jsi if jsi != nil { - ctrlMsg, hasHBs, hasFC = isControlMessage(m), jsi.hbs, jsi.fc + // There has to be a header for it to be a control message. + if h != nil { + ctrlMsg, ctrlType = isJSControlMessage(m) + if ctrlMsg && ctrlType == jsCtrlHB { + // Check if the hearbeat has a "Consumer Stalled" header, if + // so, the value is the FC reply to send a nil message to. + // We will send it at the end of this function. + fcReply = m.Header.Get(consumerStalledHdr) + } + } + // Check for ordered consumer here. If checkOrdered returns true that means it detected a gap. + if !ctrlMsg && jsi.ordered && sub.checkOrderedMsgs(m) { + sub.mu.Unlock() + return + } } // Skip processing if this is a control message. @@ -2687,30 +2807,33 @@ func (nc *Conn) processMsg(data []byte) { sub.pTail = m } } - if jsi != nil && hasHBs { + if jsi != nil { // Store the ACK metadata from the message to // compare later on with the received heartbeat. - jsi.trackSequences(m.Reply) + sub.trackSequences(m.Reply) } - } else if hasFC && m.Reply != _EMPTY_ { + } else if ctrlType == jsCtrlFC && m.Reply != _EMPTY_ { // This is a flow control message. // If we have no pending, go ahead and send in place. - if sub.pMsgs == 0 { - nc.Publish(m.Reply, nil) + if sub.pMsgs <= 0 { + fcReply = m.Reply } else { // Schedule a reply after the previous message is delivered. - jsi.scheduleFlowControlResponse(sub.delivered+uint64(sub.pMsgs), m.Reply) + sub.scheduleFlowControlResponse(sub.delivered+uint64(sub.pMsgs), m.Reply) } } - // Clear SlowConsumer status. + // Clear any SlowConsumer status. sub.sc = false - sub.mu.Unlock() + if fcReply != _EMPTY_ { + nc.Publish(fcReply, nil) + } + // Handle control heartbeat messages. - if ctrlMsg && hasHBs && m.Reply == _EMPTY_ { - nc.processSequenceMismatch(m, sub, jsi) + if ctrlMsg && ctrlType == jsCtrlHB && m.Reply == _EMPTY_ { + nc.checkForSequenceMismatch(m, sub, jsi) } return @@ -3072,8 +3195,10 @@ const ( descrHdr = "Description" lastConsumerSeqHdr = "Nats-Last-Consumer" lastStreamSeqHdr = "Nats-Last-Stream" + consumerStalledHdr = "Nats-Consumer-Stalled" noResponders = "503" - noMessages = "404" + noMessagesSts = "404" + reqTimeoutSts = "408" controlMsg = "100" statusLen = 3 // e.g. 20x, 40x, 50x ) @@ -3113,10 +3238,7 @@ func decodeHeadersMsg(data []byte) (Header, error) { // // https://golang.org/pkg/net/textproto/#Reader.ReadMIMEHeader func readMIMEHeader(tp *textproto.Reader) (textproto.MIMEHeader, error) { - var ( - m = make(textproto.MIMEHeader) - strs []string - ) + m := make(textproto.MIMEHeader) for { kv, err := tp.ReadLine() if len(kv) == 0 { @@ -3138,16 +3260,7 @@ func readMIMEHeader(tp *textproto.Reader) (textproto.MIMEHeader, error) { i++ } value := string(kv[i:]) - vv := m[key] - if vv == nil && len(strs) > 0 { - // Single value header. - vv, strs = strs[:1:1], strs[1:] - vv[0] = value - m[key] = vv - } else { - // Multi value header. - m[key] = append(vv, value) - } + m[key] = append(m[key], value) if err != nil { return m, err } @@ -3343,7 +3456,8 @@ func (nc *Conn) createNewRequestAndSend(subj string, hdr, data []byte) (chan *Ms // Create new literal Inbox and map to a chan msg. mch := make(chan *Msg, RequestChanLen) respInbox := nc.newRespInbox() - token := respInbox[respInboxPrefixLen:] + token := respInbox[nc.respSubLen:] + nc.respMap[token] = mch if nc.respMux == nil { // Create the response subscription we will use for all new style responses. @@ -3450,7 +3564,7 @@ func (nc *Conn) newRequest(subj string, hdr, data []byte, timeout time.Duration) // with the Inbox reply and return the first reply received. // This is optimized for the case of multiple responses. func (nc *Conn) oldRequest(subj string, hdr, data []byte, timeout time.Duration) (*Msg, error) { - inbox := NewInbox() + inbox := nc.newInbox() ch := make(chan *Msg, RequestChanLen) s, err := nc.subscribe(inbox, _EMPTY_, nil, ch, true, nil) @@ -3470,12 +3584,11 @@ func (nc *Conn) oldRequest(subj string, hdr, data []byte, timeout time.Duration) // InboxPrefix is the prefix for all inbox subjects. const ( - InboxPrefix = "_INBOX." - inboxPrefixLen = len(InboxPrefix) - respInboxPrefixLen = inboxPrefixLen + nuidSize + 1 - replySuffixLen = 8 // Gives us 62^8 - rdigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - base = 62 + InboxPrefix = "_INBOX." + inboxPrefixLen = len(InboxPrefix) + replySuffixLen = 8 // Gives us 62^8 + rdigits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + base = 62 ) // NewInbox will return an inbox string which can be used for directed replies from @@ -3490,10 +3603,23 @@ func NewInbox() string { return string(b[:]) } +func (nc *Conn) newInbox() string { + if nc.Opts.InboxPrefix == _EMPTY_ { + return NewInbox() + } + + var sb strings.Builder + sb.WriteString(nc.Opts.InboxPrefix) + sb.WriteByte('.') + sb.WriteString(nuid.Next()) + return sb.String() +} + // Function to init new response structures. func (nc *Conn) initNewResp() { - // _INBOX wildcard - nc.respSub = fmt.Sprintf("%s.*", NewInbox()) + nc.respSubPrefix = fmt.Sprintf("%s.", nc.newInbox()) + nc.respSubLen = len(nc.respSubPrefix) + nc.respSub = fmt.Sprintf("%s*", nc.respSubPrefix) nc.respMap = make(map[string]chan *Msg) nc.respRand = rand.New(rand.NewSource(time.Now().UnixNano())) } @@ -3505,15 +3631,17 @@ func (nc *Conn) newRespInbox() string { if nc.respMap == nil { nc.initNewResp() } - var b [respInboxPrefixLen + replySuffixLen]byte - pres := b[:respInboxPrefixLen] - copy(pres, nc.respSub) + + var sb strings.Builder + sb.WriteString(nc.respSubPrefix) + rn := nc.respRand.Int63() - for i, l := respInboxPrefixLen, rn; i < len(b); i++ { - b[i] = rdigits[l%base] - l /= base + for i := 0; i < replySuffixLen; i++ { + sb.WriteByte(rdigits[rn%base]) + rn /= base } - return string(b[:]) + + return sb.String() } // NewRespInbox is the new format used for _INBOX. @@ -3635,7 +3763,7 @@ func (nc *Conn) subscribeLocked(subj, queue string, cb MsgHandler, ch chan *Msg, if badSubject(subj) { return nil, ErrBadSubject } - if queue != "" && badQueue(queue) { + if queue != _EMPTY_ && badQueue(queue) { return nil, ErrBadQueueName } @@ -3651,7 +3779,13 @@ func (nc *Conn) subscribeLocked(subj, queue string, cb MsgHandler, ch chan *Msg, return nil, ErrBadSubscription } - sub := &Subscription{Subject: subj, Queue: queue, mcb: cb, conn: nc, jsi: js} + sub := &Subscription{ + Subject: subj, + Queue: queue, + mcb: cb, + conn: nc, + jsi: js, + } // Set pending limits. if ch != nil { sub.pMsgsLimit = cap(ch) @@ -3716,6 +3850,12 @@ func (nc *Conn) removeSub(s *Subscription) { } s.mch = nil + // If JS subscription then stop HB timer. + if jsi := s.jsi; jsi != nil && jsi.hbc != nil { + jsi.hbc.Stop() + jsi.hbc = nil + } + // Mark as invalid s.closed = true if s.pCond != nil { @@ -3742,6 +3882,12 @@ func (s *Subscription) Type() SubscriptionType { } s.mu.Lock() defer s.mu.Unlock() + // Pull subscriptions are really a SyncSubscription and we want this + // type to be set internally for all delivered messages management, etc.. + // So check when to return PullSubscription to the user. + if s.jsi != nil && s.jsi.pull { + return PullSubscription + } return s.typ } @@ -3759,6 +3905,15 @@ func (s *Subscription) IsValid() bool { // Drain will remove interest but continue callbacks until all messages // have been processed. +// +// For a JetStream subscription, if the library has created the JetStream +// consumer, the library will send a DeleteConsumer request to the server +// when the Drain operation completes. If a failure occurs when deleting +// the JetStream consumer, an error will be reported to the asynchronous +// error callback. +// If you do not wish the JetStream consumer to be automatically deleted, +// ensure that the consumer is not created by the library, which means +// create the consumer with AddConsumer and bind to this consumer. func (s *Subscription) Drain() error { if s == nil { return ErrBadSubscription @@ -3773,6 +3928,15 @@ func (s *Subscription) Drain() error { } // Unsubscribe will remove interest in the given subject. +// +// For a JetStream subscription, if the library has created the JetStream +// consumer, it will send a DeleteConsumer request to the server (if the +// unsubscribe itself was successful). If the delete operation fails, the +// error will be returned. +// If you do not wish the JetStream consumer to be automatically deleted, +// ensure that the consumer is not created by the library, which means +// create the consumer with AddConsumer and bind to this consumer (using +// the nats.Bind() option). func (s *Subscription) Unsubscribe() error { if s == nil { return ErrBadSubscription @@ -3780,6 +3944,7 @@ func (s *Subscription) Unsubscribe() error { s.mu.Lock() conn := s.conn closed := s.closed + dc := s.jsi != nil && s.jsi.dc s.mu.Unlock() if conn == nil || conn.IsClosed() { return ErrConnectionClosed @@ -3790,7 +3955,11 @@ func (s *Subscription) Unsubscribe() error { if conn.IsDraining() { return ErrConnectionDraining } - return conn.unsubscribe(s, 0, false) + err := conn.unsubscribe(s, 0, false) + if err == nil && dc { + err = s.deleteConsumer() + } + return err } // checkDrained will watch for a subscription to be fully drained @@ -3804,6 +3973,12 @@ func (nc *Conn) checkDrained(sub *Subscription) { // is correct and the server will not send additional information. nc.Flush() + sub.mu.Lock() + // For JS subscriptions, check if we are going to delete the + // JS consumer when drain completes. + dc := sub.jsi != nil && sub.jsi.dc + sub.mu.Unlock() + // Once we are here we just wait for Pending to reach 0 or // any other state to exit this go routine. for { @@ -3823,6 +3998,15 @@ func (nc *Conn) checkDrained(sub *Subscription) { nc.mu.Lock() nc.removeSub(sub) nc.mu.Unlock() + if dc { + if err := sub.deleteConsumer(); err != nil { + nc.mu.Lock() + if errCB := nc.Opts.AsyncErrorCB; errCB != nil { + nc.ach.push(func() { errCB(nc, sub, err) }) + } + nc.mu.Unlock() + } + } return } @@ -3851,22 +4035,19 @@ func (s *Subscription) AutoUnsubscribe(max int) error { // unsubscribe performs the low level unsubscribe to the server. // Use Subscription.Unsubscribe() func (nc *Conn) unsubscribe(sub *Subscription, max int, drainMode bool) error { - // For JetStream consumers, need to clean up ephemeral consumers - // or delete durable ones if called with Unsubscribe. - sub.mu.Lock() - jsi := sub.jsi - sub.mu.Unlock() - if jsi != nil { - err := jsi.unsubscribe(drainMode) - if err != nil { - return err + var maxStr string + if max > 0 { + sub.mu.Lock() + sub.max = uint64(max) + if sub.delivered < sub.max { + maxStr = strconv.Itoa(max) } + sub.mu.Unlock() } nc.mu.Lock() // ok here, but defer is expensive defer nc.mu.Unlock() - defer nc.kickFlusher() if nc.isClosed() { return ErrConnectionClosed @@ -3880,13 +4061,7 @@ func (nc *Conn) unsubscribe(sub *Subscription, max int, drainMode bool) error { return nil } - maxStr := _EMPTY_ - if max > 0 { - s.mu.Lock() - s.max = uint64(max) - s.mu.Unlock() - maxStr = strconv.Itoa(max) - } else if !drainMode { + if maxStr == _EMPTY_ && !drainMode { nc.removeSub(s) } @@ -3913,7 +4088,7 @@ func (s *Subscription) NextMsg(timeout time.Duration) (*Msg, error) { } s.mu.Lock() - err := s.validateNextMsgState() + err := s.validateNextMsgState(false) if err != nil { s.mu.Unlock() return nil, err @@ -3964,7 +4139,7 @@ func (s *Subscription) NextMsg(timeout time.Duration) (*Msg, error) { // validateNextMsgState checks whether the subscription is in a valid // state to call NextMsg and be delivered another message synchronously. // This should be called while holding the lock. -func (s *Subscription) validateNextMsgState() error { +func (s *Subscription) validateNextMsgState(pullSubInternal bool) error { if s.connClosed { return ErrConnectionClosed } @@ -3982,7 +4157,11 @@ func (s *Subscription) validateNextMsgState() error { s.sc = false return ErrSlowConsumer } - + // Unless this is from an internal call, reject use of this API. + // Users should use Fetch() instead. + if !pullSubInternal && s.jsi != nil && s.jsi.pull { + return ErrTypeSubscription + } return nil } @@ -4007,11 +4186,13 @@ func (s *Subscription) processNextMsgDelivered(msg *Msg) error { nc := s.conn max := s.max + var fcReply string // Update some stats. s.delivered++ delivered := s.delivered - if s.jsi != nil && s.jsi.fc && len(s.jsi.fcs) > 0 { - s.checkForFlowControlResponse(delivered) + if s.jsi != nil { + fcReply = s.checkForFlowControlResponse() + s.jsi.active = true } if s.typ == SyncSubscription { @@ -4020,6 +4201,10 @@ func (s *Subscription) processNextMsgDelivered(msg *Msg) error { } s.mu.Unlock() + if fcReply != _EMPTY_ { + nc.Publish(fcReply, nil) + } + if max > 0 { if delivered > max { return ErrMaxMessages @@ -4352,12 +4537,13 @@ func (nc *Conn) resendSubscriptions() { continue } } + subj, queue, sid := s.Subject, s.Queue, s.sid s.mu.Unlock() - nc.bw.writeDirect(fmt.Sprintf(subProto, s.Subject, s.Queue, s.sid)) + nc.bw.writeDirect(fmt.Sprintf(subProto, subj, queue, sid)) if adjustedMax > 0 { maxStr := strconv.Itoa(int(adjustedMax)) - nc.bw.writeDirect(fmt.Sprintf(unsubProto, s.sid, maxStr)) + nc.bw.writeDirect(fmt.Sprintf(unsubProto, sid, maxStr)) } } } @@ -4621,6 +4807,8 @@ func (nc *Conn) drainConnection() { // will be drained and can not publish any additional messages. Upon draining // of the publishers, the connection will be closed. Use the ClosedCB() // option to know when the connection has moved from draining to closed. +// +// See note in Subscription.Drain for JetStream subscriptions. func (nc *Conn) Drain() error { nc.mu.Lock() if nc.isClosed() { diff --git a/vendor/github.com/nats-io/nats.go/parser.go b/vendor/github.com/nats-io/nats.go/parser.go index c9cbfeb65..f5f6da8e4 100644 --- a/vendor/github.com/nats-io/nats.go/parser.go +++ b/vendor/github.com/nats-io/nats.go/parser.go @@ -28,14 +28,15 @@ type msgArg struct { const MAX_CONTROL_LINE_SIZE = 4096 type parseState struct { - state int - as int - drop int - hdr int - ma msgArg - argBuf []byte - msgBuf []byte - scratch [MAX_CONTROL_LINE_SIZE]byte + state int + as int + drop int + hdr int + ma msgArg + argBuf []byte + msgBuf []byte + msgCopied bool + scratch [MAX_CONTROL_LINE_SIZE]byte } const ( @@ -167,7 +168,7 @@ func (nc *Conn) parse(buf []byte) error { if nc.ps.msgBuf != nil { if len(nc.ps.msgBuf) >= nc.ps.ma.size { nc.processMsg(nc.ps.msgBuf) - nc.ps.argBuf, nc.ps.msgBuf, nc.ps.state = nil, nil, MSG_END + nc.ps.argBuf, nc.ps.msgBuf, nc.ps.msgCopied, nc.ps.state = nil, nil, false, MSG_END } else { // copy as much as we can to the buffer and skip ahead. toCopy := nc.ps.ma.size - len(nc.ps.msgBuf) @@ -190,7 +191,7 @@ func (nc *Conn) parse(buf []byte) error { } } else if i-nc.ps.as >= nc.ps.ma.size { nc.processMsg(buf[nc.ps.as:i]) - nc.ps.argBuf, nc.ps.msgBuf, nc.ps.state = nil, nil, MSG_END + nc.ps.argBuf, nc.ps.msgBuf, nc.ps.msgCopied, nc.ps.state = nil, nil, false, MSG_END } case MSG_END: switch b { @@ -403,6 +404,7 @@ func (nc *Conn) parse(buf []byte) error { nc.ps.msgBuf = make([]byte, lrem, nc.ps.ma.size) copy(nc.ps.msgBuf, buf[nc.ps.as:]) + nc.ps.msgCopied = true } else { nc.ps.msgBuf = nc.ps.scratch[len(nc.ps.argBuf):len(nc.ps.argBuf)] nc.ps.msgBuf = append(nc.ps.msgBuf, (buf[nc.ps.as:])...) diff --git a/vendor/github.com/nats-io/nats.go/ws.go b/vendor/github.com/nats-io/nats.go/ws.go index eb0c7d881..a35ce0847 100644 --- a/vendor/github.com/nats-io/nats.go/ws.go +++ b/vendor/github.com/nats-io/nats.go/ws.go @@ -53,6 +53,7 @@ const ( wsContinuationFrame = 0 wsMaxFrameHeaderSize = 14 wsMaxControlPayloadSize = 125 + wsCloseSatusSize = 2 // From https://tools.ietf.org/html/rfc6455#section-11.7 wsCloseStatusNormalClosure = 1000 @@ -72,9 +73,6 @@ const ( // From https://tools.ietf.org/html/rfc6455#section-1.3 var wsGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") -// As per https://tools.ietf.org/html/rfc7692#section-7.2.2 -// add 0x00, 0x00, 0xff, 0xff and then a final block so that flate reader -// does not report unexpected EOF. var compressFinalBlock = []byte{0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff} type websocketReader struct { @@ -83,10 +81,16 @@ type websocketReader struct { ib []byte ff bool fc bool - dc io.ReadCloser + dc *wsDecompressor nc *Conn } +type wsDecompressor struct { + flate io.ReadCloser + bufs [][]byte + off int +} + type websocketWriter struct { w io.Writer compress bool @@ -97,57 +101,81 @@ type websocketWriter struct { noMoreSend bool // if true, even if there is a Write() call, we should not send anything } -type decompressorBuffer struct { - buf []byte - rem int - off int - final bool -} - -func newDecompressorBuffer(buf []byte) *decompressorBuffer { - return &decompressorBuffer{buf: buf, rem: len(buf)} -} - -func (d *decompressorBuffer) Read(p []byte) (int, error) { - if d.buf == nil { +func (d *wsDecompressor) Read(dst []byte) (int, error) { + if len(dst) == 0 { + return 0, nil + } + if len(d.bufs) == 0 { return 0, io.EOF } - lim := d.rem - if len(p) < lim { - lim = len(p) + copied := 0 + rem := len(dst) + for buf := d.bufs[0]; buf != nil && rem > 0; { + n := len(buf[d.off:]) + if n > rem { + n = rem + } + copy(dst[copied:], buf[d.off:d.off+n]) + copied += n + rem -= n + d.off += n + buf = d.nextBuf() } - n := copy(p, d.buf[d.off:d.off+lim]) - d.off += n - d.rem -= n - d.checkRem() - return n, nil + return copied, nil } -func (d *decompressorBuffer) checkRem() { - if d.rem != 0 { - return - } - if !d.final { - d.buf = compressFinalBlock - d.off = 0 - d.rem = len(d.buf) - d.final = true - } else { - d.buf = nil - } +func (d *wsDecompressor) nextBuf() []byte { + // We still have remaining data in the first buffer + if d.off != len(d.bufs[0]) { + return d.bufs[0] + } + // We read the full first buffer. Reset offset. + d.off = 0 + // We were at the last buffer, so we are done. + if len(d.bufs) == 1 { + d.bufs = nil + return nil + } + // Here we move to the next buffer. + d.bufs = d.bufs[1:] + return d.bufs[0] } -func (d *decompressorBuffer) ReadByte() (byte, error) { - if d.buf == nil { +func (d *wsDecompressor) ReadByte() (byte, error) { + if len(d.bufs) == 0 { return 0, io.EOF } - b := d.buf[d.off] + b := d.bufs[0][d.off] d.off++ - d.rem-- - d.checkRem() + d.nextBuf() return b, nil } +func (d *wsDecompressor) addBuf(b []byte) { + d.bufs = append(d.bufs, b) +} + +func (d *wsDecompressor) decompress() ([]byte, error) { + d.off = 0 + // As per https://tools.ietf.org/html/rfc7692#section-7.2.2 + // add 0x00, 0x00, 0xff, 0xff and then a final block so that flate reader + // does not report unexpected EOF. + d.bufs = append(d.bufs, compressFinalBlock) + // Create or reset the decompressor with his object (wsDecompressor) + // that provides Read() and ReadByte() APIs that will consume from + // the compressed buffers (d.bufs). + if d.flate == nil { + d.flate = flate.NewReader(d) + } else { + d.flate.(flate.Resetter).Reset(d, nil) + } + // TODO: When Go 1.15 support is dropped, replace with io.ReadAll() + b, err := ioutil.ReadAll(d.flate) + // Now reset the compressed buffers list + d.bufs = nil + return b, err +} + func wsNewReader(r io.Reader) *websocketReader { return &websocketReader{r: r, ff: true} } @@ -254,29 +282,47 @@ func (r *websocketReader) Read(p []byte) (int, error) { } var b []byte + // This ensures that we get the full payload for this frame. b, pos, err = wsGet(r.r, buf, pos, rem) if err != nil { return 0, err } + // We read the full frame. rem = 0 + addToPending := true if r.fc { - br := newDecompressorBuffer(b) - if r.dc == nil { - r.dc = flate.NewReader(br) - } else { - r.dc.(flate.Resetter).Reset(br, nil) - } - // TODO: When Go 1.15 support is dropped, replace with io.ReadAll() - b, err = ioutil.ReadAll(r.dc) - if err != nil { - return 0, err + // Don't add to pending if we are not dealing with the final frame. + addToPending = r.ff + // Add the compressed payload buffer to the list. + r.addCBuf(b) + // Decompress only when this is the final frame. + if r.ff { + b, err = r.dc.decompress() + if err != nil { + return 0, err + } + r.fc = false } - r.fc = false } - r.pending = append(r.pending, b) + // Add to the pending list if dealing with uncompressed frames or + // after we have received the full compressed message and decompressed it. + if addToPending { + r.pending = append(r.pending, b) + } + } + // In case of compression, there may be nothing to drain + if len(r.pending) > 0 { + return r.drainPending(p), nil } - // At this point we should have pending slices. - return r.drainPending(p), nil + return 0, nil +} + +func (r *websocketReader) addCBuf(b []byte) { + if r.dc == nil { + r.dc = &wsDecompressor{} + } + // Add a copy of the incoming buffer to the list of compressed buffers. + r.dc.addBuf(append([]byte(nil), b...)) } func (r *websocketReader) drainPending(p []byte) int { @@ -327,7 +373,6 @@ func (r *websocketReader) handleControlFrame(frameType wsOpCode, buf []byte, pos var payload []byte var err error - statusPos := pos if rem > 0 { payload, pos, err = wsGet(r.r, buf, pos, rem) if err != nil { @@ -337,17 +382,24 @@ func (r *websocketReader) handleControlFrame(frameType wsOpCode, buf []byte, pos switch frameType { case wsCloseMessage: status := wsCloseStatusNoStatusReceived - body := "" - // If there is a payload, it should contain 2 unsigned bytes - // that represent the status code and then optional payload. - if len(payload) >= 2 { - status = int(binary.BigEndian.Uint16(buf[statusPos : statusPos+2])) - body = string(buf[statusPos+2 : statusPos+len(payload)]) - if body != "" && !utf8.ValidString(body) { - // https://tools.ietf.org/html/rfc6455#section-5.5.1 - // If body is present, it must be a valid utf8 - status = wsCloseStatusInvalidPayloadData - body = "invalid utf8 body in close frame" + var body string + lp := len(payload) + // If there is a payload, the status is represented as a 2-byte + // unsigned integer (in network byte order). Then, there may be an + // optional body. + hasStatus, hasBody := lp >= wsCloseSatusSize, lp > wsCloseSatusSize + if hasStatus { + // Decode the status + status = int(binary.BigEndian.Uint16(payload[:wsCloseSatusSize])) + // Now if there is a body, capture it and make sure this is a valid UTF-8. + if hasBody { + body = string(payload[wsCloseSatusSize:]) + if !utf8.ValidString(body) { + // https://tools.ietf.org/html/rfc6455#section-5.5.1 + // If body is present, it must be a valid utf8 + status = wsCloseStatusInvalidPayloadData + body = "invalid utf8 body in close frame" + } } } r.nc.wsEnqueueCloseMsg(status, body) diff --git a/vendor/go.bytebuilders.dev/audit/api/v1/zz_generated.deepcopy.go b/vendor/go.bytebuilders.dev/audit/api/v1/zz_generated.deepcopy.go index e24d048a8..b4685261a 100644 --- a/vendor/go.bytebuilders.dev/audit/api/v1/zz_generated.deepcopy.go +++ b/vendor/go.bytebuilders.dev/audit/api/v1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/go.bytebuilders.dev/audit/lib/publisher.go b/vendor/go.bytebuilders.dev/audit/lib/publisher.go index afe93e8c3..ab866c897 100644 --- a/vendor/go.bytebuilders.dev/audit/lib/publisher.go +++ b/vendor/go.bytebuilders.dev/audit/lib/publisher.go @@ -19,6 +19,7 @@ package lib import ( "context" "fmt" + gosync "sync" "time" api "go.bytebuilders.dev/audit/api/v1" @@ -29,11 +30,18 @@ import ( "go.bytebuilders.dev/license-verifier/info" "gomodules.xyz/sync" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" + kmapi "kmodules.xyz/client-go/api/v1" "kmodules.xyz/client-go/discovery" + auditorapi "kmodules.xyz/custom-resources/apis/auditor/v1alpha1" + "kmodules.xyz/custom-resources/util/siteinfo" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -48,6 +56,9 @@ type EventPublisher struct { nats *NatsConfig mapper discovery.ResourceMapper createEvent EventCreator + + siMutex gosync.Mutex + si *auditorapi.SiteInfo } func NewEventPublisher( @@ -162,6 +173,52 @@ func (p *EventPublisher) ForGVK(gvk schema.GroupVersionKind) cache.ResourceEvent } } +func (p *EventPublisher) SetupSiteInfoPublisher(cfg *rest.Config, kc kubernetes.Interface, factory informers.SharedInformerFactory) error { + var err error + p.si, err = siteinfo.GetSiteInfo(cfg, kc, nil, "") + if err != nil { + return err + } + if p.si.Product == nil { + p.si.Product = new(auditorapi.ProductInfo) + } + + nodeInformer := factory.Core().V1().Nodes().Informer() + nodeLister := factory.Core().V1().Nodes().Lister() + nodeInformer.AddEventHandler(&ResourceEventPublisher{ + p: p, + createEvent: func(_ client.Object) (*api.Event, error) { + nodes, err := nodeLister.List(labels.Everything()) + if err != nil { + return nil, err + } + p.siMutex.Lock() + siteinfo.RefreshNodeStats(p.si, nodes) + p.siMutex.Unlock() + + p.once.Do(p.connect) + if p.nats == nil { + return nil, fmt.Errorf("not connected to nats") + } + + p.si.Product.LicenseID = p.nats.LicenseID + ev := &api.Event{ + Resource: p.si, + ResourceID: kmapi.ResourceID{ + Group: auditorapi.SchemeGroupVersion.Group, + Version: auditorapi.SchemeGroupVersion.Version, + Name: auditorapi.ResourceSiteInfos, + Kind: auditorapi.ResourceKindSiteInfo, + Scope: kmapi.ClusterScoped, + }, + LicenseID: p.nats.LicenseID, + } + return ev, nil + }, + }) + return nil +} + func (p *EventPublisher) SetupWithManagerForKind(ctx context.Context, mgr manager.Manager, gvk schema.GroupVersionKind) error { if p == nil { return nil diff --git a/vendor/kmodules.xyz/client-go/Makefile b/vendor/kmodules.xyz/client-go/Makefile index 4527d62ef..e9b8f34d2 100644 --- a/vendor/kmodules.xyz/client-go/Makefile +++ b/vendor/kmodules.xyz/client-go/Makefile @@ -55,7 +55,7 @@ BIN_PLATFORMS := $(DOCKER_PLATFORMS) OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS)) ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) -BASEIMAGE_PROD ?= gcr.io/distroless/static:nonroot +BASEIMAGE_PROD ?= gcr.io/distroless/static-debian10 BASEIMAGE_DBG ?= debian:buster GO_VERSION ?= 1.17 diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go index 610e84973..3c13d610a 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/openapi_generated.go @@ -325,7 +325,14 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.AuditRegistration": schema_custom_resources_apis_auditor_v1alpha1_AuditRegistration(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.ControlPlaneInfo": schema_custom_resources_apis_auditor_v1alpha1_ControlPlaneInfo(ref), "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.GroupResources": schema_custom_resources_apis_auditor_v1alpha1_GroupResources(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.KubernetesInfo": schema_custom_resources_apis_auditor_v1alpha1_KubernetesInfo(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.NodeStats": schema_custom_resources_apis_auditor_v1alpha1_NodeStats(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.ProductInfo": schema_custom_resources_apis_auditor_v1alpha1_ProductInfo(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.SiteInfo": schema_custom_resources_apis_auditor_v1alpha1_SiteInfo(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.SiteInfoList": schema_custom_resources_apis_auditor_v1alpha1_SiteInfoList(ref), + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.Version": schema_custom_resources_apis_auditor_v1alpha1_Version(ref), } } @@ -15842,6 +15849,90 @@ func schema_custom_resources_apis_auditor_v1alpha1_AuditRegistration(ref common. } } +func schema_custom_resources_apis_auditor_v1alpha1_ControlPlaneInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "https://github.com/kmodules/client-go/blob/kubernetes-1.16.3/tools/analytics/analytics.go#L66", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "dnsNames": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "emailAddresses": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "ipAddresses": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "uris": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "notBefore": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "notAfter": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"notBefore", "notAfter"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + func schema_custom_resources_apis_auditor_v1alpha1_GroupResources(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -15877,3 +15968,310 @@ func schema_custom_resources_apis_auditor_v1alpha1_GroupResources(ref common.Ref }, } } + +func schema_custom_resources_apis_auditor_v1alpha1_KubernetesInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "clusterName": { + SchemaProps: spec.SchemaProps{ + Description: "https://github.com/kmodules/client-go/blob/master/tools/clusterid/lib.go", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterUID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/version.Info"), + }, + }, + "controlPlane": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/custom-resources/apis/auditor/v1alpha1.ControlPlaneInfo"), + }, + }, + "nodeStats": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/custom-resources/apis/auditor/v1alpha1.NodeStats"), + }, + }, + }, + Required: []string{"nodeStats"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/version.Info", "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.ControlPlaneInfo", "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.NodeStats"}, + } +} + +func schema_custom_resources_apis_auditor_v1alpha1_NodeStats(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "count": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "capacity": { + SchemaProps: spec.SchemaProps{ + Description: "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + "allocatable": { + SchemaProps: spec.SchemaProps{ + Description: "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + } +} + +func schema_custom_resources_apis_auditor_v1alpha1_ProductInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/custom-resources/apis/auditor/v1alpha1.Version"), + }, + }, + "licenseID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "productOwnerName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "productOwnerUID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "productName": { + SchemaProps: spec.SchemaProps{ + Description: "This has been renamed to Features", + Type: []string{"string"}, + Format: "", + }, + }, + "productUID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"version"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.Version"}, + } +} + +func schema_custom_resources_apis_auditor_v1alpha1_SiteInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SiteInfo captures information of a product deployment site.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "product": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kmodules.xyz/custom-resources/apis/auditor/v1alpha1.ProductInfo"), + }, + }, + "kubernetes": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/custom-resources/apis/auditor/v1alpha1.KubernetesInfo"), + }, + }, + }, + Required: []string{"kubernetes"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.KubernetesInfo", "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.ProductInfo"}, + } +} + +func schema_custom_resources_apis_auditor_v1alpha1_SiteInfoList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SiteInfoList is a list of SiteInfo", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/custom-resources/apis/auditor/v1alpha1.SiteInfo"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/custom-resources/apis/auditor/v1alpha1.SiteInfo"}, + } +} + +func schema_custom_resources_apis_auditor_v1alpha1_Version(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "versionStrategy": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "commitHash": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitBranch": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "gitTag": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "commitTimestamp": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "goVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "compiler": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "platform": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/register.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/register.go index 4ee738448..f1b7a5142 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/register.go +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/register.go @@ -50,6 +50,7 @@ func Resource(resource string) schema.GroupResource { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &AuditRegistration{}, + &SiteInfo{}, ) scheme.AddKnownTypes(SchemeGroupVersion, diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go new file mode 100644 index 000000000..24e69116d --- /dev/null +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/siteinfo_types.go @@ -0,0 +1,105 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 v1alpha1 + +import ( + core "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/version" +) + +const ( + ResourceKindSiteInfo = "SiteInfo" + ResourceSiteInfo = "siteinfo" + ResourceSiteInfos = "siteinfos" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SiteInfo captures information of a product deployment site. +type SiteInfo struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Product *ProductInfo `json:"product,omitempty"` + Kubernetes KubernetesInfo `json:"kubernetes"` +} + +type Version struct { + Version string `json:"version,omitempty"` + VersionStrategy string `json:"versionStrategy,omitempty"` + CommitHash string `json:"commitHash,omitempty"` + GitBranch string `json:"gitBranch,omitempty"` + GitTag string `json:"gitTag,omitempty"` + CommitTimestamp string `json:"commitTimestamp,omitempty"` + GoVersion string `json:"goVersion,omitempty"` + Compiler string `json:"compiler,omitempty"` + Platform string `json:"platform,omitempty"` +} + +type ProductInfo struct { + Version Version `json:"version"` + LicenseID string `json:"licenseID,omitempty"` + + ProductOwnerName string `json:"productOwnerName,omitempty"` + ProductOwnerUID string `json:"productOwnerUID,omitempty"` + + // This has been renamed to Features + ProductName string `json:"productName,omitempty"` + ProductUID string `json:"productUID,omitempty"` +} + +type KubernetesInfo struct { + // https://github.com/kmodules/client-go/blob/master/tools/clusterid/lib.go + ClusterName string `json:"clusterName,omitempty"` + ClusterUID string `json:"clusterUID,omitempty"` + Version *version.Info `json:"version,omitempty"` + ControlPlane *ControlPlaneInfo `json:"controlPlane,omitempty"` + NodeStats NodeStats `json:"nodeStats"` +} + +// https://github.com/kmodules/client-go/blob/kubernetes-1.16.3/tools/analytics/analytics.go#L66 +type ControlPlaneInfo struct { + DNSNames []string `json:"dnsNames,omitempty"` + EmailAddresses []string `json:"emailAddresses,omitempty"` + IPAddresses []string `json:"ipAddresses,omitempty"` + URIs []string `json:"uris,omitempty"` + NotBefore metav1.Time `json:"notBefore"` + NotAfter metav1.Time `json:"notAfter"` +} + +type NodeStats struct { + Count int `json:"count,omitempty"` + + // Capacity represents the total resources of a node. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity + // +optional + Capacity core.ResourceList `json:"capacity,omitempty"` + + // Allocatable represents the resources of a node that are available for scheduling. + // Defaults to Capacity. + // +optional + Allocatable core.ResourceList `json:"allocatable,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SiteInfoList is a list of SiteInfo +type SiteInfoList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []SiteInfo `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go index 3e0e7ad58..88bdc5e84 100644 --- a/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/custom-resources/apis/auditor/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,9 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" + version "k8s.io/apimachinery/pkg/version" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -57,6 +59,44 @@ func (in *AuditRegistration) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControlPlaneInfo) DeepCopyInto(out *ControlPlaneInfo) { + *out = *in + if in.DNSNames != nil { + in, out := &in.DNSNames, &out.DNSNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.EmailAddresses != nil { + in, out := &in.EmailAddresses, &out.EmailAddresses + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IPAddresses != nil { + in, out := &in.IPAddresses, &out.IPAddresses + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.URIs != nil { + in, out := &in.URIs, &out.URIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.NotBefore.DeepCopyInto(&out.NotBefore) + in.NotAfter.DeepCopyInto(&out.NotAfter) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneInfo. +func (in *ControlPlaneInfo) DeepCopy() *ControlPlaneInfo { + if in == nil { + return nil + } + out := new(ControlPlaneInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GroupResources) DeepCopyInto(out *GroupResources) { *out = *in @@ -77,3 +117,158 @@ func (in *GroupResources) DeepCopy() *GroupResources { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesInfo) DeepCopyInto(out *KubernetesInfo) { + *out = *in + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(version.Info) + **out = **in + } + if in.ControlPlane != nil { + in, out := &in.ControlPlane, &out.ControlPlane + *out = new(ControlPlaneInfo) + (*in).DeepCopyInto(*out) + } + in.NodeStats.DeepCopyInto(&out.NodeStats) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesInfo. +func (in *KubernetesInfo) DeepCopy() *KubernetesInfo { + if in == nil { + return nil + } + out := new(KubernetesInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeStats) DeepCopyInto(out *NodeStats) { + *out = *in + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(v1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + if in.Allocatable != nil { + in, out := &in.Allocatable, &out.Allocatable + *out = make(v1.ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStats. +func (in *NodeStats) DeepCopy() *NodeStats { + if in == nil { + return nil + } + out := new(NodeStats) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProductInfo) DeepCopyInto(out *ProductInfo) { + *out = *in + out.Version = in.Version + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProductInfo. +func (in *ProductInfo) DeepCopy() *ProductInfo { + if in == nil { + return nil + } + out := new(ProductInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SiteInfo) DeepCopyInto(out *SiteInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Product != nil { + in, out := &in.Product, &out.Product + *out = new(ProductInfo) + **out = **in + } + in.Kubernetes.DeepCopyInto(&out.Kubernetes) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SiteInfo. +func (in *SiteInfo) DeepCopy() *SiteInfo { + if in == nil { + return nil + } + out := new(SiteInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SiteInfo) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SiteInfoList) DeepCopyInto(out *SiteInfoList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SiteInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SiteInfoList. +func (in *SiteInfoList) DeepCopy() *SiteInfoList { + if in == nil { + return nil + } + out := new(SiteInfoList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SiteInfoList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Version) DeepCopyInto(out *Version) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Version. +func (in *Version) DeepCopy() *Version { + if in == nil { + return nil + } + out := new(Version) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfoes.yaml b/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfoes.yaml new file mode 100644 index 000000000..a57394eac --- /dev/null +++ b/vendor/kmodules.xyz/custom-resources/crds/auditor.appscode.com_siteinfoes.yaml @@ -0,0 +1,173 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: siteinfoes.auditor.appscode.com +spec: + group: auditor.appscode.com + names: + kind: SiteInfo + listKind: SiteInfoList + plural: siteinfoes + singular: siteinfo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: SiteInfo captures information of a product deployment site. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + kubernetes: + properties: + clusterName: + description: https://github.com/kmodules/client-go/blob/master/tools/clusterid/lib.go + type: string + clusterUID: + type: string + controlPlane: + description: https://github.com/kmodules/client-go/blob/kubernetes-1.16.3/tools/analytics/analytics.go#L66 + properties: + dnsNames: + items: + type: string + type: array + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + notAfter: + format: date-time + type: string + notBefore: + format: date-time + type: string + uris: + items: + type: string + type: array + required: + - notAfter + - notBefore + type: object + nodeStats: + properties: + allocatable: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Allocatable represents the resources of a node that + are available for scheduling. Defaults to Capacity. + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Capacity represents the total resources of a node. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity' + type: object + count: + type: integer + type: object + version: + description: 'Info contains versioning information. TODO: Add []string + of api versions supported? It''s still unclear how we''ll want to + distribute that information.' + properties: + buildDate: + type: string + compiler: + type: string + gitCommit: + type: string + gitTreeState: + type: string + gitVersion: + type: string + goVersion: + type: string + major: + type: string + minor: + type: string + platform: + type: string + required: + - buildDate + - compiler + - gitCommit + - gitTreeState + - gitVersion + - goVersion + - major + - minor + - platform + type: object + required: + - nodeStats + type: object + metadata: + type: object + product: + properties: + licenseID: + type: string + productName: + description: This has been renamed to Features + type: string + productOwnerName: + type: string + productOwnerUID: + type: string + productUID: + type: string + version: + properties: + commitHash: + type: string + commitTimestamp: + type: string + compiler: + type: string + gitBranch: + type: string + gitTag: + type: string + goVersion: + type: string + platform: + type: string + version: + type: string + versionStrategy: + type: string + type: object + required: + - version + type: object + required: + - kubernetes + type: object + served: true + storage: true diff --git a/vendor/kmodules.xyz/custom-resources/util/siteinfo/lib.go b/vendor/kmodules.xyz/custom-resources/util/siteinfo/lib.go new file mode 100644 index 000000000..556459da0 --- /dev/null +++ b/vendor/kmodules.xyz/custom-resources/util/siteinfo/lib.go @@ -0,0 +1,166 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 siteinfo + +import ( + "context" + "net" + "strings" + + meta_util "kmodules.xyz/client-go/meta" + "kmodules.xyz/client-go/tools/clusterid" + auditorapi "kmodules.xyz/custom-resources/apis/auditor/v1alpha1" + "kmodules.xyz/resource-metrics/api" + + "go.bytebuilders.dev/license-verifier/info" + v "gomodules.xyz/x/version" + core "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +func GetSiteInfo(cfg *rest.Config, kc kubernetes.Interface, nodes []*core.Node, licenseID string) (*auditorapi.SiteInfo, error) { + si := auditorapi.SiteInfo{ + TypeMeta: metav1.TypeMeta{ + APIVersion: auditorapi.SchemeGroupVersion.String(), + Kind: "SiteInfo", + }, + } + + if info.ProductName != "" || v.Version.Version != "" || licenseID != "" { + si.Product = &auditorapi.ProductInfo{} + si.Product.LicenseID = licenseID + si.Product.ProductOwnerName = info.ProductOwnerName + si.Product.ProductOwnerUID = info.ProductOwnerUID + si.Product.ProductName = info.ProductName + si.Product.ProductUID = info.ProductUID + si.Product.Version = auditorapi.Version{ + Version: v.Version.Version, + VersionStrategy: v.Version.VersionStrategy, + CommitHash: v.Version.CommitHash, + GitBranch: v.Version.GitBranch, + GitTag: v.Version.GitTag, + CommitTimestamp: v.Version.CommitTimestamp, + GoVersion: v.Version.GoVersion, + Compiler: v.Version.Compiler, + Platform: v.Version.Platform, + } + } + + var err error + si.Kubernetes.ClusterName = clusterid.ClusterName() + si.Kubernetes.ClusterUID, err = clusterid.ClusterUID(kc.CoreV1().Namespaces()) + if err != nil { + return nil, err + } + si.Kubernetes.Version, err = kc.Discovery().ServerVersion() + if err != nil { + return nil, err + } + + cert, err := meta_util.APIServerCertificate(cfg) + if err != nil { + return nil, err + } else { + si.Kubernetes.ControlPlane = &auditorapi.ControlPlaneInfo{ + NotBefore: metav1.NewTime(cert.NotBefore), + NotAfter: metav1.NewTime(cert.NotAfter), + // DNSNames: cert.DNSNames, + EmailAddresses: cert.EmailAddresses, + // IPAddresses: cert.IPAddresses, + // URIs: cert.URIs, + } + + dnsNames := sets.NewString(cert.DNSNames...) + ips := sets.NewString() + if len(cert.Subject.CommonName) > 0 { + if ip := net.ParseIP(cert.Subject.CommonName); ip != nil { + if !skipIP(ip) { + ips.Insert(ip.String()) + } + } else { + dnsNames.Insert(cert.Subject.CommonName) + } + } + + for _, host := range dnsNames.UnsortedList() { + if host == "kubernetes" || + host == "kubernetes.default" || + host == "kubernetes.default.svc" || + strings.HasSuffix(host, ".svc.cluster.local") || + host == "localhost" || + !strings.ContainsRune(host, '.') { + dnsNames.Delete(host) + } + } + si.Kubernetes.ControlPlane.DNSNames = dnsNames.List() + + for _, ip := range cert.IPAddresses { + if !skipIP(ip) { + ips.Insert(ip.String()) + } + } + si.Kubernetes.ControlPlane.IPAddresses = ips.List() + + uris := make([]string, 0, len(cert.URIs)) + for _, u := range cert.URIs { + uris = append(uris, u.String()) + } + si.Kubernetes.ControlPlane.URIs = uris + } + + if len(nodes) == 0 { + result, err := kc.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return nil, err + } + nodes = make([]*core.Node, len(result.Items)) + for i := range result.Items { + nodes[i] = &result.Items[i] + } + } + RefreshNodeStats(&si, nodes) + + return &si, nil +} + +func RefreshNodeStats(si *auditorapi.SiteInfo, nodes []*core.Node) { + if len(nodes) == 0 { + return + } + si.Kubernetes.NodeStats.Count = len(nodes) + + var capacity core.ResourceList + var allocatable core.ResourceList + for _, node := range nodes { + capacity = api.AddResourceList(capacity, node.Status.Capacity) + allocatable = api.AddResourceList(allocatable, node.Status.Allocatable) + } + si.Kubernetes.NodeStats.Capacity = capacity + si.Kubernetes.NodeStats.Allocatable = allocatable +} + +func skipIP(ip net.IP) bool { + return ip.IsLoopback() || + ip.IsMulticast() || + ip.IsGlobalUnicast() || + ip.IsInterfaceLocalMulticast() || + ip.IsLinkLocalMulticast() || + ip.IsLinkLocalUnicast() +} diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go index 15ef579f0..948d9eece 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go index 8e8a3d78b..a72c3a258 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/challenges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/challenges.yaml index 400439369..359a7c332 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/challenges.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/challenges.yaml @@ -29,7 +29,7 @@ spec: editor: name: acmecertmanagerio-challenge-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Challenge is a type to represent a Challenge request with an ACME diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/orders.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/orders.yaml index e42eb66b2..3346ddca6 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/orders.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/acme.cert-manager.io/v1/orders.yaml @@ -29,7 +29,7 @@ spec: editor: name: acmecertmanagerio-order-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Order is a type to represent an Order with an ACME server diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml index d7655894f..69168ca0c 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml @@ -24,7 +24,7 @@ spec: editor: name: admissionregistrationk8sio-mutatingwebhookconfiguration-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: MutatingWebhookConfiguration describes the configuration of and diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml index f12c05f8c..e4c013c39 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml @@ -24,7 +24,7 @@ spec: editor: name: admissionregistrationk8sio-validatingwebhookconfiguration-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ValidatingWebhookConfiguration describes the configuration of and diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml index d1f508ef9..e2f337482 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml @@ -24,4 +24,4 @@ spec: editor: name: apiextensionsk8sio-customresourcedefinition-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiregistration.k8s.io/v1/apiservices.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiregistration.k8s.io/v1/apiservices.yaml index 3f46d66bb..90a100248 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiregistration.k8s.io/v1/apiservices.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apiregistration.k8s.io/v1/apiservices.yaml @@ -24,7 +24,7 @@ spec: editor: name: apiregistrationk8sio-apiservice-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: APIService represents a server for a particular GroupVersion. Name diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/app.k8s.io/v1beta1/applications.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/app.k8s.io/v1beta1/applications.yaml index c6c1638a7..b0f5973bd 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/app.k8s.io/v1beta1/applications.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/app.k8s.io/v1beta1/applications.yaml @@ -19,7 +19,7 @@ spec: editor: name: appk8sio-application-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 instanceLabelPaths: - spec.selector.matchLabels validation: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/appcatalog.appscode.com/v1alpha1/appbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/appcatalog.appscode.com/v1alpha1/appbindings.yaml index 822233ad2..4995a8a0f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/appcatalog.appscode.com/v1alpha1/appbindings.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/appcatalog.appscode.com/v1alpha1/appbindings.yaml @@ -84,7 +84,7 @@ spec: editor: name: appcatalogappscodecom-appbinding-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/controllerrevisions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/controllerrevisions.yaml index bb8c735fc..e1a320624 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/controllerrevisions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/controllerrevisions.yaml @@ -19,7 +19,7 @@ spec: editor: name: apps-controllerrevision-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ControllerRevision implements an immutable snapshot of state data. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/daemonsets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/daemonsets.yaml index 145c29428..a725a3785 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/daemonsets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/daemonsets.yaml @@ -265,7 +265,7 @@ spec: editor: name: apps-daemonset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: DaemonSet represents the configuration of a daemon set. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/deployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/deployments.yaml index 56c86fd75..f4f09c4f9 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/deployments.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/deployments.yaml @@ -273,7 +273,7 @@ spec: editor: name: apps-deployment-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Deployment enables declarative updates for Pods and ReplicaSets. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/replicasets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/replicasets.yaml index d42b9a45b..67b0690a2 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/replicasets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/replicasets.yaml @@ -282,7 +282,7 @@ spec: editor: name: apps-replicaset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ReplicaSet ensures that a specified number of pod replicas are diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/statefulsets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/statefulsets.yaml index ae60ad408..8ba231491 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/statefulsets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/apps/v1/statefulsets.yaml @@ -277,7 +277,7 @@ spec: editor: name: apps-statefulset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'StatefulSet represents a set of pods with consistent identities. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditor.appscode.com/v1alpha1/siteinfoes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditor.appscode.com/v1alpha1/siteinfoes.yaml new file mode 100644 index 000000000..2e1654895 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditor.appscode.com/v1alpha1/siteinfoes.yaml @@ -0,0 +1,202 @@ +apiVersion: meta.appscode.com/v1alpha1 +kind: ResourceDescriptor +metadata: + creationTimestamp: null + labels: + k8s.io/group: auditor.appscode.com + k8s.io/kind: SiteInfo + k8s.io/resource: siteinfoes + k8s.io/version: v1alpha1 + name: auditor.appscode.com-v1alpha1-siteinfoes +spec: + resource: + group: auditor.appscode.com + kind: SiteInfo + name: siteinfoes + scope: Namespaced + version: v1alpha1 + validation: + openAPIV3Schema: + description: SiteInfo captures information of a product deployment site. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + kubernetes: + properties: + clusterName: + description: https://github.com/kmodules/client-go/blob/master/tools/clusterid/lib.go + type: string + clusterUID: + type: string + controlPlane: + description: https://github.com/kmodules/client-go/blob/kubernetes-1.16.3/tools/analytics/analytics.go#L66 + properties: + dnsNames: + items: + type: string + type: array + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + notAfter: + format: date-time + type: string + notBefore: + format: date-time + type: string + uris: + items: + type: string + type: array + required: + - notAfter + - notBefore + type: object + nodeStats: + properties: + allocatable: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Allocatable represents the resources of a node that + are available for scheduling. Defaults to Capacity. + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Capacity represents the total resources of a node. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity' + type: object + count: + type: integer + type: object + version: + description: 'Info contains versioning information. TODO: Add []string + of api versions supported? It''s still unclear how we''ll want to + distribute that information.' + properties: + buildDate: + type: string + compiler: + type: string + gitCommit: + type: string + gitTreeState: + type: string + gitVersion: + type: string + goVersion: + type: string + major: + type: string + minor: + type: string + platform: + type: string + required: + - buildDate + - compiler + - gitCommit + - gitTreeState + - gitVersion + - goVersion + - major + - minor + - platform + type: object + required: + - nodeStats + type: object + metadata: + properties: + name: + description: 'Name must be unique within a namespace. Is required when + creating resources, although some resources may allow a client to + request the generation of an appropriate name automatically. Name + is primarily intended for creation idempotence and configuration definition. + Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: "Namespace defines the space within which each name must + be unique. An empty namespace is equivalent to the \"default\" namespace, + but \"default\" is the canonical representation. Not all objects are + required to be scoped to a namespace - the value of this field for + those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces" + type: string + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used to organize + and categorize (scope and select) objects. May match selectors of + replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map stored with + a resource that may be set by external tools to store and retrieve + arbitrary metadata. They are not queryable and should be preserved + when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + type: object + product: + properties: + licenseID: + type: string + productName: + description: This has been renamed to Features + type: string + productOwnerName: + type: string + productOwnerUID: + type: string + productUID: + type: string + version: + properties: + commitHash: + type: string + commitTimestamp: + type: string + compiler: + type: string + gitBranch: + type: string + gitTag: + type: string + goVersion: + type: string + platform: + type: string + version: + type: string + versionStrategy: + type: string + type: object + required: + - version + type: object + required: + - kubernetes + type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml index 409154ce3..4e4d70744 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml @@ -19,7 +19,7 @@ spec: editor: name: auditregistrationk8sio-auditsink-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: AuditSink represents a cluster level audit sink diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenrequests.yaml index 46bdde64f..b90c91455 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenrequests.yaml @@ -19,7 +19,7 @@ spec: editor: name: authenticationk8sio-tokenrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: TokenRequest requests a token for a given service account. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenreviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenreviews.yaml index f2449556a..ddcf14364 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenreviews.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authentication.k8s.io/v1/tokenreviews.yaml @@ -19,7 +19,7 @@ spec: editor: name: authenticationk8sio-tokenreview-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'TokenReview attempts to authenticate a token to a known user. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/localsubjectaccessreviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/localsubjectaccessreviews.yaml index 12c8c6c89..da1ca8b28 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/localsubjectaccessreviews.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/localsubjectaccessreviews.yaml @@ -19,7 +19,7 @@ spec: editor: name: authorizationk8sio-localsubjectaccessreview-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: LocalSubjectAccessReview checks whether or not a user or group diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectaccessreviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectaccessreviews.yaml index 06f0c15e2..8de0dd608 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectaccessreviews.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectaccessreviews.yaml @@ -19,7 +19,7 @@ spec: editor: name: authorizationk8sio-selfsubjectaccessreview-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: SelfSubjectAccessReview checks whether or the current user can diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectrulesreviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectrulesreviews.yaml index a1ddf1ba1..f632bbe33 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectrulesreviews.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/selfsubjectrulesreviews.yaml @@ -19,7 +19,7 @@ spec: editor: name: authorizationk8sio-selfsubjectrulesreview-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: SelfSubjectRulesReview enumerates the set of actions the current diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/subjectaccessreviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/subjectaccessreviews.yaml index fc01d2c2f..071bb7bbe 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/subjectaccessreviews.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/authorization.k8s.io/v1/subjectaccessreviews.yaml @@ -19,7 +19,7 @@ spec: editor: name: authorizationk8sio-subjectaccessreview-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: SubjectAccessReview checks whether or not a user or group can perform diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml index e4968b015..c53d38e62 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingk8sio-verticalpodautoscalercheckpoint-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: VerticalPodAutoscalerCheckpoint is the checkpoint of the internal diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml index 24ba02e0a..fa693bd05 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingk8sio-verticalpodautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml index 8e593a362..3dcf45312 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-elasticsearchautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml index 7a329dffd..05c92efe7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-etcdautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml index 6ceff22cc..dad8f122e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-mariadbautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml index 8a3e6d409..d0c56a976 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-memcachedautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml index 5dde404c8..fc5235de6 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-mongodbautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml index 632421b0a..c6e320376 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-mysqlautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml index 3320b5022..497c921ab 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-perconaxtradbautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml index d6a72fc20..f76fe04ba 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-pgbouncerautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml index b4f88eb9c..1d53ecf7e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-postgresautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml index ed8380cfe..29d885f4b 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-proxysqlautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml index 28903ab9f..887079f30 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml @@ -19,7 +19,7 @@ spec: editor: name: autoscalingkubedbcom-redisautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalercheckpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalercheckpoints.yaml deleted file mode 100644 index b67b180b2..000000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalercheckpoints.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: meta.appscode.com/v1alpha1 -kind: ResourceDescriptor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: VerticalAutoscalerCheckpoint - k8s.io/resource: verticalautoscalercheckpoints - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-verticalautoscalercheckpoints -spec: - resource: - group: autoscaling.kubedb.com - kind: VerticalAutoscalerCheckpoint - name: verticalautoscalercheckpoints - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-verticalautoscalercheckpoint-editor - url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - properties: - name: - description: 'Name must be unique within a namespace. Is required when - creating resources, although some resources may allow a client to - request the generation of an appropriate name automatically. Name - is primarily intended for creation idempotence and configuration definition. - Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must - be unique. An empty namespace is equivalent to the \"default\" namespace, - but \"default\" is the canonical representation. Not all objects are - required to be scoped to a namespace - the value of this field for - those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize - and categorize (scope and select) objects. May match selectors of - replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with - a resource that may be set by external tools to store and retrieve - arbitrary metadata. They are not queryable and should be preserved - when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object - type: object - spec: - properties: - containerName: - type: string - vpaObjectName: - type: string - type: object - type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalers.yaml deleted file mode 100644 index ca5088737..000000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling.kubedb.com/v1alpha1/verticalautoscalers.yaml +++ /dev/null @@ -1,297 +0,0 @@ -apiVersion: meta.appscode.com/v1alpha1 -kind: ResourceDescriptor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: VerticalAutoscaler - k8s.io/resource: verticalautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-verticalautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: VerticalAutoscaler - name: verticalautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-verticalautoscaler-editor - url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 - validation: - openAPIV3Schema: - properties: - apiVersion: - type: string - kind: - type: string - metadata: - properties: - name: - description: 'Name must be unique within a namespace. Is required when - creating resources, although some resources may allow a client to - request the generation of an appropriate name automatically. Name - is primarily intended for creation idempotence and configuration definition. - Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must - be unique. An empty namespace is equivalent to the \"default\" namespace, - but \"default\" is the canonical representation. Not all objects are - required to be scoped to a namespace - the value of this field for - those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize - and categorize (scope and select) objects. May match selectors of - replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with - a resource that may be set by external tools to store and retrieve - arbitrary metadata. They are not queryable and should be preserved - when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object - type: object - spec: - properties: - configServer: - properties: - compute: - properties: - containerControlledValues: - type: string - controlledResources: - items: - type: string - type: array - disable: - type: boolean - maxAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - minAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - podLifeTimeThreshold: - format: int64 - type: integer - resourceDiffPercentage: - format: int32 - type: integer - type: object - storage: - properties: - scalingThreshold: - type: integer - usageThreshold: - type: integer - type: object - type: object - databaseRef: - properties: - apiGroup: - type: string - kind: - type: string - name: - type: string - required: - - kind - - name - type: object - mongos: - properties: - compute: - properties: - containerControlledValues: - type: string - controlledResources: - items: - type: string - type: array - disable: - type: boolean - maxAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - minAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - podLifeTimeThreshold: - format: int64 - type: integer - resourceDiffPercentage: - format: int32 - type: integer - type: object - storage: - properties: - scalingThreshold: - type: integer - usageThreshold: - type: integer - type: object - type: object - replicaSet: - properties: - compute: - properties: - containerControlledValues: - type: string - controlledResources: - items: - type: string - type: array - disable: - type: boolean - maxAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - minAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - podLifeTimeThreshold: - format: int64 - type: integer - resourceDiffPercentage: - format: int32 - type: integer - type: object - storage: - properties: - scalingThreshold: - type: integer - usageThreshold: - type: integer - type: object - type: object - shard: - properties: - compute: - properties: - containerControlledValues: - type: string - controlledResources: - items: - type: string - type: array - disable: - type: boolean - maxAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - minAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - podLifeTimeThreshold: - format: int64 - type: integer - resourceDiffPercentage: - format: int32 - type: integer - type: object - storage: - properties: - scalingThreshold: - type: integer - usageThreshold: - type: integer - type: object - type: object - standalone: - properties: - compute: - properties: - containerControlledValues: - type: string - controlledResources: - items: - type: string - type: array - disable: - type: boolean - maxAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - minAllowed: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - podLifeTimeThreshold: - format: int64 - type: integer - resourceDiffPercentage: - format: int32 - type: integer - type: object - storage: - properties: - scalingThreshold: - type: integer - usageThreshold: - type: integer - type: object - type: object - required: - - databaseRef - type: object - required: - - spec - type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling/v2beta2/horizontalpodautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling/v2beta2/horizontalpodautoscalers.yaml index 3afa51c9f..b1184247b 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling/v2beta2/horizontalpodautoscalers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/autoscaling/v2beta2/horizontalpodautoscalers.yaml @@ -89,7 +89,7 @@ spec: editor: name: autoscaling-horizontalpodautoscaler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: HorizontalPodAutoscaler is the configuration for a horizontal pod diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/cronjobs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/cronjobs.yaml index 58502bffb..206f198ef 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/cronjobs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/cronjobs.yaml @@ -24,7 +24,7 @@ spec: editor: name: batch-cronjob-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: CronJob represents the configuration of a single cron job. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/jobs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/jobs.yaml index f4e9ef820..f4a15907a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/jobs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1/jobs.yaml @@ -218,7 +218,7 @@ spec: editor: name: batch-job-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Job represents the configuration of a single job. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/cronjobs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/cronjobs.yaml index ef4b73093..89749c05a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/cronjobs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/cronjobs.yaml @@ -211,7 +211,7 @@ spec: editor: name: batch-cronjob-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: CronJob represents the configuration of a single cron job. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/jobtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/jobtemplates.yaml index 4cab4ae6a..f849f3a0b 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/jobtemplates.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/batch/v1beta1/jobtemplates.yaml @@ -19,7 +19,7 @@ spec: editor: name: batch-jobtemplate-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: JobTemplate describes a template for creating copies of a predefined diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml index 1ec237abe..03ce03080 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-elasticsearchversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/etcdversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/etcdversions.yaml index 25f01340e..27b3dd9dd 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/etcdversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/etcdversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-etcdversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml index 6c9eca118..30a4d3845 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml @@ -19,7 +19,7 @@ spec: editor: name: catalogkubedbcom-mariadbversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -54,6 +54,13 @@ spec: type: object spec: properties: + coordinator: + properties: + image: + type: string + required: + - image + type: object db: properties: image: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml index dafa726f1..6dd911eb7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-memcachedversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml index 7954c6c21..f3598cdf6 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml @@ -65,7 +65,7 @@ spec: editor: name: catalogkubedbcom-mongodbversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml index 432116d72..dcbd6d214 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-mysqlversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml index 736d1e77b..d2c6dc5ba 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-perconaxtradbversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml index 09aa6e1c7..601b31ade 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-pgbouncerversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/postgresversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/postgresversions.yaml index 16f93c81f..ba83acd40 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/postgresversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/postgresversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-postgresversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml index 9974dcdfb..b3bd440ad 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-proxysqlversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/redisversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/redisversions.yaml index 7136eb97b..fde4df96d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/redisversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubedb.com/v1alpha1/redisversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubedbcom-redisversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -59,6 +59,13 @@ spec: type: object spec: properties: + coordinator: + properties: + image: + type: string + required: + - image + type: object db: properties: image: @@ -75,6 +82,13 @@ spec: required: - image type: object + initContainer: + properties: + image: + type: string + required: + - image + type: object podSecurityPolicies: properties: databasePolicyName: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml index 697101d44..203f453d3 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml @@ -24,7 +24,7 @@ spec: editor: name: catalogkubevaultcom-vaultserverversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificaterequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificaterequests.yaml index 79e2e4bb0..c3806024f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificaterequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificaterequests.yaml @@ -29,7 +29,7 @@ spec: editor: name: certmanagerio-certificaterequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: "A CertificateRequest is used to request a signed certificate from diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificates.yaml index b6008a990..0e0fda293 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificates.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/certificates.yaml @@ -112,7 +112,7 @@ spec: editor: name: certmanagerio-certificate-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: "A Certificate resource should be created to ensure an up to date diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/clusterissuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/clusterissuers.yaml index f5431c9cd..086312b17 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/clusterissuers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/clusterissuers.yaml @@ -50,7 +50,7 @@ spec: editor: name: certmanagerio-clusterissuer-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: A ClusterIssuer represents a certificate issuing authority which diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/issuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/issuers.yaml index e3ee320b0..fc976e0c5 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/issuers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cert-manager.io/v1/issuers.yaml @@ -50,7 +50,7 @@ spec: editor: name: certmanagerio-issuer-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: An Issuer represents a certificate issuing authority which can diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1/certificatesigningrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1/certificatesigningrequests.yaml index 845f24e20..0b7d8dbbc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1/certificatesigningrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1/certificatesigningrequests.yaml @@ -24,7 +24,7 @@ spec: editor: name: certificatesk8sio-certificatesigningrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: "CertificateSigningRequest objects provide a mechanism to obtain diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml index 502813f00..e9efb259d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml @@ -24,7 +24,7 @@ spec: editor: name: certificatesk8sio-certificatesigningrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Describes a certificate signing request diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machines.yaml index b98c579c8..2620a68b5 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machines.yaml @@ -24,4 +24,4 @@ spec: editor: name: clusterxk8sio-machine-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machinesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machinesets.yaml index 2c8fd22e5..9c56d2e07 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machinesets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/cluster.x-k8s.io/v1alpha3/machinesets.yaml @@ -24,4 +24,4 @@ spec: editor: name: clusterxk8sio-machineset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/coordination.k8s.io/v1/leases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/coordination.k8s.io/v1/leases.yaml index 45df9faaa..6d3e5631a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/coordination.k8s.io/v1/leases.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/coordination.k8s.io/v1/leases.yaml @@ -24,7 +24,7 @@ spec: editor: name: coordinationk8sio-lease-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Lease defines a lease concept. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/bindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/bindings.yaml index 1cac74c16..217e16fac 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/bindings.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/bindings.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-binding-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Binding ties one object to another; for example, a pod is bound diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/componentstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/componentstatuses.yaml index d3ac32799..5a173bb06 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/componentstatuses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/componentstatuses.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-componentstatus-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'ComponentStatus (and ComponentStatusList) holds the cluster validation diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/configmaps.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/configmaps.yaml index dcb6acfb2..8579f17fc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/configmaps.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/configmaps.yaml @@ -59,7 +59,7 @@ spec: editor: name: core-configmap-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ConfigMap holds configuration data for pods to consume. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/endpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/endpoints.yaml index fcc291a71..33bd32efa 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/endpoints.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/endpoints.yaml @@ -24,7 +24,7 @@ spec: editor: name: core-endpoints-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'Endpoints is a collection of endpoints that implement the actual diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/ephemeralcontainers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/ephemeralcontainers.yaml index 5c7d6ccec..a97576320 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/ephemeralcontainers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/ephemeralcontainers.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-ephemeralcontainers-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: A list of ephemeral containers used with the Pod ephemeralcontainers diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/events.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/events.yaml index f85ecc500..3ee9a6aeb 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/events.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/events.yaml @@ -57,7 +57,7 @@ spec: editor: name: core-event-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Event is a report of an event somewhere in the cluster. Events diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/limitranges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/limitranges.yaml index 2c4ae8320..ce607f1dc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/limitranges.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/limitranges.yaml @@ -24,7 +24,7 @@ spec: editor: name: core-limitrange-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: LimitRange sets resource usage limits for each kind of resource diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/namespaces.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/namespaces.yaml index 292362950..0a08b966e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/namespaces.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/namespaces.yaml @@ -24,7 +24,7 @@ spec: editor: name: core-namespace-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Namespace provides a scope for Names. Use of multiple namespaces diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/nodes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/nodes.yaml index d1469bab4..9866e76e0 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/nodes.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/nodes.yaml @@ -24,7 +24,7 @@ spec: editor: name: core-node-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Node is a worker node in Kubernetes. Each node will have a unique diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumeclaims.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumeclaims.yaml index a6fd6b344..85e47b64e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumeclaims.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumeclaims.yaml @@ -65,7 +65,7 @@ spec: editor: name: core-persistentvolumeclaim-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PersistentVolumeClaim is a user's request for and claim to a persistent diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumes.yaml index 08e3ca69f..59a792117 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumes.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/persistentvolumes.yaml @@ -54,7 +54,7 @@ spec: editor: name: core-persistentvolume-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'PersistentVolume (PV) is a storage resource provisioned by an diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/pods.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/pods.yaml index a6d6f928d..b30145114 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/pods.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/pods.yaml @@ -313,7 +313,7 @@ spec: editor: name: core-pod-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Pod is a collection of containers that can run on a host. This diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podstatusresults.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podstatusresults.yaml index 13f54cc0c..3f0b077c7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podstatusresults.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podstatusresults.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-podstatusresult-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PodStatusResult is a wrapper for PodStatus returned by kubelet diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podtemplates.yaml index 50c4da688..26343089a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podtemplates.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/podtemplates.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-podtemplate-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PodTemplate describes a template for creating copies of a predefined diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/rangeallocations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/rangeallocations.yaml index 729c727ca..87d2acb64 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/rangeallocations.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/rangeallocations.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-rangeallocation-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: RangeAllocation is not a public type. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/replicationcontrollers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/replicationcontrollers.yaml index 01d6fee86..94dd51eba 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/replicationcontrollers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/replicationcontrollers.yaml @@ -254,7 +254,7 @@ spec: editor: name: core-replicationcontroller-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ReplicationController represents the configuration of a replication diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequota.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequota.yaml index a3b4cf69e..b9e5c0361 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequota.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequota.yaml @@ -19,7 +19,7 @@ spec: editor: name: core-resourcequota-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ResourceQuota sets aggregate quota restrictions enforced per namespace diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequotas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequotas.yaml index e10650d6d..4b0c970ab 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequotas.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/resourcequotas.yaml @@ -24,7 +24,7 @@ spec: editor: name: core-resourcequota-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ResourceQuota sets aggregate quota restrictions enforced per namespace diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/secrets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/secrets.yaml index 79c633177..7542666a8 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/secrets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/secrets.yaml @@ -63,7 +63,7 @@ spec: editor: name: core-secret-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Secret holds secret data of a certain type. The total bytes of diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/serviceaccounts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/serviceaccounts.yaml index af6e6d678..8b6f0b515 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/serviceaccounts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/serviceaccounts.yaml @@ -49,7 +49,7 @@ spec: editor: name: core-serviceaccount-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'ServiceAccount binds together: * a name, understood by users, diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/services.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/services.yaml index a23b84004..35476df76 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/services.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/core/v1/services.yaml @@ -80,7 +80,7 @@ spec: editor: name: core-service-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Service is a named abstraction of software service (for example, diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1/endpointslice.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1/endpointslice.yaml index 2e2ddc586..e48aba0a9 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1/endpointslice.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1/endpointslice.yaml @@ -19,7 +19,7 @@ spec: editor: name: discoveryk8sio-endpointslice-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: EndpointSlice represents a subset of the endpoints that implement diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslice.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslice.yaml index 386f275be..11de5ff62 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslice.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslice.yaml @@ -19,7 +19,7 @@ spec: editor: name: discoveryk8sio-endpointslice-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: EndpointSlice represents a subset of the endpoints that implement diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslices.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslices.yaml index 7b4daf1ea..70a81ab4d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslices.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/discovery.k8s.io/v1beta1/endpointslices.yaml @@ -24,4 +24,4 @@ spec: editor: name: discoveryk8sio-endpointslice-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsaccesskeyrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsaccesskeyrequests.yaml deleted file mode 100644 index 466e46c4d..000000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsaccesskeyrequests.yaml +++ /dev/null @@ -1,152 +0,0 @@ -apiVersion: meta.appscode.com/v1alpha1 -kind: ResourceDescriptor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: AWSAccessKeyRequest - k8s.io/resource: awsaccesskeyrequests - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-awsaccesskeyrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/awsaccesskeyrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/awsaccesskeyrequests.png - type: image/png - resource: - group: engine.kubevault.com - kind: AWSAccessKeyRequest - name: awsaccesskeyrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-awsaccesskeyrequest-editor - url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - name: - description: 'Name must be unique within a namespace. Is required when - creating resources, although some resources may allow a client to - request the generation of an appropriate name automatically. Name - is primarily intended for creation idempotence and configuration definition. - Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must - be unique. An empty namespace is equivalent to the \"default\" namespace, - but \"default\" is the canonical representation. Not all objects are - required to be scoped to a namespace - the value of this field for - those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize - and categorize (scope and select) objects. May match selectors of - replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with - a resource that may be set by external tools to store and retrieve - arbitrary metadata. They are not queryable and should be preserved - when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object - type: object - spec: - description: https://www.vaultproject.io/api/secret/aws/index.html#parameters-6 - AWSAccessKeyRequestSpec contains information to request for vault aws - credential - properties: - roleARN: - description: The ARN of the role to assume if credential_type on the - Vault role is assumed_role. Must match one of the allowed role ARNs - in the Vault role. Optional if the Vault role only allows a single - AWS role ARN; required otherwise. - type: string - roleRef: - description: Contains vault aws role info - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of the resource being referenced - type: string - required: - - name - - namespace - type: object - subjects: - items: - description: Subject contains a reference to the object or user identities - a role binding applies to. This can either hold a direct API object - reference, or a value for non-objects such as user and group names. - properties: - apiGroup: - description: APIGroup holds the API group of the referenced subject. - Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" - for User and Group subjects. - type: string - kind: - description: Kind of object being referenced. Values defined by - this API group are "User", "Group", and "ServiceAccount". If - the Authorizer does not recognized the kind value, the Authorizer - should report an error. - type: string - name: - description: Name of the object being referenced. - type: string - namespace: - description: Namespace of the referenced object. If the object - kind is non-namespace, such as "User" or "Group", and this value - is not empty the Authorizer should report an error. - type: string - required: - - kind - - name - type: object - type: array - ttl: - description: Specifies the TTL for the use of the STS token. This is - specified as a string with a duration suffix. Valid only when credential_type - is assumed_role or federation_token. When not specified, the default_sts_ttl - set for the role will be used. If that is also not set, then the default - value of 3600s will be used. AWS places limits on the maximum TTL - allowed. See the AWS documentation on the DurationSeconds parameter - for AssumeRole (for assumed_role credential types) and GetFederationToken - (for federation_token credential types) for more details. - type: string - useSTS: - description: If true, '/aws/sts' endpoint will be used to retrieve credential - Otherwise, '/aws/creds' endpoint will be used to retrieve credential - type: boolean - required: - - roleRef - - subjects - type: object - type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsroles.yaml index f2a49af46..1dd6bf2b1 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/awsroles.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-awsrole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -94,10 +94,6 @@ spec: are capped to max_sts_ttl). Valid only when credential_type is one of assumed_role or federation_token type: string - path: - description: 'Path defines the path of the AWS secret engine default: - aws More info: https://www.vaultproject.io/docs/auth/aws.html#via-the-cli' - type: string policy: description: Specifies the IAM policy in JSON format. type: object @@ -125,9 +121,8 @@ spec: items: type: string type: array - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -136,6 +131,6 @@ spec: type: object required: - credentialType - - vaultRef + - secretEngineRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureroles.yaml index bb5a95d2a..c352513fc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureroles.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-azurerole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -90,25 +90,20 @@ spec: using this role. Accepts time suffixed strings ("1h") or an integer number of seconds. Defaults to the system/engine max TTL time. type: string - path: - description: 'Path defines the path of the Azure secret engine default: - azure More info: https://www.vaultproject.io/docs/auth/azure.html#via-the-cli' - type: string - ttl: - description: Specifies the default TTL for service principals generated - using this role. Accepts time suffixed strings ("1h") or an integer - number of seconds. Defaults to the system/engine default TTL time. - type: string - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + ttl: + description: Specifies the default TTL for service principals generated + using this role. Accepts time suffixed strings ("1h") or an integer + number of seconds. Defaults to the system/engine default TTL time. + type: string required: - - vaultRef + - secretEngineRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml index a563cfe74..16969676a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml @@ -18,8 +18,8 @@ spec: ui: editor: name: enginekubevaultcom-elasticsearchrole-editor - url: https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable - version: v0.1.0 + url: https://bundles.byte.builders/ui/ + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -77,33 +77,6 @@ spec: items: type: string type: array - databaseName: - description: Specifies the database name under which the role will be - created - type: string - databaseRef: - description: DatabaseRef specifies the database appbinding reference - in any namespace - properties: - name: - description: '`name` is the name of the app. Required' - type: string - namespace: - description: '`namespace` is the namespace of the app. Required' - type: string - parameters: - description: "Parameters is a set of the parameters to be used to - override default parameters. The inline YAML/JSON payload to be - translated into equivalent JSON object. \n The Parameters field - is NOT secret or secured in any way and should NEVER be used to - hold sensitive information." - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - name - - namespace - type: object defaultTTL: description: Specifies the TTL for the leases associated with this role. Accepts time suffixed strings ("1h") or an integer number of seconds. @@ -114,18 +87,14 @@ spec: this role. Accepts time suffixed strings ("1h") or an integer number of seconds. Defaults to system/engine default TTL time. type: string - path: - description: Specifies the path where secret engine is enabled - type: string revocationStatements: description: https://www.vaultproject.io/api/secret/databases/elasticdb.html#revocation_statements Specifies the database statements to be executed to revoke a user. items: type: string type: array - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -134,6 +103,6 @@ spec: type: object required: - creationStatements - - vaultRef + - secretEngineRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcpaccesskeyrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcpaccesskeyrequests.yaml deleted file mode 100644 index 999267e45..000000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcpaccesskeyrequests.yaml +++ /dev/null @@ -1,143 +0,0 @@ -apiVersion: meta.appscode.com/v1alpha1 -kind: ResourceDescriptor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: GCPAccessKeyRequest - k8s.io/resource: gcpaccesskeyrequests - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-gcpaccesskeyrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/gcpaccesskeyrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/gcpaccesskeyrequests.png - type: image/png - resource: - group: engine.kubevault.com - kind: GCPAccessKeyRequest - name: gcpaccesskeyrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-gcpaccesskeyrequest-editor - url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - name: - description: 'Name must be unique within a namespace. Is required when - creating resources, although some resources may allow a client to - request the generation of an appropriate name automatically. Name - is primarily intended for creation idempotence and configuration definition. - Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must - be unique. An empty namespace is equivalent to the \"default\" namespace, - but \"default\" is the canonical representation. Not all objects are - required to be scoped to a namespace - the value of this field for - those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize - and categorize (scope and select) objects. May match selectors of - replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with - a resource that may be set by external tools to store and retrieve - arbitrary metadata. They are not queryable and should be preserved - when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object - type: object - spec: - description: GCPAccessKeyRequestSpec contains information to request for - vault gcp credentials - properties: - keyAlgorithm: - description: 'Specifies the algorithm used to generate key. Defaults - to 2k RSA key. Accepted values: KEY_ALG_UNSPECIFIED, KEY_ALG_RSA_1024, - KEY_ALG_RSA_2048' - type: string - keyType: - description: 'Specifies the private key type to generate. Defaults to - JSON credentials file Accepted values: TYPE_UNSPECIFIED, TYPE_PKCS12_FILE, - TYPE_GOOGLE_CREDENTIALS_FILE' - type: string - roleRef: - description: Contains vault gcp role info - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of the resource being referenced - type: string - required: - - name - - namespace - type: object - subjects: - description: Contains a reference to the object or user identities the - role binding is applied to - items: - description: Subject contains a reference to the object or user identities - a role binding applies to. This can either hold a direct API object - reference, or a value for non-objects such as user and group names. - properties: - apiGroup: - description: APIGroup holds the API group of the referenced subject. - Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" - for User and Group subjects. - type: string - kind: - description: Kind of object being referenced. Values defined by - this API group are "User", "Group", and "ServiceAccount". If - the Authorizer does not recognized the kind value, the Authorizer - should report an error. - type: string - name: - description: Name of the object being referenced. - type: string - namespace: - description: Namespace of the referenced object. If the object - kind is non-namespace, such as "User" or "Group", and this value - is not empty the Authorizer should report an error. - type: string - required: - - kind - - name - type: object - type: array - required: - - roleRef - - subjects - type: object - type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcproles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcproles.yaml index 6e82f302f..afabec822 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcproles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/gcproles.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-gcprole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -87,6 +87,14 @@ spec: description: Name of the GCP project that this roleset's service account will belong to. Cannot be updated. type: string + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object secretType: description: Specifies the type of secret generated for this role set enum: @@ -99,19 +107,10 @@ spec: items: type: string type: array - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object required: - bindings - project + - secretEngineRef - secretType - - vaultRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mongodbroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mongodbroles.yaml index 1dd9305de..79d586662 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mongodbroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mongodbroles.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-mongodbrole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -82,33 +82,6 @@ spec: items: type: string type: array - databaseName: - description: Specifies the database name under which the role will be - created - type: string - databaseRef: - description: DatabaseRef specifies the database appbinding reference - in any namespace - properties: - name: - description: '`name` is the name of the app. Required' - type: string - namespace: - description: '`namespace` is the namespace of the app. Required' - type: string - parameters: - description: "Parameters is a set of the parameters to be used to - override default parameters. The inline YAML/JSON payload to be - translated into equivalent JSON object. \n The Parameters field - is NOT secret or secured in any way and should NEVER be used to - hold sensitive information." - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - name - - namespace - type: object defaultTTL: description: Specifies the TTL for the leases associated with this role. Accepts time suffixed strings ("1h") or an integer number of seconds. @@ -119,18 +92,14 @@ spec: this role. Accepts time suffixed strings ("1h") or an integer number of seconds. Defaults to system/engine default TTL time. type: string - path: - description: Specifies the path where secret engine is enabled - type: string revocationStatements: description: https://www.vaultproject.io/api/secret/databases/Mongodb-maria.html#revocation_statements Specifies the database statements to be executed to revoke a user. items: type: string type: array - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -139,6 +108,6 @@ spec: type: object required: - creationStatements - - vaultRef + - secretEngineRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mysqlroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mysqlroles.yaml index 7a25729e2..e2b1dcc23 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mysqlroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/mysqlroles.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-mysqlrole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -82,33 +82,6 @@ spec: items: type: string type: array - databaseName: - description: Specifies the database name under which the role will be - created - type: string - databaseRef: - description: DatabaseRef specifies the database appbinding reference - in any namespace. - properties: - name: - description: '`name` is the name of the app. Required' - type: string - namespace: - description: '`namespace` is the namespace of the app. Required' - type: string - parameters: - description: "Parameters is a set of the parameters to be used to - override default parameters. The inline YAML/JSON payload to be - translated into equivalent JSON object. \n The Parameters field - is NOT secret or secured in any way and should NEVER be used to - hold sensitive information." - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - name - - namespace - type: object defaultTTL: description: Specifies the TTL for the leases associated with this role. Accepts time suffixed strings ("1h") or an integer number of seconds. @@ -119,18 +92,14 @@ spec: this role. Accepts time suffixed strings ("1h") or an integer number of seconds. Defaults to system/engine default TTL time. type: string - path: - description: Specifies the path where secret engine is enabled - type: string revocationStatements: description: https://www.vaultproject.io/api/secret/databases/mysql-maria.html#revocation_statements Specifies the database statements to be executed to revoke a user. items: type: string type: array - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -139,6 +108,6 @@ spec: type: object required: - creationStatements - - vaultRef + - secretEngineRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/postgresroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/postgresroles.yaml index 092c704d4..cd4c74d03 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/postgresroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/postgresroles.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-postgresrole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -82,33 +82,6 @@ spec: items: type: string type: array - databaseName: - description: Specifies the database name under which the role will be - created - type: string - databaseRef: - description: DatabaseRef specifies the database appbinding reference - in any namespace - properties: - name: - description: '`name` is the name of the app. Required' - type: string - namespace: - description: '`namespace` is the namespace of the app. Required' - type: string - parameters: - description: "Parameters is a set of the parameters to be used to - override default parameters. The inline YAML/JSON payload to be - translated into equivalent JSON object. \n The Parameters field - is NOT secret or secured in any way and should NEVER be used to - hold sensitive information." - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - name - - namespace - type: object defaultTTL: description: Specifies the TTL for the leases associated with this role. Accepts time suffixed strings ("1h") or an integer number of seconds. @@ -119,9 +92,6 @@ spec: this role. Accepts time suffixed strings ("1h") or an integer number of seconds. Defaults to system/engine default TTL time. type: string - path: - description: Specifies the path where secret engine is enabled - type: string renewStatements: description: https://www.vaultproject.io/api/secret/databases/postgresql.html#renew_statements Specifies the database statements to be executed to renew a user. @@ -141,9 +111,8 @@ spec: items: type: string type: array - vaultRef: - description: VaultRef is the name of a AppBinding referencing to a Vault - Server + secretEngineRef: + description: SecretEngineRef is the name of a Secret Engine properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -152,6 +121,6 @@ spec: type: object required: - creationStatements - - vaultRef + - secretEngineRef type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/databaseaccessrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretaccessrequests.yaml similarity index 71% rename from vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/databaseaccessrequests.yaml rename to vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretaccessrequests.yaml index 7795db8f1..c5ad571d5 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/databaseaccessrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretaccessrequests.yaml @@ -4,27 +4,22 @@ metadata: creationTimestamp: null labels: k8s.io/group: engine.kubevault.com - k8s.io/kind: DatabaseAccessRequest - k8s.io/resource: databaseaccessrequests + k8s.io/kind: SecretAccessRequest + k8s.io/resource: secretaccessrequests k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-databaseaccessrequests + name: engine.kubevault.com-v1alpha1-secretaccessrequests spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/databaseaccessrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/databaseaccessrequests.png - type: image/png resource: group: engine.kubevault.com - kind: DatabaseAccessRequest - name: databaseaccessrequests + kind: SecretAccessRequest + name: secretaccessrequests scope: Namespaced version: v1alpha1 ui: editor: - name: enginekubevaultcom-databaseaccessrequest-editor + name: enginekubevaultcom-secretaccessrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -72,14 +67,48 @@ spec: type: object type: object spec: - description: DatabaseAccessRequestSpec contains information to request for + description: SecretAccessRequestSpec contains information to request for database credential properties: + aws: + description: https://www.vaultproject.io/api/secret/aws/index.html#parameters-6 + AWSAccessKeyRequestSpec contains information to request for vault + aws credential + properties: + roleARN: + description: The ARN of the role to assume if credential_type on + the Vault role is assumed_role. Must match one of the allowed + role ARNs in the Vault role. Optional if the Vault role only allows + a single AWS role ARN; required otherwise. + type: string + useSTS: + description: If true, '/aws/sts' endpoint will be used to retrieve + credential Otherwise, '/aws/creds' endpoint will be used to retrieve + credential + type: boolean + type: object + gcp: + description: GCPAccessRequestConfiguration contains information to request + for vault gcp credentials + properties: + keyAlgorithm: + description: 'Specifies the algorithm used to generate key. Defaults + to 2k RSA key. Accepted values: KEY_ALG_UNSPECIFIED, KEY_ALG_RSA_1024, + KEY_ALG_RSA_2048' + type: string + keyType: + description: 'Specifies the private key type to generate. Defaults + to JSON credentials file Accepted values: TYPE_UNSPECIFIED, TYPE_PKCS12_FILE, + TYPE_GOOGLE_CREDENTIALS_FILE' + type: string + type: object roleRef: description: Contains vault database role info properties: apiGroup: - description: APIGroup is the group for the resource being referenced + description: APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the + core API group. For any other third-party types, APIGroup is required. type: string kind: description: Kind is the type of resource being referenced @@ -87,12 +116,9 @@ spec: name: description: Name is the name of resource being referenced type: string - namespace: - description: Namespace is the namespace of the resource being referenced - type: string required: + - kind - name - - namespace type: object subjects: items: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretengines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretengines.yaml index f326b9f41..d6e7c3789 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretengines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretengines.yaml @@ -24,7 +24,7 @@ spec: editor: name: enginekubevaultcom-secretengine-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -353,9 +353,6 @@ spec: required: - databaseRef type: object - path: - description: Path defines the path used to enable this secret engine - type: string postgres: description: PostgresConfiguration defines a PostgreSQL app configuration. https://www.vaultproject.io/api/secret/databases/index.html https://www.vaultproject.io/api/secret/databases/postgresql.html#configure-connection @@ -412,13 +409,17 @@ spec: - databaseRef type: object vaultRef: - description: LocalObjectReference contains enough information to let - you locate the referenced object inside the same namespace. + description: ObjectReference contains enough information to let you + inspect or modify the referred object. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' type: string + required: + - name type: object required: - vaultRef diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureaccesskeyrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretrolebindings.yaml similarity index 76% rename from vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureaccesskeyrequests.yaml rename to vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretrolebindings.yaml index 5eedf7678..84fd30216 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/azureaccesskeyrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/engine.kubevault.com/v1alpha1/secretrolebindings.yaml @@ -4,27 +4,22 @@ metadata: creationTimestamp: null labels: k8s.io/group: engine.kubevault.com - k8s.io/kind: AzureAccessKeyRequest - k8s.io/resource: azureaccesskeyrequests + k8s.io/kind: SecretRoleBinding + k8s.io/resource: secretrolebindings k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-azureaccesskeyrequests + name: engine.kubevault.com-v1alpha1-secretrolebindings spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/azureaccesskeyrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/azureaccesskeyrequests.png - type: image/png resource: group: engine.kubevault.com - kind: AzureAccessKeyRequest - name: azureaccesskeyrequests + kind: SecretRoleBinding + name: secretrolebindings scope: Namespaced version: v1alpha1 ui: editor: - name: enginekubevaultcom-azureaccesskeyrequest-editor + name: enginekubevaultcom-secretrolebinding-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -72,29 +67,32 @@ spec: type: object type: object spec: + description: SecretRoleBindingSpec contains information to request for database + credential properties: - roleRef: - description: Contains vault azure role info - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of the resource being referenced - type: string - required: - - name - - namespace - type: object + roles: + items: + description: TypedLocalObjectReference contains enough information + to let you locate the typed referenced object inside the same namespace. + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in + the core API group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + type: array subjects: - description: Contains a reference to the object or user identities the - role binding is applied to items: description: Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object @@ -125,7 +123,7 @@ spec: type: object type: array required: - - roleRef + - roles - subjects type: object type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1/events.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1/events.yaml index bde688241..605ddd487 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1/events.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1/events.yaml @@ -24,7 +24,7 @@ spec: editor: name: eventsk8sio-event-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Event is a report of an event somewhere in the cluster. It generally diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1beta1/events.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1beta1/events.yaml index 767e188ed..48e77924c 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1beta1/events.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/events.k8s.io/v1beta1/events.yaml @@ -24,7 +24,7 @@ spec: editor: name: eventsk8sio-event-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Event is a report of an event somewhere in the cluster. It generally diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/daemonsets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/daemonsets.yaml index ea5b05ebc..fde0e2879 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/daemonsets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/daemonsets.yaml @@ -19,7 +19,7 @@ spec: editor: name: extensions-daemonset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/deployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/deployments.yaml index a04014336..6b705dfee 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/deployments.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/deployments.yaml @@ -19,7 +19,7 @@ spec: editor: name: extensions-deployment-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: DEPRECATED - This group version of Deployment is deprecated by diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/ingresses.yaml index e4147fe48..948e601d7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/ingresses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/ingresses.yaml @@ -24,7 +24,7 @@ spec: editor: name: extensions-ingress-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Ingress is a collection of rules that allow inbound connections diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/networkpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/networkpolicies.yaml index fd4265097..9bff0e809 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/networkpolicies.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/networkpolicies.yaml @@ -24,7 +24,7 @@ spec: editor: name: extensions-networkpolicy-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/podsecuritypolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/podsecuritypolicies.yaml index 9bfcea7f2..aec3be68e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/podsecuritypolicies.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/podsecuritypolicies.yaml @@ -24,7 +24,7 @@ spec: editor: name: extensions-podsecuritypolicy-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'PodSecurityPolicy governs the ability to make requests that affect diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/replicasets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/replicasets.yaml index 703844ad0..1cb273093 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/replicasets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/replicasets.yaml @@ -19,7 +19,7 @@ spec: editor: name: extensions-replicaset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: DEPRECATED - This group version of ReplicaSet is deprecated by diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/scales.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/scales.yaml index 92801196b..3a10890f6 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/scales.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/extensions/v1beta1/scales.yaml @@ -19,7 +19,7 @@ spec: editor: name: extensions-scale-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: represents a scaling request for a resource. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml index 90f2d939d..d39c11533 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml @@ -19,7 +19,7 @@ spec: editor: name: flowcontrolapiserverk8sio-flowschema-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'FlowSchema defines the schema of a group of flows. Note that a diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml index 49dc99f69..366ba8db8 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml @@ -19,7 +19,7 @@ spec: editor: name: flowcontrolapiserverk8sio-prioritylevelconfiguration-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PriorityLevelConfiguration represents the configuration of a priority diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml index d6ef6b6ca..259103f31 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml @@ -19,7 +19,7 @@ spec: editor: name: flowcontrolapiserverk8sio-flowschema-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: 'FlowSchema defines the schema of a group of flows. Note that a diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml index d94b1deb2..0120d6e7e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml @@ -19,7 +19,7 @@ spec: editor: name: flowcontrolapiserverk8sio-prioritylevelconfiguration-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PriorityLevelConfiguration represents the configuration of a priority diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboards.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboards.yaml index faf81030b..6986079dc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboards.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboards.yaml @@ -24,7 +24,7 @@ spec: editor: name: grafanasearchlightdev-dashboard-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboardtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboardtemplates.yaml index 6e282dbf3..98c903ba3 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboardtemplates.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/dashboardtemplates.yaml @@ -24,7 +24,7 @@ spec: editor: name: grafanasearchlightdev-dashboardtemplate-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/datasources.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/datasources.yaml index 046d0c3ee..d81cf81fe 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/datasources.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/grafana.searchlight.dev/v1alpha1/datasources.yaml @@ -24,7 +24,7 @@ spec: editor: name: grafanasearchlightdev-datasource-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml index a81902d97..b9e10ce37 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml @@ -19,7 +19,7 @@ spec: editor: name: imagepolicyk8sio-imagereview-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ImageReview checks if the set of images in a pod are allowed. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml index 56602b48e..0c76fd8b5 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml @@ -19,7 +19,7 @@ spec: editor: name: internalapiserverk8sio-storageversion-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ' Storage version of a specific resource.' diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/elasticsearches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/elasticsearches.yaml index 0eeab31cb..eb8171cce 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/elasticsearches.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/elasticsearches.yaml @@ -334,11 +334,11 @@ spec: editor: name: kubedbcom-elasticsearch-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-elasticsearch-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/etcds.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/etcds.yaml index f918b483d..93efac3af 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/etcds.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/etcds.yaml @@ -334,11 +334,11 @@ spec: editor: name: kubedbcom-etcd-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-etcd-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mariadbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mariadbs.yaml index e29784a50..6a007fd69 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mariadbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mariadbs.yaml @@ -338,11 +338,11 @@ spec: editor: name: kubedbcom-mariadb-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-mariadb-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -395,6 +395,87 @@ spec: name: type: string type: object + coordinator: + properties: + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + type: object halted: type: boolean init: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/memcacheds.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/memcacheds.yaml index d5b48f4ed..eeb6162dd 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/memcacheds.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/memcacheds.yaml @@ -297,11 +297,11 @@ spec: editor: name: kubedbcom-memcached-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-memcached-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mongodbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mongodbs.yaml index d2027ca7e..1e41ff273 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mongodbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mongodbs.yaml @@ -346,11 +346,11 @@ spec: editor: name: kubedbcom-mongodb-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-mongodb-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -410,6 +410,87 @@ spec: name: type: string type: object + coordinator: + properties: + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + type: object halted: type: boolean init: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mysqls.yaml index 15796efdb..6a7e5d7da 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mysqls.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/mysqls.yaml @@ -350,11 +350,11 @@ spec: editor: name: kubedbcom-mysql-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-mysql-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -407,6 +407,87 @@ spec: name: type: string type: object + coordinator: + properties: + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + type: object halted: type: boolean init: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/perconaxtradbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/perconaxtradbs.yaml index 2d3b80c3c..dc53c5738 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/perconaxtradbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/perconaxtradbs.yaml @@ -297,11 +297,11 @@ spec: editor: name: kubedbcom-perconaxtradb-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-perconaxtradb-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/pgbouncers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/pgbouncers.yaml index cfc5821ec..96df32639 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/pgbouncers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/pgbouncers.yaml @@ -297,11 +297,11 @@ spec: editor: name: kubedbcom-pgbouncer-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-pgbouncer-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/postgreses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/postgreses.yaml index 78812213d..50ce93414 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/postgreses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/postgreses.yaml @@ -338,11 +338,11 @@ spec: editor: name: kubedbcom-postgres-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-postgres-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -401,6 +401,87 @@ spec: name: type: string type: object + coordinator: + properties: + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + type: object halted: type: boolean init: @@ -1114,25 +1195,6 @@ spec: renewDeadlineSeconds: format: int32 type: integer - resources: - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object retryPeriodSeconds: format: int32 type: integer diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/proxysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/proxysqls.yaml index 73427f645..0f03a63c7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/proxysqls.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/proxysqls.yaml @@ -297,11 +297,11 @@ spec: editor: name: kubedbcom-proxysql-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-proxysql-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redises.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redises.yaml index 494c742e1..26f5e0aac 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redises.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redises.yaml @@ -297,11 +297,11 @@ spec: editor: name: kubedbcom-redis-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 options: name: kubedbcom-redis-editor-options url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -363,6 +363,87 @@ spec: name: type: string type: object + coordinator: + properties: + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + type: object halted: type: boolean init: @@ -1057,6 +1138,7 @@ spec: enum: - Standalone - Cluster + - Sentinel type: string monitor: properties: @@ -2665,6 +2747,13 @@ spec: replicas: format: int32 type: integer + sentinelRef: + properties: + name: + type: string + namespace: + type: string + type: object serviceTemplates: items: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redissentinels.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redissentinels.yaml new file mode 100644 index 000000000..c7c01292d --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubedb.com/v1alpha2/redissentinels.yaml @@ -0,0 +1,1928 @@ +apiVersion: meta.appscode.com/v1alpha1 +kind: ResourceDescriptor +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: RedisSentinel + k8s.io/resource: redissentinels + k8s.io/version: v1alpha2 + name: kubedb.com-v1alpha2-redissentinels +spec: + resource: + group: kubedb.com + kind: RedisSentinel + name: redissentinels + scope: Namespaced + version: v1alpha2 + ui: + editor: + name: kubedbcom-redissentinel-editor + url: https://bundles.byte.builders/ui/ + version: v0.2.0 + validation: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + name: + description: 'Name must be unique within a namespace. Is required when + creating resources, although some resources may allow a client to + request the generation of an appropriate name automatically. Name + is primarily intended for creation idempotence and configuration definition. + Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: "Namespace defines the space within which each name must + be unique. An empty namespace is equivalent to the \"default\" namespace, + but \"default\" is the canonical representation. Not all objects are + required to be scoped to a namespace - the value of this field for + those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces" + type: string + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used to organize + and categorize (scope and select) objects. May match selectors of + replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map stored with + a resource that may be set by external tools to store and retrieve + arbitrary metadata. They are not queryable and should be preserved + when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + type: object + spec: + properties: + authSecret: + properties: + name: + type: string + type: object + halted: + type: boolean + monitor: + properties: + agent: + type: string + prometheus: + properties: + exporter: + properties: + args: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + port: + default: 56790 + format: int32 + type: integer + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + type: object + serviceMonitor: + properties: + interval: + type: string + labels: + additionalProperties: + type: string + type: object + type: object + type: object + type: object + podTemplate: + properties: + controller: + properties: + annotations: + additionalProperties: + type: string + type: object + type: object + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + namespaces: + items: + type: string + type: array + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + args: + items: + type: string + type: array + containerSecurityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + hostIPC: + type: boolean + hostNetwork: + type: boolean + hostPID: + type: boolean + imagePullSecrets: + items: + properties: + name: + type: string + type: object + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + nodeSelector: + additionalProperties: + type: string + type: object + priority: + format: int32 + type: integer + priorityClassName: + type: string + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + schedulerName: + type: string + securityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + type: object + type: object + replicas: + format: int32 + type: integer + serviceTemplates: + items: + properties: + alias: + enum: + - primary + - standby + - stats + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + clusterIP: + type: string + externalIPs: + items: + type: string + type: array + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + ports: + items: + properties: + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + required: + - port + type: object + type: array + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + required: + - alias + type: object + type: array + storage: + properties: + accessModes: + items: + type: string + type: array + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + storageClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + storageType: + enum: + - Durable + - Ephemeral + type: string + terminationPolicy: + enum: + - Halt + - Delete + - WipeOut + - DoNotTerminate + type: string + tls: + properties: + certificates: + items: + properties: + alias: + type: string + dnsNames: + items: + type: string + type: array + duration: + type: string + emailAddresses: + items: + type: string + type: array + ipAddresses: + items: + type: string + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + privateKey: + properties: + encoding: + enum: + - PKCS1 + - PKCS8 + type: string + type: object + renewBefore: + type: string + secretName: + type: string + subject: + properties: + countries: + items: + type: string + type: array + localities: + items: + type: string + type: array + organizationalUnits: + items: + type: string + type: array + organizations: + items: + type: string + type: array + postalCodes: + items: + type: string + type: array + provinces: + items: + type: string + type: array + serialNumber: + type: string + streetAddresses: + items: + type: string + type: array + type: object + uris: + items: + type: string + type: array + required: + - alias + type: object + type: array + issuerRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + type: object + version: + type: string + required: + - version + type: object + type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubevault.com/v1alpha1/vaultservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubevault.com/v1alpha1/vaultservers.yaml index d1d57cca7..9a970c559 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubevault.com/v1alpha1/vaultservers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/kubevault.com/v1alpha1/vaultservers.yaml @@ -24,7 +24,7 @@ spec: editor: name: kubevaultcom-vaultserver-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -73,6 +73,116 @@ spec: type: object spec: properties: + allowedSecretEngines: + default: + namespaces: + from: Same + description: "AllowedSecretEngines defines the types of Secret Engines + that MAY be attached to a Listener and the trusted namespaces where + those Route resources MAY be present. \n Although a client request + may match multiple route rules, only one rule may ultimately receive + the request. Matching precedence MUST be determined in order of the + following criteria: \n * The most specific match as defined by the + Route type. * The oldest Route based on creation timestamp. For example, + a Route with a creation timestamp of \"2020-09-08 01:02:03\" is + given precedence over a Route with a creation timestamp of \"2020-09-08 + 01:02:04\". * If everything else is equivalent, the Route appearing + first in alphabetical order (namespace/name) should be given precedence. + For example, foo/bar is given precedence over foo/baz. \n All valid + rules within a Route attached to this Listener should be implemented. + Invalid Route rules can be ignored (sometimes that will mean the full + Route). If a Route rule transitions from valid to invalid, support + for that Route rule should be dropped to ensure consistency. For example, + even if a filter specified by a Route rule is invalid, the rest of + the rules within that Route should still be supported. \n Support: + Core" + properties: + namespaces: + default: + from: Same + description: Namespaces indicates namespaces from which Secret Engines + may be attached to this Listener. This is restricted to the namespace + of this VaultServer by default. + properties: + from: + default: Same + description: 'From indicates where Secret Engines will be selected + for this VaultServer. Possible values are: * All: Secret Engines + in all namespaces may be used by this VaultServer. * Selector: + Secret Engines in namespaces selected by the selector may + be used by this VaultServer. * Same: Only Secret Engines + in the same namespace may be used by this VaultServer.' + enum: + - All + - Selector + - Same + type: string + selector: + description: Selector must be specified when From is set to + "Selector". In that case, only Secret Engines in Namespaces + matching this Selector will be selected by this VaultServer. + This field is ignored for other values of "From". + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + type: object + secretEngines: + description: SecretEngines specifies the types of Secret Engines + that are allowed to bind to this VaultServer. When unspecified + or empty, all types of Secret Engines are allowed. + items: + enum: + - kv + - pki + - aws + - azure + - gcp + - postgres + - mongodb + - mysql + - elasticsearch + type: string + type: array + type: object authMethods: description: Specifies the list of auth methods to enable items: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml index 0317868e8..0705bc328 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml @@ -19,4 +19,4 @@ spec: editor: name: metaappscodecom-resourcedescriptor-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml new file mode 100644 index 000000000..52db2d955 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml @@ -0,0 +1,355 @@ +apiVersion: meta.appscode.com/v1alpha1 +kind: ResourceDescriptor +metadata: + creationTimestamp: null + labels: + k8s.io/group: metrics.appscode.com + k8s.io/kind: MetricsConfiguration + k8s.io/resource: metricsconfigurations + k8s.io/version: v1alpha1 + name: metrics.appscode.com-v1alpha1-metricsconfigurations +spec: + resource: + group: metrics.appscode.com + kind: MetricsConfiguration + name: metricsconfigurations + scope: Cluster + version: v1alpha1 + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + properties: + name: + description: 'Name must be unique within a namespace. Is required when + creating resources, although some resources may allow a client to + request the generation of an appropriate name automatically. Name + is primarily intended for creation idempotence and configuration definition. + Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used to organize + and categorize (scope and select) objects. May match selectors of + replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map stored with + a resource that may be set by external tools to store and retrieve + arbitrary metadata. They are not queryable and should be preserved + when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + type: object + spec: + description: MetricsConfigurationSpec is the spec of MetricsConfiguration + object. + properties: + metrics: + description: List of Metrics configuration for the resource object defined + in TargetRef + items: + description: Metrics contains the configuration of a metric in prometheus + style. + properties: + field: + description: Field defines the metric value path of the manifest + file and the type of that value + properties: + path: + description: 'Path defines the json path of the object. Example: + For deployment spec replica count, the path will be .spec.replicas' + type: string + type: + description: Type defines the type of the value in the given + Path Type can be "Integer" for integer value like .spec.replicas, + "DateTime" for time stamp value like .metadata.creationTimestamp + "Array" for array field like .spec.containers "String" for + string field like .statue.phase (for pod status) + enum: + - Integer + - DateTime + - Array + - String + type: string + required: + - path + - type + type: object + help: + description: 'Help is used to describe the metrics. Example: For + kube_deployment_spec_replicas, help string can be "Number of + desired pods for a deployment."' + type: string + labels: + description: Labels defines the metric labels as a key-value pair + items: + description: "Label contains the information of a metric label. + Given labels are always added in the metrics along with resource + name and namespace. Resource's name and namespace are always + added in the labels by default. No configuration is needed + for name and namespace labels. \n Example: kube_pod_info{pod=\"\", + namespace=\"\", host_ip=\"172.18.0.2\", pod_ip=\"10.244.0.14\", + node=\"kind-control-plane\"} 1 In the example pod, namespace, + host_ip, pod_ip, node are labels. pod(resource name) and namespace + are default labels. No configurations is needed for those. + \n To generate others labels, config should be given in the + following way \n labels: - key: host_ip valuePath: .status.hostIP + \ - key: pod_ip valuePath: .status.podIP - key: node + \ valuePath: .spec.nodeName \n Either Value or ValuePath + must be specified for a Label. If both is specified, ValuePath + is ignored. Note that if a valuePath doesn't exist for a label + key, the label will be ignored." + properties: + key: + description: Key defines the label key + type: string + value: + description: 'Value defines the hard coded label value. + Example: labels: - key: unit value: byte - key: + environment value: production' + type: string + valuePath: + description: 'ValuePath defines the label value path. Example: + To add deployment''s resource version as labels, labels: - + key: version valuePath: .metadata.resourceVersion' + type: string + required: + - key + type: object + type: array + metricValue: + description: "MetricValue defines the configuration to obtain + metric value. \n Metrics must contain either States or MetricValue. + If both are specified, MetricValue will be ignored." + properties: + value: + description: "Value contains the metric value. It is always + equal to 1. It is defined when some information of the object + is collected as labels but there is no specific metric value. + \n Example: For metrics \"kube_pod_info\", there are some + information like host_ip, pod_ip, node name is collected + as labels. As there must be a metric value, metric value + is kept as 1. The metric will look like `kube_pod_info{host_ip=\"172.18.0.2\", + pod_ip=\"10.244.0.14\", node=\"kind-control-plane\" .....} + \ 1`" + format: double + type: number + valueFromExpression: + description: "ValueFromExpression contains an expression for + the metric value expression can be a function as well. Parameters + is used in the expression string \n Available expression + evaluation functions are: \n int() returns 1 if the expression + is true otherwise 0, example: int(phase == 'Running') \n + percentage(percent, total, roundUp) returns the value of + (percent * total%) when `percent` contains the percent(%) + value. If percent represents an Integer value, then it will + simply return it. roundUp is an optional field. By default, + its value is false. If roundUp is set as `true`, the resultant + value will be rounded up. example: (i) percentage(\"25%\", + 4) will return 1. (ii) percentage(\"25%\", 1 , true) + will return 1 as roundUp is set as true. (iii) percentage(2, + 4) will return 2 as percent is representing an Integer value. + \n cpu_cores() returns the cpu in unit core example: cpu_cores(cpu), + for cpu value 150m, it will return 0.15 \n bytes() returns + the memory size in byte example: bytes(memory), for memory + value 1 ki, it will return 1024 \n unix() returns the DateTime + string into unix format. example: unix(dateTime) will return + the corresponding unix value for the given dateTime \n in + above examples phase, replicas, maxUnavailable, cpu, memory, + dateTime are Parameter's key those values will come from + corresponding Parameter's value \n Some expression evaluation + functions are used for calculating resource requests and + limits. Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go" + type: string + valueFromPath: + description: "ValueFromPath contains the field path of the + manifest file of a object. ValueFromPath is used when the + metric value is coming from any specific json path of the + object. \n Example: For metrics \"kube_deployment_spec_replicas\", + the metricValue is coming from a specific path .spec.replicas + In this case, valueFromPath: .spec.replicas Some example + of json path: .metadata.observedGeneration, .spec.restartPolicy, + .status.startTime \n Some example of json path which is + coming from an element of an array: .spec.containers[*].image, + .status.containerStatuses[*].restartCount" + type: string + type: object + name: + description: 'Name defines the metrics name. Name should be in + snake case. Example: kube_deployment_spec_replicas' + type: string + params: + description: Params is list of parameters configuration used in + expression evaluation + items: + description: Parameter contains the information of a parameter + used in expression evaluation Parameter should contain an + user defined key and corresponding Value or ValuePath. Either + Value or ValuePath must be specified. If both are specified, + ValuePath is ignored. + properties: + key: + description: Key defines the parameter's key + type: string + value: + description: Value defines user defined parameter's value. + type: string + valuePath: + description: 'ValuePath defines the manifest field path + for the parameter''s value. Example: To add deployment''s + spec replica count as parameter, params: - key: replica valuePath: + .spec.replicas' + type: string + required: + - key + type: object + type: array + states: + description: "States handle metrics with label cardinality. States + specify the possible states for a label and their corresponding + MetricValue configuration. \n Metrics must contain either States + or MetricValue. If both are specified, MetricValue will be ignored." + properties: + labelKey: + description: 'LabelKey defines an user defined label key of + the label which label cardinality is greater than one. Example: + For metric "kube_pod_status_phase", the LabelKey can be + "phase"' + type: string + values: + description: 'Values contains the list of state values. The + size of the list is always equal to the cardinality of that + label. Example: "kube_pod_statue_phase" metric has a label + "phase" which cardinality is equal to 5. So Values should + have StateValues config for all of them.' + items: + description: StateValues contains the information of a state + value. StateValues is used to define state with all possible + label values and corresponding MetricValue. + properties: + labelValue: + description: 'LabelValue defines the value of the label. + Example: For labelKey "phase" (metric: kube_pod_status_phase + path: .status.phase ) label value can be "Running", + "Succeeded", "Failed", "Unknown" and "Pending"' + type: string + metricValue: + description: MetricValue defines the configuration of + the metric value for the corresponding LabelValue + properties: + value: + description: "Value contains the metric value. It + is always equal to 1. It is defined when some + information of the object is collected as labels + but there is no specific metric value. \n Example: + For metrics \"kube_pod_info\", there are some + information like host_ip, pod_ip, node name is + collected as labels. As there must be a metric + value, metric value is kept as 1. The metric will + look like `kube_pod_info{host_ip=\"172.18.0.2\", + pod_ip=\"10.244.0.14\", node=\"kind-control-plane\" + .....} 1`" + format: double + type: number + valueFromExpression: + description: "ValueFromExpression contains an expression + for the metric value expression can be a function + as well. Parameters is used in the expression + string \n Available expression evaluation functions + are: \n int() returns 1 if the expression is true + otherwise 0, example: int(phase == 'Running') + \n percentage(percent, total, roundUp) returns + the value of (percent * total%) when `percent` + contains the percent(%) value. If percent represents + an Integer value, then it will simply return it. + roundUp is an optional field. By default, its + value is false. If roundUp is set as `true`, the + resultant value will be rounded up. example: (i) + percentage(\"25%\", 4) will return 1. (ii) + percentage(\"25%\", 1 , true) will return 1 as + roundUp is set as true. (iii) percentage(2, + 4) will return 2 as percent is representing an + Integer value. \n cpu_cores() returns the cpu + in unit core example: cpu_cores(cpu), for cpu + value 150m, it will return 0.15 \n bytes() returns + the memory size in byte example: bytes(memory), + for memory value 1 ki, it will return 1024 \n + unix() returns the DateTime string into unix format. + example: unix(dateTime) will return the corresponding + unix value for the given dateTime \n in above + examples phase, replicas, maxUnavailable, cpu, + memory, dateTime are Parameter's key those values + will come from corresponding Parameter's value + \n Some expression evaluation functions are used + for calculating resource requests and limits. + Those functions are stated here: https://github.com/kmodules/resource-metrics/blob/master/eval.go" + type: string + valueFromPath: + description: "ValueFromPath contains the field path + of the manifest file of a object. ValueFromPath + is used when the metric value is coming from any + specific json path of the object. \n Example: + For metrics \"kube_deployment_spec_replicas\", + the metricValue is coming from a specific path + .spec.replicas In this case, valueFromPath: .spec.replicas + Some example of json path: .metadata.observedGeneration, + .spec.restartPolicy, .status.startTime \n Some + example of json path which is coming from an element + of an array: .spec.containers[*].image, .status.containerStatuses[*].restartCount" + type: string + type: object + required: + - labelValue + - metricValue + type: object + type: array + required: + - labelKey + - values + type: object + type: + description: Type defines the metrics type. For kubernetes based + object, types can only be "gauge" + enum: + - gauge + type: string + required: + - help + - name + - type + type: object + type: array + targetRef: + description: TargetRef defines the object for which metrics will be + collected + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object. + type: string + kind: + description: Kind is a string value representing the REST resource + this object represents. In CamelCase. + type: string + required: + - apiVersion + - kind + type: object + required: + - metrics + - targetRef + type: object + type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/alertmanagers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/alertmanagers.yaml index 5b7b4c0c9..a6fe8e0b4 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/alertmanagers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/alertmanagers.yaml @@ -24,7 +24,7 @@ spec: editor: name: monitoringcoreoscom-alertmanager-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Alertmanager describes an Alertmanager cluster. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/podmonitors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/podmonitors.yaml index c8cff7176..df949e895 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/podmonitors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/podmonitors.yaml @@ -64,7 +64,7 @@ spec: editor: name: monitoringcoreoscom-podmonitor-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PodMonitor defines monitoring for a set of pods. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/probes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/probes.yaml index c8d69aa76..a78d822d7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/probes.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/probes.yaml @@ -19,7 +19,7 @@ spec: editor: name: monitoringcoreoscom-probe-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Probe defines monitoring for a set of static targets or ingresses. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheuses.yaml index c08c23d7a..a560842f9 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheuses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheuses.yaml @@ -120,7 +120,7 @@ spec: editor: name: monitoringcoreoscom-prometheus-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Prometheus defines a Prometheus deployment. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheusrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheusrules.yaml index a87dd28fe..ec6eebf31 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheusrules.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/prometheusrules.yaml @@ -24,7 +24,7 @@ spec: editor: name: monitoringcoreoscom-prometheusrule-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PrometheusRule defines recording and alerting rules for a Prometheus diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/servicemonitors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/servicemonitors.yaml index 8a3010080..e221eabf2 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/servicemonitors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/servicemonitors.yaml @@ -81,7 +81,7 @@ spec: editor: name: monitoringcoreoscom-servicemonitor-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 instanceLabelPaths: - spec.selector.matchLabels validation: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/thanosrulers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/thanosrulers.yaml index cbffa0640..6306bd185 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/thanosrulers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1/thanosrulers.yaml @@ -19,7 +19,7 @@ spec: editor: name: monitoringcoreoscom-thanosruler-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ThanosRuler defines a ThanosRuler deployment. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml index 19fec6feb..9eaec8b27 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml @@ -19,7 +19,7 @@ spec: editor: name: monitoringcoreoscom-alertmanagerconfig-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: AlertmanagerConfig defines a namespaced AlertmanagerConfig to be diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingressclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingressclasses.yaml index 7d06be765..faadd7ffa 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingressclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingressclasses.yaml @@ -19,7 +19,7 @@ spec: editor: name: networkingk8sio-ingressclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: IngressClass represents the class of the Ingress, referenced by diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingresses.yaml index 91a483a1b..31320c02b 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingresses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/ingresses.yaml @@ -24,7 +24,7 @@ spec: editor: name: networkingk8sio-ingress-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Ingress is a collection of rules that allow inbound connections diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/networkpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/networkpolicies.yaml index b91516260..068b90808 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/networkpolicies.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1/networkpolicies.yaml @@ -24,7 +24,7 @@ spec: editor: name: networkingk8sio-networkpolicy-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: NetworkPolicy describes what network traffic is allowed for a set diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingressclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingressclasses.yaml index 02e3efb73..5c44ec7fb 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingressclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingressclasses.yaml @@ -19,7 +19,7 @@ spec: editor: name: networkingk8sio-ingressclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: IngressClass represents the class of the Ingress, referenced by diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingresses.yaml index ee02a9422..8d4e60120 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingresses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/networking.k8s.io/v1beta1/ingresses.yaml @@ -24,7 +24,7 @@ spec: editor: name: networkingk8sio-ingress-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Ingress is a collection of rules that allow inbound connections diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1/runtimeclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1/runtimeclasses.yaml index 64a1ef480..e4b610bec 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1/runtimeclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1/runtimeclasses.yaml @@ -24,7 +24,7 @@ spec: editor: name: nodek8sio-runtimeclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: RuntimeClass defines a class of container runtime supported in diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1beta1/runtimeclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1beta1/runtimeclasses.yaml index c2cf078eb..337c527aa 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1beta1/runtimeclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/node.k8s.io/v1beta1/runtimeclasses.yaml @@ -24,7 +24,7 @@ spec: editor: name: nodek8sio-runtimeclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: RuntimeClass defines a class of container runtime supported in diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml index 22c6d47fd..979bf056a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-elasticsearchopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml index 8255a165c..d771c5b4e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-etcdopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml index 9a051246c..89032d20d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-mariadbopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml index 313bcef3a..4d38b77b4 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-memcachedopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml index e81e140fc..59c8e2c6c 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-mongodbopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml index 0b4d83647..98dee5a65 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-mysqlopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml index a74fcb2eb..0e7df2e32 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-perconaxtradbopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml index cdee1e0a6..e68578a8a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-pgbounceropsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml index 1642e99c0..778a6c2db 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-postgresopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml index ed22774a8..08a5242cf 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-proxysqlopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml index a6bcca76e..cc04c0548 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml @@ -64,7 +64,7 @@ spec: editor: name: opskubedbcom-redisopsrequest-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml index 2db0ffc91..39f7a880e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml @@ -24,7 +24,7 @@ spec: editor: name: policykubevaultcom-vaultpolicy-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml index 99cab72ed..0d5713bbc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml @@ -24,7 +24,7 @@ spec: editor: name: policykubevaultcom-vaultpolicybinding-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/evictions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/evictions.yaml index 8bacbf9dc..5d7682802 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/evictions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/evictions.yaml @@ -19,7 +19,7 @@ spec: editor: name: policy-eviction-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Eviction evicts a pod from its node subject to certain policies diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/poddisruptionbudgets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/poddisruptionbudgets.yaml index 0548448e6..0ffe66890 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/poddisruptionbudgets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/poddisruptionbudgets.yaml @@ -72,7 +72,7 @@ spec: editor: name: policy-poddisruptionbudget-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PodDisruptionBudget is an object to define the max disruption that diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/podsecuritypolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/podsecuritypolicies.yaml index 6c2e4bb50..7f45fdb55 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/podsecuritypolicies.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/policy/v1beta1/podsecuritypolicies.yaml @@ -77,7 +77,7 @@ spec: editor: name: policy-podsecuritypolicy-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PodSecurityPolicy governs the ability to make requests that affect diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml index 7610f6a97..3317603e4 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml @@ -66,7 +66,7 @@ spec: editor: name: rbacauthorizationk8sio-clusterrolebinding-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ClusterRoleBinding references a ClusterRole, but not contain it. It diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterroles.yaml index e30747234..92ba66fc2 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterroles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/clusterroles.yaml @@ -41,7 +41,7 @@ spec: editor: name: rbacauthorizationk8sio-clusterrole-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: ClusterRole is a cluster level, logical grouping of PolicyRules diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/rolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/rolebindings.yaml index 2b7c503fb..b150c87c4 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/rolebindings.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/rolebindings.yaml @@ -68,7 +68,7 @@ spec: editor: name: rbacauthorizationk8sio-rolebinding-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: RoleBinding references a role, but does not contain it. It can diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/roles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/roles.yaml index bf4e97199..4edf6792d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/roles.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/rbac.authorization.k8s.io/v1/roles.yaml @@ -63,7 +63,7 @@ spec: editor: name: rbacauthorizationk8sio-role-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: Role is a namespaced, logical grouping of PolicyRules that can diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml index 87c455eb7..a9b27978e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml @@ -19,7 +19,7 @@ spec: editor: name: repositoriesstashappscodecom-snapshot-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/scheduling.k8s.io/v1/priorityclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/scheduling.k8s.io/v1/priorityclasses.yaml index f20476a19..cf0c15aea 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/scheduling.k8s.io/v1/priorityclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/scheduling.k8s.io/v1/priorityclasses.yaml @@ -24,7 +24,7 @@ spec: editor: name: schedulingk8sio-priorityclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PriorityClass defines mapping from a priority class name to the diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml index fb04883ac..f4d55291f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml @@ -15,6 +15,11 @@ spec: name: secretproviderclasses scope: Namespaced version: v1alpha1 + ui: + editor: + name: secretsstorecsixk8sio-secretproviderclass-editor + url: https://bundles.byte.builders/ui/ + version: v0.2.0 validation: openAPIV3Schema: description: SecretProviderClass is the Schema for the secretproviderclasses diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml index 0f6525e14..e80d1c582 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml @@ -15,6 +15,11 @@ spec: name: secretproviderclasspodstatuses scope: Namespaced version: v1alpha1 + ui: + editor: + name: secretsstorecsixk8sio-secretproviderclasspodstatus-editor + url: https://bundles.byte.builders/ui/ + version: v0.2.0 validation: openAPIV3Schema: description: SecretProviderClassPodStatus is the Schema for the secretproviderclassespodstatus diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/settings.k8s.io/v1alpha1/podpresets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/settings.k8s.io/v1alpha1/podpresets.yaml index ce9d5b0e6..1019073a8 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/settings.k8s.io/v1alpha1/podpresets.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/settings.k8s.io/v1alpha1/podpresets.yaml @@ -19,7 +19,7 @@ spec: editor: name: settingsk8sio-podpreset-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: PodPreset is a policy resource that defines additional runtime diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml index 87c64f4bf..a0b075e8f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml @@ -19,7 +19,7 @@ spec: editor: name: snapshotstoragek8sio-volumesnapshotclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: VolumeSnapshotClass specifies parameters that a underlying storage diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml index d767212cf..001f05f28 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml @@ -19,7 +19,7 @@ spec: editor: name: snapshotstoragek8sio-volumesnapshotcontent-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: VolumeSnapshotContent represents the actual "on-disk" snapshot diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml index 7d965287c..88708b4ea 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml @@ -19,7 +19,7 @@ spec: editor: name: snapshotstoragek8sio-volumesnapshot-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: VolumeSnapshot is a user's request for either creating a point-in-time diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/recoveries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/recoveries.yaml index 4290bbfbe..55c8869c9 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/recoveries.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/recoveries.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-recovery-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/repositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/repositories.yaml index de3e9aa67..e3740cc3f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/repositories.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/repositories.yaml @@ -61,7 +61,7 @@ spec: editor: name: stashappscodecom-repository-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/restics.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/restics.yaml index 2e4d82600..642525142 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/restics.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1alpha1/restics.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-restic-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupbatches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupbatches.yaml index 6656bb2ce..d2487e1c5 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupbatches.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupbatches.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-backupbatch-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupblueprints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupblueprints.yaml index 111681d1d..041156740 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupblueprints.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupblueprints.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-backupblueprint-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupconfigurations.yaml index 2c323da99..39b4c1c6d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupconfigurations.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupconfigurations.yaml @@ -154,7 +154,7 @@ spec: editor: name: stashappscodecom-backupconfiguration-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupsessions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupsessions.yaml index a9533d7b5..1514e7d03 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupsessions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/backupsessions.yaml @@ -69,7 +69,7 @@ spec: editor: name: stashappscodecom-backupsession-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/functions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/functions.yaml index e66a24b7b..6fc34d457 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/functions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/functions.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-function-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restorebatches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restorebatches.yaml index 214f100c5..37ae12e2d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restorebatches.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restorebatches.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-restorebatch-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restoresessions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restoresessions.yaml index c8e4cc1ba..2fe412bfb 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restoresessions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/restoresessions.yaml @@ -126,7 +126,7 @@ spec: editor: name: stashappscodecom-restoresession-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/tasks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/tasks.yaml index 4f7588a72..03de2f04d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/tasks.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/stash.appscode.com/v1beta1/tasks.yaml @@ -24,7 +24,7 @@ spec: editor: name: stashappscodecom-task-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csidrivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csidrivers.yaml index 3332cbb19..6bc8b3203 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csidrivers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csidrivers.yaml @@ -24,7 +24,7 @@ spec: editor: name: storagek8sio-csidriver-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: CSIDriver captures information about a Container Storage Interface diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csinodes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csinodes.yaml index 1371b0c58..1393fdd06 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csinodes.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/csinodes.yaml @@ -24,7 +24,7 @@ spec: editor: name: storagek8sio-csinode-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: CSINode holds information about all CSI drivers installed on a diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/storageclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/storageclasses.yaml index f63b3528a..9fad72114 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/storageclasses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/storageclasses.yaml @@ -24,7 +24,7 @@ spec: editor: name: storagek8sio-storageclass-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: "StorageClass describes the parameters for a class of storage for diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/volumeattachments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/volumeattachments.yaml index a9566fd08..9d81e985c 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/volumeattachments.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1/volumeattachments.yaml @@ -19,7 +19,7 @@ spec: editor: name: storagek8sio-volumeattachment-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: "VolumeAttachment captures the intent to attach or detach the specified diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1beta1/csistoragecapacities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1beta1/csistoragecapacities.yaml index a10ad6c3b..ec57f9862 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1beta1/csistoragecapacities.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/storage.k8s.io/v1beta1/csistoragecapacities.yaml @@ -19,7 +19,7 @@ spec: editor: name: storagek8sio-csistoragecapacity-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: description: "CSIStorageCapacity stores the result of one CSI GetCapacity call. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1/ingresses.yaml index ab34c70ae..b400d28bb 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1/ingresses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1/ingresses.yaml @@ -23,8 +23,8 @@ spec: ui: editor: name: voyagerappscodecom-ingress-editor - url: https://raw.githubusercontent.com/bytebuilders/ui-wizards/master/stable - version: v0.1.0 + url: https://bundles.byte.builders/ui/ + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -1262,6 +1262,178 @@ spec: - mountPath type: object type: array + coordinator: + description: Coordinator defines attributes of the coordinator container + properties: + resources: + description: 'Compute Resources required by coordinator container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'Security options the coordinator container should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on + the container process. AllowPrivilegeEscalation is true always + when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in + privileged containers are essentially equivalent to root on + the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use + for the containers. The default is DefaultProcMount which + uses the container runtime defaults for readonly paths and + masked paths. This requires the ProcMountType feature flag + to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set in + PodSecurityContext. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to + start the container if it does. If unset or false, no such + validation will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + type: object defaultBackend: description: A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. @@ -1293,12 +1465,6 @@ spec: items: type: string type: array - headerRules: - description: "Header rules to modifies the header. \n Deprecated: - Use backendRule, will be removed." - items: - type: string - type: array hostNames: description: Host names to forward traffic to. If empty traffic will be forwarded to all subsets instance. If set only matched @@ -1320,12 +1486,6 @@ spec: description: HTTP protocol to use If the Proto contains "h2", "option http-use-htx" will be added to enable HTX mode https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/ type: string - rewriteRules: - description: "Path rewrite rules with haproxy formatted regex. \n - Deprecated: Use backendRule, will be removed." - items: - type: string - type: array service: description: Service references a Service as a Backend. This is a mutually exclusive setting with "Resource". @@ -1720,7 +1880,7 @@ spec: type: integer type: object resources: - description: Compute Resources required by the sidecar container. + description: Compute Resources required by the HAProxy container. properties: limits: additionalProperties: @@ -1845,12 +2005,6 @@ spec: items: type: string type: array - headerRules: - description: "Header rules to modifies the header. - \n Deprecated: Use backendRule, will be removed." - items: - type: string - type: array hostNames: description: Host names to forward traffic to. If empty traffic will be forwarded to all subsets @@ -1875,13 +2029,6 @@ spec: "h2", "option http-use-htx" will be added to enable HTX mode https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/ type: string - rewriteRules: - description: "Path rewrite rules with haproxy formatted - regex. \n Deprecated: Use backendRule, will be - removed." - items: - type: string - type: array service: description: Service references a Service as a Backend. This is a mutually exclusive setting with "Resource". diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/certificates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/certificates.yaml deleted file mode 100644 index a8979c4c9..000000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/certificates.yaml +++ /dev/null @@ -1,155 +0,0 @@ -apiVersion: meta.appscode.com/v1alpha1 -kind: ResourceDescriptor -metadata: - creationTimestamp: null - labels: - k8s.io/group: voyager.appscode.com - k8s.io/kind: Certificate - k8s.io/resource: certificates - k8s.io/version: v1beta1 - name: voyager.appscode.com-v1beta1-certificates -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/voyager.appscode.com/certificates.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/voyager.appscode.com/certificates.png - type: image/png - resource: - group: voyager.appscode.com - kind: Certificate - name: certificates - scope: Namespaced - version: v1beta1 - ui: - editor: - name: voyagerappscodecom-certificate-editor - url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - properties: - name: - description: 'Name must be unique within a namespace. Is required when - creating resources, although some resources may allow a client to - request the generation of an appropriate name automatically. Name - is primarily intended for creation idempotence and configuration definition. - Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must - be unique. An empty namespace is equivalent to the \"default\" namespace, - but \"default\" is the canonical representation. Not all objects are - required to be scoped to a namespace - the value of this field for - those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize - and categorize (scope and select) objects. May match selectors of - replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with - a resource that may be set by external tools to store and retrieve - arbitrary metadata. They are not queryable and should be preserved - when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object - type: object - spec: - properties: - acmeUserSecretName: - description: 'Secret contains ACMEUser information. Secret must contain - a key `email` If empty tries to find an Secret via domains if not - found create an ACMEUser and stores as a secret. Secrets key to be - expected: ACME_EMAIL -> required, if not provided it will through - error. ACME_SERVER_URL -> custom server url to generate certificates, - default is lets encrypt. ACME_USER_DATA -> user data, if not found - one will be created for the provided email, and stored in the key.' - type: string - challengeProvider: - description: ChallengeProvider details to verify domains - properties: - dns: - properties: - credentialSecretName: - type: string - provider: - description: DNS Provider from the list https://github.com/appscode/voyager/blob/master/docs/tasks/certificate/providers.md - type: string - type: object - http: - properties: - ingress: - description: LocalTypedReference contains enough information - to let you inspect or modify the referred object. - properties: - apiVersion: - description: API version of the referent. - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - type: object - type: object - type: object - domains: - description: Tries to obtain a single certificate using all domains - passed into Domains. The first domain in domains is used for the CommonName - field of the certificate, all other domains are added using the Subject - Alternate Names extension. - items: - type: string - type: array - paused: - description: Indicates that the certificate is paused. - type: boolean - renewalBufferDays: - description: Configure certificate renewal buffer period in days. Default - 15 days. - format: int32 - type: integer - storage: - description: Storage backend to store the certificates currently, kubernetes - secret and vault. - properties: - secret: - description: LocalObjectReference contains enough information to - let you locate the referenced object inside the same namespace. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - vault: - properties: - name: - type: string - prefix: - type: string - type: object - type: object - required: - - acmeUserSecretName - - challengeProvider - type: object - type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/ingresses.yaml index c6a7bfd26..0bb23b6b7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/ingresses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/voyager.appscode.com/v1beta1/ingresses.yaml @@ -24,7 +24,7 @@ spec: editor: name: voyagerappscodecom-ingress-editor url: https://bundles.byte.builders/ui/ - version: v0.2.0-alpha.0 + version: v0.2.0 validation: openAPIV3Schema: properties: @@ -903,12 +903,6 @@ spec: items: type: string type: array - headerRules: - description: "Header rules to modifies the header. \n Deprecated: - Use backendRule, will be removed." - items: - type: string - type: array hostNames: description: Host names to forward traffic to. If empty traffic will be forwarded to all subsets instance. If set only matched @@ -930,12 +924,6 @@ spec: description: HTTP protocol to use If the Proto contains "h2", "option http-use-htx" will be added to enable HTX mode https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/ type: string - rewriteRules: - description: "Path rewrite rules with haproxy formatted regex. \n - Deprecated: Use backendRule, will be removed." - items: - type: string - type: array serviceName: description: Specifies the name of the referenced service. type: string @@ -1336,6 +1324,178 @@ spec: - mountPath type: object type: array + coordinator: + description: Coordinator defines attributes of the coordinator container + properties: + resources: + description: 'Compute Resources required by coordinator container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'Security options the coordinator container should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on + the container process. AllowPrivilegeEscalation is true always + when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in + privileged containers are essentially equivalent to root on + the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use + for the containers. The default is DefaultProcMount which + uses the container runtime defaults for readonly paths and + masked paths. This requires the ProcMountType feature flag + to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set in + PodSecurityContext. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to + start the container if it does. If unset or false, no such + validation will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + type: object externalIPs: description: externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs @@ -1832,12 +1992,6 @@ spec: items: type: string type: array - headerRules: - description: "Header rules to modifies the header. - \n Deprecated: Use backendRule, will be removed." - items: - type: string - type: array hostNames: description: Host names to forward traffic to. If empty traffic will be forwarded to all subsets @@ -1862,13 +2016,6 @@ spec: "h2", "option http-use-htx" will be added to enable HTX mode https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/ type: string - rewriteRules: - description: "Path rewrite rules with haproxy formatted - regex. \n Deprecated: Use backendRule, will be - removed." - items: - type: string - type: array serviceName: description: Specifies the name of the referenced service. diff --git a/vendor/kmodules.xyz/resource-metrics/LICENSE b/vendor/kmodules.xyz/resource-metrics/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/vendor/kmodules.xyz/resource-metrics/api/constants.go b/vendor/kmodules.xyz/resource-metrics/api/constants.go new file mode 100644 index 000000000..ca1086865 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/api/constants.go @@ -0,0 +1,33 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 api + +type PodRole string + +const ( + PodRoleDefault PodRole = "" + PodRoleInit PodRole = "init" + PodRoleRouter PodRole = "router" + PodRoleExporter PodRole = "exporter" + PodRoleTotalShard PodRole = "total_shard" + PodRoleShard PodRole = "shard" + PodRoleReplicasPerShard PodRole = "replicas_per_shard" + PodRoleConfigServer PodRole = "config_server" + PodRoleMongos PodRole = "mongos" +) + +type ReplicaList map[PodRole]int64 diff --git a/vendor/kmodules.xyz/resource-metrics/api/doc.go b/vendor/kmodules.xyz/resource-metrics/api/doc.go new file mode 100644 index 000000000..194a94a30 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/api/doc.go @@ -0,0 +1,17 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 api diff --git a/vendor/kmodules.xyz/resource-metrics/api/interface.go b/vendor/kmodules.xyz/resource-metrics/api/interface.go new file mode 100644 index 000000000..f80c3a426 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/api/interface.go @@ -0,0 +1,122 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 api + +import ( + core "k8s.io/api/core/v1" +) + +type ResourceCalculator interface { + Replicas(obj map[string]interface{}) (int64, error) + RoleReplicas(obj map[string]interface{}) (ReplicaList, error) + + Mode(obj map[string]interface{}) (string, error) + + TotalResourceLimits(obj map[string]interface{}) (core.ResourceList, error) + TotalResourceRequests(obj map[string]interface{}) (core.ResourceList, error) + + AppResourceLimits(obj map[string]interface{}) (core.ResourceList, error) + AppResourceRequests(obj map[string]interface{}) (core.ResourceList, error) + + RoleResourceLimits(obj map[string]interface{}) (map[PodRole]core.ResourceList, error) + RoleResourceRequests(obj map[string]interface{}) (map[PodRole]core.ResourceList, error) +} + +type ResourceCalculatorFuncs struct { + // Resources used by the main application (eg, database) containers + AppRoles []PodRole + + // usually AppRoles + Exporter + Any custom sidecar (label selector etc.) that is used at runtime + // Must NOT include init container resources + RuntimeRoles []PodRole + + RoleReplicasFn func(obj map[string]interface{}) (ReplicaList, error) + ModeFn func(obj map[string]interface{}) (string, error) + RoleResourceLimitsFn func(obj map[string]interface{}) (map[PodRole]core.ResourceList, error) + RoleResourceRequestsFn func(obj map[string]interface{}) (map[PodRole]core.ResourceList, error) +} + +var _ ResourceCalculator = &ResourceCalculatorFuncs{} + +func (c ResourceCalculatorFuncs) Replicas(obj map[string]interface{}) (int64, error) { + replicas, err := c.RoleReplicas(obj) + if err != nil { + return 0, err + } + var cnt int64 = 0 + for _, role := range c.AppRoles { + cnt += replicas[role] + } + return cnt, nil +} + +func (c ResourceCalculatorFuncs) RoleReplicas(obj map[string]interface{}) (ReplicaList, error) { + return c.RoleReplicasFn(obj) +} + +func (c ResourceCalculatorFuncs) Mode(obj map[string]interface{}) (string, error) { + if c.ModeFn != nil { + return c.ModeFn(obj) + } + return "", nil +} + +func (c ResourceCalculatorFuncs) TotalResourceLimits(obj map[string]interface{}) (core.ResourceList, error) { + rr, err := c.RoleResourceLimits(obj) + if err != nil { + return nil, err + } + return MaxResourceList( + ResourceListForRoles(rr, c.RuntimeRoles), + ResourceListForRoles(rr, []PodRole{PodRoleInit}), + ), nil +} + +func (c ResourceCalculatorFuncs) TotalResourceRequests(obj map[string]interface{}) (core.ResourceList, error) { + rr, err := c.RoleResourceRequests(obj) + if err != nil { + return nil, err + } + return MaxResourceList( + ResourceListForRoles(rr, c.RuntimeRoles), + ResourceListForRoles(rr, []PodRole{PodRoleInit}), + ), nil +} + +func (c ResourceCalculatorFuncs) AppResourceLimits(obj map[string]interface{}) (core.ResourceList, error) { + rr, err := c.RoleResourceLimits(obj) + if err != nil { + return nil, err + } + return ResourceListForRoles(rr, c.AppRoles), nil +} + +func (c ResourceCalculatorFuncs) AppResourceRequests(obj map[string]interface{}) (core.ResourceList, error) { + rr, err := c.RoleResourceRequests(obj) + if err != nil { + return nil, err + } + return ResourceListForRoles(rr, c.AppRoles), nil +} + +func (c ResourceCalculatorFuncs) RoleResourceLimits(obj map[string]interface{}) (map[PodRole]core.ResourceList, error) { + return c.RoleResourceLimitsFn(obj) +} + +func (c ResourceCalculatorFuncs) RoleResourceRequests(obj map[string]interface{}) (map[PodRole]core.ResourceList, error) { + return c.RoleResourceRequestsFn(obj) +} diff --git a/vendor/kmodules.xyz/resource-metrics/api/plugins.go b/vendor/kmodules.xyz/resource-metrics/api/plugins.go new file mode 100644 index 000000000..281f0bd30 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/api/plugins.go @@ -0,0 +1,69 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 api + +import ( + "fmt" + "sync" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + plugins = map[schema.GroupVersionKind]ResourceCalculator{} + lock sync.RWMutex +) + +func Register(gvk schema.GroupVersionKind, c ResourceCalculator) { + lock.Lock() + plugins[gvk] = c + lock.Unlock() +} + +func Load(obj map[string]interface{}) (ResourceCalculator, error) { + u := unstructured.Unstructured{Object: obj} + gvk := u.GroupVersionKind() + + lock.RLock() + c, ok := plugins[gvk] + lock.RUnlock() + if !ok { + return nil, NotRegistered{gvk} + } + return c, nil +} + +func RegisteredTypes() []schema.GroupVersionKind { + lock.RLock() + result := make([]schema.GroupVersionKind, 0, len(plugins)) + for gvk := range plugins { + result = append(result, gvk) + } + lock.RUnlock() + return result +} + +type NotRegistered struct { + gvk schema.GroupVersionKind +} + +var _ error = NotRegistered{} + +func (e NotRegistered) Error() string { + return fmt.Sprintf("no calculator registered for %v", e.gvk) +} diff --git a/vendor/kmodules.xyz/resource-metrics/api/utils.go b/vendor/kmodules.xyz/resource-metrics/api/utils.go new file mode 100644 index 000000000..49ce3d833 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/api/utils.go @@ -0,0 +1,279 @@ +/* +Copyright AppsCode Inc. and Contributors + +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 api + +import ( + "fmt" + "strings" + + ofst "kmodules.xyz/offshoot-api/api/v1" + + "gomodules.xyz/pointer" + core "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" +) + +func ResourceListForRoles(rr map[PodRole]core.ResourceList, roles []PodRole) core.ResourceList { + cpu := resource.Quantity{Format: resource.DecimalSI} + memory := resource.Quantity{Format: resource.BinarySI} + storage := resource.Quantity{Format: resource.BinarySI} + + var rl core.ResourceList + for _, role := range roles { + rl = rr[role] + cpu.Add(*rl.Cpu()) + memory.Add(*rl.Memory()) + storage.Add(*rl.Storage()) + } + + result := core.ResourceList{} + if !cpu.IsZero() { + result[core.ResourceCPU] = cpu + } + if !memory.IsZero() { + result[core.ResourceMemory] = memory + } + if !storage.IsZero() { + result[core.ResourceStorage] = storage + } + return result +} + +func AddResourceList(x, y core.ResourceList) core.ResourceList { + result := core.ResourceList{} + + cpu := resource.Quantity{Format: resource.DecimalSI} + cpu.Add(*x.Cpu()) + cpu.Add(*y.Cpu()) + if !cpu.IsZero() { + result[core.ResourceCPU] = cpu + } + + memory := resource.Quantity{Format: resource.BinarySI} + memory.Add(*x.Memory()) + memory.Add(*y.Memory()) + if !memory.IsZero() { + result[core.ResourceMemory] = memory + } + + storage := resource.Quantity{Format: resource.BinarySI} + storage.Add(*x.Storage()) + storage.Add(*y.Storage()) + if !storage.IsZero() { + result[core.ResourceStorage] = storage + } + return result +} + +func MulResourceList(x core.ResourceList, multiplier int64) core.ResourceList { + result := core.ResourceList{} + + var q *resource.Quantity + + q = x.Cpu() + if !q.IsZero() { + n := resource.Quantity{Format: q.Format} + n.SetMilli(q.MilliValue() * multiplier) + result[core.ResourceCPU] = n + } + + q = x.Memory() + if !q.IsZero() { + n := resource.Quantity{Format: q.Format} + n.SetMilli(q.MilliValue() * multiplier) + result[core.ResourceMemory] = n + } + + q = x.Storage() + if !q.IsZero() { + n := resource.Quantity{Format: q.Format} + n.SetMilli(q.MilliValue() * multiplier) + result[core.ResourceStorage] = n + } + + return result +} + +func MaxResourceList(x, y core.ResourceList) core.ResourceList { + result := core.ResourceList{} + var q *resource.Quantity + + xCPU, yCPU := x.Cpu(), y.Cpu() + if xCPU.Cmp(*yCPU) >= 0 { + q = xCPU + } else { + q = yCPU + } + if !q.IsZero() { + result[core.ResourceCPU] = *q + } + + xMemory, yMemory := x.Memory(), y.Memory() + if xMemory.Cmp(*yMemory) >= 0 { + q = xMemory + } else { + q = yMemory + } + if !q.IsZero() { + result[core.ResourceMemory] = *q + } + + xStorage, yStorage := x.Storage(), y.Storage() + if xStorage.Cmp(*yStorage) >= 0 { + q = xStorage + } else { + q = yStorage + } + if !q.IsZero() { + result[core.ResourceStorage] = *q + } + + return result +} + +func ResourceLimits(rr core.ResourceRequirements) core.ResourceList { + get := func(name core.ResourceName) (*resource.Quantity, bool) { + if limit, exists := rr.Limits[name]; exists { + return &limit, true + } + if req, exists := rr.Requests[name]; exists { + return &req, true + } + return nil, false + } + result := core.ResourceList{} + if q, exists := get(core.ResourceCPU); exists { + result[core.ResourceCPU] = *q + } + if q, exists := get(core.ResourceMemory); exists { + result[core.ResourceMemory] = *q + } + if q, exists := get(core.ResourceStorage); exists { + result[core.ResourceStorage] = *q + } + return result +} + +func ResourceRequests(rr core.ResourceRequirements) core.ResourceList { + return rr.Requests +} + +type Container struct { + Resources core.ResourceRequirements `json:"resources"` +} + +func AggregateContainerResources( + obj map[string]interface{}, + fn func(rr core.ResourceRequirements) core.ResourceList, + aggregate func(x, y core.ResourceList) core.ResourceList, + fields ...string, +) (core.ResourceList, error) { + val, found, err := unstructured.NestedFieldNoCopy(obj, fields...) + if !found || err != nil { + return nil, err + } + containers, ok := val.([]interface{}) + if !ok { + return nil, fmt.Errorf("%v accessor error: %v is of the type %T, expected []interface{}", strings.Join(fields, "."), val, val) + } + + result := core.ResourceList{} + for i := range containers { + container, ok := containers[i].(map[string]interface{}) + if !ok { + continue + } + + var c Container + err := runtime.DefaultUnstructuredConverter.FromUnstructured(container, &c) + if err != nil { + return nil, fmt.Errorf("failed to parse container %#v: %w", container, err) + } + result = aggregate(result, fn(c.Resources)) + } + return result, nil +} + +func ContainerResources( + obj map[string]interface{}, + fn func(rr core.ResourceRequirements) core.ResourceList, + fields ...string, +) (core.ResourceList, error) { + val, found, err := unstructured.NestedFieldNoCopy(obj, fields...) + if !found || err != nil { + return nil, err + } + + var container Container + err = runtime.DefaultUnstructuredConverter.FromUnstructured(val.(map[string]interface{}), &container) + if err != nil { + return nil, fmt.Errorf("failed to parse container %#v: %w", container, err) + } + return fn(container.Resources), nil +} + +func StorageResources( + obj map[string]interface{}, + fn func(rr core.ResourceRequirements) core.ResourceList, + fields ...string, +) (core.ResourceList, error) { + val, found, err := unstructured.NestedFieldNoCopy(obj, fields...) + if !found || err != nil { + return nil, err + } + + var storage core.PersistentVolumeClaimSpec + err = runtime.DefaultUnstructuredConverter.FromUnstructured(val.(map[string]interface{}), &storage) + if err != nil { + return nil, fmt.Errorf("failed to parse storage %#v: %w", storage, err) + } + return fn(storage.Resources), nil +} + +type AppNode struct { + Replicas *int64 `json:"replicas,omitempty"` + PodTemplate ofst.PodTemplateSpec `json:"podTemplate,omitempty"` + Storage core.PersistentVolumeClaimSpec `json:"storage,omitempty"` +} + +func AppNodeResources( + obj map[string]interface{}, + fn func(rr core.ResourceRequirements) core.ResourceList, + fields ...string, +) (core.ResourceList, int64, error) { + val, found, err := unstructured.NestedFieldNoCopy(obj, fields...) + if !found || err != nil { + return nil, 0, err + } + + var node AppNode + err = runtime.DefaultUnstructuredConverter.FromUnstructured(val.(map[string]interface{}), &node) + if err != nil { + return nil, 0, fmt.Errorf("failed to parse node %#v: %w", node, err) + } + + if node.Replicas == nil { + node.Replicas = pointer.Int64P(1) + } + rr := fn(node.PodTemplate.Spec.Resources) + sr := fn(node.Storage.Resources) + rr[core.ResourceStorage] = *sr.Storage() + + return rr, *node.Replicas, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 186909b88..06990f94f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -87,7 +87,7 @@ github.com/blang/semver github.com/cenkalti/backoff # github.com/cespare/xxhash/v2 v2.1.1 github.com/cespare/xxhash/v2 -# github.com/cloudevents/sdk-go/v2 v2.4.1 +# github.com/cloudevents/sdk-go/v2 v2.5.0 github.com/cloudevents/sdk-go/v2 github.com/cloudevents/sdk-go/v2/binding github.com/cloudevents/sdk-go/v2/binding/format @@ -153,6 +153,8 @@ github.com/gogo/protobuf/gogoproto github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys +# github.com/golang-jwt/jwt v3.2.2+incompatible +## explicit # github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e github.com/golang/groupcache/lru # github.com/golang/protobuf v1.5.2 => github.com/golang/protobuf v1.4.3 @@ -164,7 +166,7 @@ github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp # github.com/google/btree v1.0.0 github.com/google/btree -# github.com/google/go-cmp v0.5.4 +# github.com/google/go-cmp v0.5.6 github.com/google/go-cmp/cmp github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags @@ -234,7 +236,7 @@ github.com/modern-go/reflect2 github.com/monochromegane/go-gitignore # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 github.com/munnerz/goautoneg -# github.com/nats-io/nats.go v1.11.0 +# github.com/nats-io/nats.go v1.12.3 github.com/nats-io/nats.go github.com/nats-io/nats.go/encoders/builtin github.com/nats-io/nats.go/util @@ -341,7 +343,7 @@ github.com/yudai/gojsondiff github.com/yudai/gojsondiff/formatter # github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 github.com/yudai/golcs -# go.bytebuilders.dev/audit v0.0.7 +# go.bytebuilders.dev/audit v0.0.8 ## explicit go.bytebuilders.dev/audit/api/v1 go.bytebuilders.dev/audit/lib @@ -1269,7 +1271,7 @@ k8s.io/utils/pointer k8s.io/utils/trace # kmodules.xyz/apiversion v0.2.0 kmodules.xyz/apiversion -# kmodules.xyz/client-go v0.0.0-20210921150324-f005c6dfcb32 +# kmodules.xyz/client-go v0.0.0-20210928133955-8df5bb467db6 ## explicit kmodules.xyz/client-go kmodules.xyz/client-go/admissionregistration @@ -1303,7 +1305,7 @@ kmodules.xyz/constants/aws kmodules.xyz/constants/azure kmodules.xyz/constants/google kmodules.xyz/constants/openstack -# kmodules.xyz/custom-resources v0.0.0-20210829135624-c63be82e13c0 +# kmodules.xyz/custom-resources v0.0.0-20211007064058-70fba50e58a4 ## explicit kmodules.xyz/custom-resources/apis/appcatalog kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1 @@ -1317,11 +1319,12 @@ kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alph kmodules.xyz/custom-resources/client/clientset/versioned/typed/auditor/v1alpha1 kmodules.xyz/custom-resources/client/clientset/versioned/typed/metrics/v1alpha1 kmodules.xyz/custom-resources/crds -# kmodules.xyz/objectstore-api v0.0.0-20210829122106-d39859fc2d56 +kmodules.xyz/custom-resources/util/siteinfo +# kmodules.xyz/objectstore-api v0.0.0-20210928135706-fdf68f88ea6e ## explicit kmodules.xyz/objectstore-api/api/v1 kmodules.xyz/objectstore-api/osm -# kmodules.xyz/offshoot-api v0.0.0-20210804100837-d0388be3e60d +# kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61 ## explicit kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/util @@ -1351,8 +1354,7 @@ kmodules.xyz/prober/probe kmodules.xyz/prober/probe/exec kmodules.xyz/prober/probe/http kmodules.xyz/prober/probe/tcp -# kmodules.xyz/resource-metadata v0.5.8-0.20210829123359-8f6a3d706da5 -## explicit +# kmodules.xyz/resource-metadata v0.6.3 kmodules.xyz/resource-metadata/apis/meta kmodules.xyz/resource-metadata/apis/meta/v1alpha1 kmodules.xyz/resource-metadata/crds @@ -1360,7 +1362,9 @@ kmodules.xyz/resource-metadata/hub kmodules.xyz/resource-metadata/hub/resourceclasses kmodules.xyz/resource-metadata/hub/resourcedescriptors kmodules.xyz/resource-metadata/pkg/graph -# kmodules.xyz/webhook-runtime v0.0.0-20210829120758-f6ab57afa7e4 +# kmodules.xyz/resource-metrics v0.0.5 +kmodules.xyz/resource-metrics/api +# kmodules.xyz/webhook-runtime v0.0.0-20210928141616-7f73c2ab318a ## explicit kmodules.xyz/webhook-runtime/admission kmodules.xyz/webhook-runtime/admission/v1beta1 @@ -1564,3 +1568,4 @@ stash.appscode.dev/apimachinery/pkg/util # k8s.io/utils => k8s.io/utils v0.0.0-20201110183641-67b214c5f920 # sigs.k8s.io/application => github.com/kmodules/application v0.8.4-0.20210427030912-90eeee3bc4ad # github.com/satori/go.uuid => github.com/gofrs/uuid v4.0.0+incompatible +# github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt v3.2.1+incompatible