From 76c1664992055a1ab53eca647949e7cac5ab11a4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 02:05:36 +0000 Subject: [PATCH 1/2] fix(deps): update patch digest dependencies --- go.mod | 19 +- go.sum | 35 +- .../github.com/go-openapi/swag/.codecov.yml | 4 - .../github.com/go-openapi/swag/.editorconfig | 26 - .../github.com/go-openapi/swag/.gitattributes | 2 - vendor/github.com/go-openapi/swag/.gitignore | 7 - .../github.com/go-openapi/swag/.golangci.yml | 81 - .../github.com/go-openapi/swag/.mockery.yml | 30 - .../go-openapi/swag/CODE_OF_CONDUCT.md | 76 - .../go-openapi/swag/CONTRIBUTORS.md | 36 - vendor/github.com/go-openapi/swag/README.md | 223 - vendor/github.com/go-openapi/swag/SECURITY.md | 37 - .../go-openapi/swag/cmdutils/LICENSE | 202 - .../go-openapi/swag/cmdutils/cmd_utils.go | 13 - .../go-openapi/swag/cmdutils/doc.go | 5 - .../go-openapi/swag/cmdutils_iface.go | 11 - .../github.com/go-openapi/swag/conv_iface.go | 486 - vendor/github.com/go-openapi/swag/doc.go | 47 - .../go-openapi/swag/fileutils/LICENSE | 202 - .../go-openapi/swag/fileutils/doc.go | 10 - .../go-openapi/swag/fileutils/file.go | 22 - .../go-openapi/swag/fileutils/path.go | 52 - .../go-openapi/swag/fileutils_iface.go | 33 - vendor/github.com/go-openapi/swag/go.work | 21 - vendor/github.com/go-openapi/swag/go.work.sum | 7 - .../go-openapi/swag/jsonname_iface.go | 24 - .../go-openapi/swag/jsonutils_iface.go | 65 - .../go-openapi/swag/loading/LICENSE | 202 - .../github.com/go-openapi/swag/loading/doc.go | 29 - .../go-openapi/swag/loading/errors.go | 15 - .../go-openapi/swag/loading/json.go | 25 - .../go-openapi/swag/loading/loading.go | 188 - .../go-openapi/swag/loading/options.go | 170 - .../go-openapi/swag/loading/yaml.go | 37 - .../go-openapi/swag/loading_iface.go | 93 - .../go-openapi/swag/mangling/BENCHMARK.md | 90 - .../go-openapi/swag/mangling/LICENSE | 202 - .../go-openapi/swag/mangling/doc.go | 25 - .../swag/mangling/initialism_index.go | 270 - .../go-openapi/swag/mangling/name_lexem.go | 186 - .../go-openapi/swag/mangling/name_mangler.go | 370 - .../go-openapi/swag/mangling/options.go | 150 - .../go-openapi/swag/mangling/pools.go | 123 - .../go-openapi/swag/mangling/split.go | 341 - .../go-openapi/swag/mangling/string_bytes.go | 11 - .../go-openapi/swag/mangling/util.go | 118 - .../go-openapi/swag/mangling_iface.go | 69 - .../go-openapi/swag/netutils/LICENSE | 202 - .../go-openapi/swag/netutils/doc.go | 5 - .../go-openapi/swag/netutils/net.go | 31 - .../go-openapi/swag/netutils_iface.go | 13 - .../go-openapi/swag/stringutils/LICENSE | 202 - .../swag/stringutils/collection_formats.go | 74 - .../go-openapi/swag/stringutils/doc.go | 5 - .../go-openapi/swag/stringutils/strings.go | 23 - .../go-openapi/swag/stringutils_iface.go | 34 - .../go-openapi/swag/typeutils_iface.go | 12 - .../go-openapi/swag/yamlutils/LICENSE | 202 - .../go-openapi/swag/yamlutils/doc.go | 13 - .../go-openapi/swag/yamlutils/errors.go | 15 - .../go-openapi/swag/yamlutils/ordered_map.go | 335 - .../go-openapi/swag/yamlutils/yaml.go | 328 - .../go-openapi/swag/yamlutils_iface.go | 20 - .../longhorn/go-common-libs/ns/sys.go | 25 + .../longhorn/go-common-libs/sys/device.go | 341 + .../go-common-libs/sys/mountid_linux.go | 76 + .../go-common-libs/sys/mountid_other.go | 10 + .../k8s.io/kube-openapi/pkg/internal/flags.go | 25 - .../pkg/internal/serialization.go | 3 +- .../go-json-experiment/json/AUTHORS | 3 - .../go-json-experiment/json/CONTRIBUTORS | 3 - .../go-json-experiment/json/LICENSE | 27 - .../go-json-experiment/json/README.md | 175 - .../go-json-experiment/json/arshal.go | 578 - .../go-json-experiment/json/arshal_any.go | 285 - .../go-json-experiment/json/arshal_default.go | 1908 -- .../go-json-experiment/json/arshal_funcs.go | 430 - .../go-json-experiment/json/arshal_inlined.go | 228 - .../go-json-experiment/json/arshal_methods.go | 335 - .../go-json-experiment/json/arshal_time.go | 775 - .../go-json-experiment/json/doc.go | 262 - .../go-json-experiment/json/errors.go | 428 - .../go-json-experiment/json/fields.go | 652 - .../go-json-experiment/json/fold.go | 56 - .../go-json-experiment/json/intern.go | 86 - .../json/internal/internal.go | 40 - .../json/internal/jsonflags/flags.go | 213 - .../json/internal/jsonopts/options.go | 200 - .../json/internal/jsonwire/decode.go | 627 - .../json/internal/jsonwire/encode.go | 288 - .../json/internal/jsonwire/wire.go | 215 - .../json/jsontext/decode.go | 1177 - .../go-json-experiment/json/jsontext/doc.go | 109 - .../json/jsontext/encode.go | 975 - .../json/jsontext/errors.go | 180 - .../json/jsontext/export.go | 75 - .../json/jsontext/options.go | 302 - .../go-json-experiment/json/jsontext/pools.go | 150 - .../go-json-experiment/json/jsontext/quote.go | 39 - .../go-json-experiment/json/jsontext/state.go | 826 - .../go-json-experiment/json/jsontext/token.go | 525 - .../go-json-experiment/json/jsontext/value.go | 393 - .../go-json-experiment/json/migrate.sh | 48 - .../go-json-experiment/json/options.go | 287 - .../kube-openapi/pkg/schemaconv/openapi.go | 3 +- .../pkg/schemaconv/proto_models.go | 3 +- .../k8s.io/kube-openapi/pkg/schemaconv/smd.go | 2 +- .../k8s.io/kube-openapi/pkg/spec3/encoding.go | 36 +- .../k8s.io/kube-openapi/pkg/spec3/example.go | 44 +- .../pkg/spec3/external_documentation.go | 36 +- .../k8s.io/kube-openapi/pkg/spec3/header.go | 44 +- .../kube-openapi/pkg/spec3/media_type.go | 36 +- .../kube-openapi/pkg/spec3/operation.go | 33 +- .../kube-openapi/pkg/spec3/parameter.go | 45 +- vendor/k8s.io/kube-openapi/pkg/spec3/path.go | 93 +- .../kube-openapi/pkg/spec3/request_body.go | 43 +- .../k8s.io/kube-openapi/pkg/spec3/response.go | 136 +- .../kube-openapi/pkg/spec3/security_scheme.go | 30 +- .../k8s.io/kube-openapi/pkg/spec3/server.go | 67 +- vendor/k8s.io/kube-openapi/pkg/spec3/spec.go | 17 +- .../pkg/validation/spec/header.go | 50 +- .../kube-openapi/pkg/validation/spec/info.go | 31 +- .../kube-openapi/pkg/validation/spec/items.go | 61 +- .../pkg/validation/spec/operation.go | 34 +- .../pkg/validation/spec/parameter.go | 59 +- .../pkg/validation/spec/path_item.go | 40 +- .../kube-openapi/pkg/validation/spec/paths.go | 59 +- .../pkg/validation/spec/response.go | 45 +- .../pkg/validation/spec/responses.go | 67 +- .../pkg/validation/spec/schema.go | 117 +- .../pkg/validation/spec/security_scheme.go | 22 +- .../pkg/validation/spec/swagger.go | 165 +- .../kube-openapi/pkg/validation/spec/tag.go | 32 +- vendor/modules.txt | 49 +- .../fn/runtime/runtimeutil/functiontypes.go | 8 +- .../kustomize/kyaml/kio/kioutil/kioutil.go | 17 +- .../kustomize/kyaml/openapi/README.md | 9 +- .../kustomize/kyaml/openapi/builtin_schema.go | 4 +- ...netes-openapi-union-v1.21.2.bundle-v1.json | 20331 ++++++++++++++++ ...es-openapi-union-v1.21.2.bundle-v1.json.gz | Bin 130598 -> 0 bytes .../kustomize/kyaml/openapi/openapi.go | 28 +- .../kustomize/kyaml/sliceutil/slice.go | 13 +- .../sigs.k8s.io/kustomize/kyaml/yaml/rnode.go | 3 +- .../kustomize/kyaml/yaml/schema/schema.go | 8 +- .../structured-merge-diff/v7}/LICENSE | 5 +- .../structured-merge-diff/v7/schema/doc.go | 28 + .../v7/schema/elements.go | 386 + .../structured-merge-diff/v7/schema/equals.go | 205 + .../v7/schema/schemaschema.go | 168 + 149 files changed, 21842 insertions(+), 20254 deletions(-) delete mode 100644 vendor/github.com/go-openapi/swag/.codecov.yml delete mode 100644 vendor/github.com/go-openapi/swag/.editorconfig delete mode 100644 vendor/github.com/go-openapi/swag/.gitattributes delete mode 100644 vendor/github.com/go-openapi/swag/.gitignore delete mode 100644 vendor/github.com/go-openapi/swag/.golangci.yml delete mode 100644 vendor/github.com/go-openapi/swag/.mockery.yml delete mode 100644 vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/go-openapi/swag/CONTRIBUTORS.md delete mode 100644 vendor/github.com/go-openapi/swag/README.md delete mode 100644 vendor/github.com/go-openapi/swag/SECURITY.md delete mode 100644 vendor/github.com/go-openapi/swag/cmdutils/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go delete mode 100644 vendor/github.com/go-openapi/swag/cmdutils/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/cmdutils_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/conv_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/fileutils/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/fileutils/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/fileutils/file.go delete mode 100644 vendor/github.com/go-openapi/swag/fileutils/path.go delete mode 100644 vendor/github.com/go-openapi/swag/fileutils_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/go.work delete mode 100644 vendor/github.com/go-openapi/swag/go.work.sum delete mode 100644 vendor/github.com/go-openapi/swag/jsonname_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/jsonutils_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/loading/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/loading/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/loading/errors.go delete mode 100644 vendor/github.com/go-openapi/swag/loading/json.go delete mode 100644 vendor/github.com/go-openapi/swag/loading/loading.go delete mode 100644 vendor/github.com/go-openapi/swag/loading/options.go delete mode 100644 vendor/github.com/go-openapi/swag/loading/yaml.go delete mode 100644 vendor/github.com/go-openapi/swag/loading_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/BENCHMARK.md delete mode 100644 vendor/github.com/go-openapi/swag/mangling/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/mangling/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/initialism_index.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/name_lexem.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/name_mangler.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/options.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/pools.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/split.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/string_bytes.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling/util.go delete mode 100644 vendor/github.com/go-openapi/swag/mangling_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/netutils/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/netutils/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/netutils/net.go delete mode 100644 vendor/github.com/go-openapi/swag/netutils_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/stringutils/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/stringutils/collection_formats.go delete mode 100644 vendor/github.com/go-openapi/swag/stringutils/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/stringutils/strings.go delete mode 100644 vendor/github.com/go-openapi/swag/stringutils_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/typeutils_iface.go delete mode 100644 vendor/github.com/go-openapi/swag/yamlutils/LICENSE delete mode 100644 vendor/github.com/go-openapi/swag/yamlutils/doc.go delete mode 100644 vendor/github.com/go-openapi/swag/yamlutils/errors.go delete mode 100644 vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go delete mode 100644 vendor/github.com/go-openapi/swag/yamlutils/yaml.go delete mode 100644 vendor/github.com/go-openapi/swag/yamlutils_iface.go create mode 100644 vendor/github.com/longhorn/go-common-libs/sys/mountid_linux.go create mode 100644 vendor/github.com/longhorn/go-common-libs/sys/mountid_other.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/flags.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/AUTHORS delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/CONTRIBUTORS delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/README.md delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_funcs.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/errors.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fields.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fold.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/intern.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/internal.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags/flags.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts/options.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/decode.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/encode.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/wire.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/decode.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/doc.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/encode.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/errors.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/export.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/options.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/pools.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/quote.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/state.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/token.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/value.go delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/migrate.sh delete mode 100644 vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/options.go create mode 100644 vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json delete mode 100644 vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json.gz rename vendor/{github.com/go-openapi/swag => sigs.k8s.io/structured-merge-diff/v7}/LICENSE (99%) create mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v7/schema/doc.go create mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v7/schema/elements.go create mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v7/schema/equals.go create mode 100644 vendor/sigs.k8s.io/structured-merge-diff/v7/schema/schemaschema.go diff --git a/go.mod b/go.mod index 6d129fe3c..57a01f3f2 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/longhorn/cli -go 1.26.0 +go 1.27.0 require ( - github.com/longhorn/go-common-libs v0.0.0-20260909075701-1a37e0e5083e + github.com/longhorn/go-common-libs v0.0.0-20261028232656-6805a1f65080 github.com/longhorn/longhorn-manager v1.13.0 github.com/otiai10/copy v1.14.1 github.com/pkg/errors v0.9.1 @@ -16,8 +16,8 @@ require ( k8s.io/cli-runtime v0.36.4 k8s.io/client-go v0.36.4 k8s.io/kubectl v0.36.4 - k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 - sigs.k8s.io/kustomize/kyaml v0.21.2 + k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab + sigs.k8s.io/kustomize/kyaml v0.21.3 ) require ( @@ -50,18 +50,10 @@ require ( github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/jsonpointer v1.0.0 // indirect github.com/go-openapi/jsonreference v1.0.0 // indirect - github.com/go-openapi/swag v0.27.1 // indirect - github.com/go-openapi/swag/cmdutils v0.27.1 // indirect github.com/go-openapi/swag/conv v0.27.1 // indirect - github.com/go-openapi/swag/fileutils v0.27.1 // indirect github.com/go-openapi/swag/jsonutils v0.27.1 // indirect - github.com/go-openapi/swag/loading v0.27.1 // indirect - github.com/go-openapi/swag/mangling v0.27.1 // indirect - github.com/go-openapi/swag/netutils v0.27.1 // indirect github.com/go-openapi/swag/pools v0.27.1 // indirect - github.com/go-openapi/swag/stringutils v0.27.1 // indirect github.com/go-openapi/swag/typeutils v0.27.1 // indirect - github.com/go-openapi/swag/yamlutils v0.27.1 // indirect github.com/godbus/dbus/v5 v5.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect @@ -123,13 +115,14 @@ require ( k8s.io/component-base v0.36.4 // indirect k8s.io/component-helpers v0.36.4 // indirect k8s.io/klog/v2 v2.140.0 // indirect - k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect + k8s.io/kube-openapi v0.0.0-20261001230523-97fa35140926 // indirect k8s.io/mount-utils v0.37.1 // indirect k8s.io/streaming v0.36.4 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/kustomize/api v0.21.1 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect + sigs.k8s.io/structured-merge-diff/v7 v7.0.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index 304a49d07..6c5c7637c 100644 --- a/go.sum +++ b/go.sum @@ -67,32 +67,17 @@ github.com/go-openapi/jsonpointer v1.0.0 h1:kR9tHqY0CtZaOPVFm622dPVNhrvYpwr4uCxg github.com/go-openapi/jsonpointer v1.0.0/go.mod h1:Z3rw7dWu1p9IgitXCFamSlA5lmDiklEB6vkaxcNZW5Y= github.com/go-openapi/jsonreference v1.0.0 h1:jlmTr6torcd1YgDQvSfNmRtKzYDO4FGBkrAdlAVWnpY= github.com/go-openapi/jsonreference v1.0.0/go.mod h1:jtwdyGbJk0Xhe5Y+rwtglQP6Sb1WZST4rT32LWB+sv0= -github.com/go-openapi/swag v0.27.1 h1:VotvOLWW8q/EAxB0YdsBBGC8XYyeL1YwBj2ungAGPNg= -github.com/go-openapi/swag v0.27.1/go.mod h1:GTkJPwHfhJp6MWr4/rCh64HVI3Ofu+tcsbfjfHmTxpE= -github.com/go-openapi/swag/cmdutils v0.27.1 h1:I7sYqaWVl5mq0NEmNQkAmFDyNin9ufvMX/p2zwtQaOE= -github.com/go-openapi/swag/cmdutils v0.27.1/go.mod h1:Sm1MVFMkF6guJJ+pQqHnQA3N0j9qALV3NxzDSv6bETM= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= github.com/go-openapi/swag/conv v0.27.1 h1:8wi9ZG+olmY1wXphl93EWniPtbSPkXM/feH7FgjsvrU= github.com/go-openapi/swag/conv v0.27.1/go.mod h1:QbqMivkpKhC3g1B1GGGOJ6ANewI3S62dbzYu3Duowqs= -github.com/go-openapi/swag/fileutils v0.27.1 h1:QQqBSoi5mW4XpU85nS0mLcA+zAE6vLzrb0QkmLKf9oM= -github.com/go-openapi/swag/fileutils v0.27.1/go.mod h1:VvJFZLTZS0AI854gEQz5tk7dBESdLjiNUMSZ/th2ry8= github.com/go-openapi/swag/jsonutils v0.27.1 h1:SVgK3i4USzCU5mibOOS/l4ea2h9UQXy7J7RNLTjuXjU= github.com/go-openapi/swag/jsonutils v0.27.1/go.mod h1:tdlEpZqdcQ17uj6J4YdK9vd8It5qWMwjWXOs0tjpRlk= github.com/go-openapi/swag/jsonutils/fixtures_test v0.27.1 h1:mJu3COL9WEaZVp/Kf2PRMi7tPszPEJfSr/OO75ynCs8= github.com/go-openapi/swag/jsonutils/fixtures_test v0.27.1/go.mod h1:mofwUWx70wvskwESqRJ//k/9kURmCgyJl5m5Ppoh5kY= -github.com/go-openapi/swag/loading v0.27.1 h1:/DxUgDXKbBX4bcn7r9uEXfJyzN5XpiJmZplzQTjrRCY= -github.com/go-openapi/swag/loading v0.27.1/go.mod h1:jvGh3iA2+zyUUycB5fgJWzeHnhrpvGnJJM0RVE9ZShE= -github.com/go-openapi/swag/mangling v0.27.1 h1:yC9D0HyUE8gbP+BfmGx9+AA89ikwZTMjESK3OnnoaqA= -github.com/go-openapi/swag/mangling v0.27.1/go.mod h1:jtBE2+V+3pILxOR7Vgce+Cwp6A2PgZbvVqfNntbVs0w= -github.com/go-openapi/swag/netutils v0.27.1 h1:mICMFoS82F5TZ4Zy3cqmcQk+BFeCp3Uyq3Np7GI0/qU= -github.com/go-openapi/swag/netutils v0.27.1/go.mod h1:J+WYyFMLtvtCGqa6jLv+YNUmIKI3ZRQRrvfNDMoQoEQ= github.com/go-openapi/swag/pools v0.27.1 h1:9LeadcMyb2GJCbXX5hVQDbZ2Lq9TL4dCs/nx1j5DO0E= github.com/go-openapi/swag/pools v0.27.1/go.mod h1:kVQefhSK5RWuRe7BXsL8htgBPAMpN7HDGpGEknqugeE= -github.com/go-openapi/swag/stringutils v0.27.1 h1:ZXePZ0r2p1qSjo8tD3Un4vFj8+FqlCkczxDrJIhYUp8= -github.com/go-openapi/swag/stringutils v0.27.1/go.mod h1:lzRN95CxXmA03XcDWHLOb6nOMcxCqR5rGY0lOgsfRoM= github.com/go-openapi/swag/typeutils v0.27.1 h1:KSTdFlfnse4r6dP9IrEnwMldjE+zs71UeEB3//PtVXc= github.com/go-openapi/swag/typeutils v0.27.1/go.mod h1:Srm0xFNRZ1Y+vCxJclo5qzx8aj+1pAKda/YfFPrG0dQ= -github.com/go-openapi/swag/yamlutils v0.27.1 h1:ftxv6xvXb1E3zohUc+okZ9nSqNb9StQX/FXnKZ98sQA= -github.com/go-openapi/swag/yamlutils v0.27.1/go.mod h1:bnxFIB1qewGRiZHypXGZ3fNgf13/0HfRgnS/iZBDrOo= github.com/go-openapi/testify/enable/yaml/v2 v2.6.0 h1:gGHwAJ0R/5jU8BEGDbfRNR3hL68dAVi84WuOApp29B0= github.com/go-openapi/testify/enable/yaml/v2 v2.6.0/go.mod h1:tY+St1SGq4NFl0QIqdTY4aEdbChAHxhyB77XQi9iJCo= github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug= @@ -137,8 +122,8 @@ github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffkt github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/longhorn/beszel v0.16.2-0.20260114090315-332709c32c7d h1:Fu1U1CyaxN42AItajvTu4iKdyjOJitKIu0NtQc1jye8= github.com/longhorn/beszel v0.16.2-0.20260114090315-332709c32c7d/go.mod h1:369q8Fv+iqznDYF3++boASEe1+fKS8Q4vdSb8isEI1c= -github.com/longhorn/go-common-libs v0.0.0-20260909075701-1a37e0e5083e h1:DmX6r4mdfEwzl45r3JzrHN7aVyhxpN3hdLX4lYm+f6A= -github.com/longhorn/go-common-libs v0.0.0-20260909075701-1a37e0e5083e/go.mod h1:pjOR2fdQA0dNp3is1xfA+Ni2PjPDP+JuOoSEjdL2cfQ= +github.com/longhorn/go-common-libs v0.0.0-20261028232656-6805a1f65080 h1:3/mTEBy+qRfk2cOq4FOUYzNJpBJl6GH8q63bkUP2PhU= +github.com/longhorn/go-common-libs v0.0.0-20261028232656-6805a1f65080/go.mod h1:p/tORH/wsecXDDjHy+JxCyBnu4n1utbByxh/o51SVz0= github.com/longhorn/go-spdk-helper v0.10.1-0.20260921021616-6102449746a0 h1:G5xruV32BYYo0ijxpjzLUH53IQGVnYmuVmO6tAWN0G0= github.com/longhorn/go-spdk-helper v0.10.1-0.20260921021616-6102449746a0/go.mod h1:+Rv4u2k9uiDJGBT4IqtOSQ2XSOHsKIgQUz4dFqXmiCQ= github.com/longhorn/longhorn-manager v1.13.0 h1:OEEWme4sKC5GnzztnQRJIcAlO4hViAfEtyQt7KEAh0o= @@ -316,25 +301,27 @@ k8s.io/component-helpers v0.36.4 h1:B5+SnptAlwTVJO0MW1JLsZVp4KevlADRg0CX5YFzjbU= k8s.io/component-helpers v0.36.4/go.mod h1:RECUDkRdVuxcNOAl9/EK7lmy1TIjoWkBHs6f0uOyoCs= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= -k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad h1:oXImqH8mQNk7PmvzKhmN3ddJoY6OnyM225MXwGHPm0A= -k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad/go.mod h1:0/mqHCVhlumdJ3BhCfnjSZQE037nAhNodh1/hK0T8/I= +k8s.io/kube-openapi v0.0.0-20261001230523-97fa35140926 h1:Fe0G8t8FaMDn2lpat0IHu3X9lHrVyGzDxhhCwKXKp28= +k8s.io/kube-openapi v0.0.0-20261001230523-97fa35140926/go.mod h1:3e2VxsK2svhjvkNik92kYU1a5kgau5tZeAuEWwoN4q0= k8s.io/kubectl v0.36.4 h1:xZd9g1bFBd7hpb1oKjK8lT9jRL18dtgr4DAPQG1Oksk= k8s.io/kubectl v0.36.4/go.mod h1:STWlr78cdEa1hHpr55wpcboaqchvfDueKRNDa1zOd1w= k8s.io/mount-utils v0.37.1 h1:GCEU40EaurFsZLfHToIXdgf8jBCLXnhi+/VkasxVgsQ= k8s.io/mount-utils v0.37.1/go.mod h1:uGJRC7u42QGYbHlHxt/5J2rXrfgv3XNYU3I0ZXVnAck= k8s.io/streaming v0.36.4 h1:RS5YlhrdBN2pKGVjgygGntdu6SNdsduyjGWGe3cX0vo= k8s.io/streaming v0.36.4/go.mod h1:tJ6S2bZa2HxIBauguBbCWSCYyd93Grfz1+z3tcOvlDE= -k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 h1:jVkFFVfXdXP74B/zbO3hM3hpSFD0xvhQ5U686DPurkE= -k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3/go.mod h1:M2s5JB1lIYP3jzZdorPLHXIPJzt9vv2muW5a6L9DtNM= +k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab h1:pjQrNLaF//ytZtWwCAHtW+pqwSKjtWDqzA8+TCX37RI= +k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab/go.mod h1:DdQ0BJxlQtuMlKDqdg7X5IMMQCXIk2b3d1/4M9OhUYo= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/kustomize/api v0.21.1 h1:lzqbzvz2CSvsjIUZUBNFKtIMsEw7hVLJp0JeSIVmuJs= sigs.k8s.io/kustomize/api v0.21.1/go.mod h1:f3wkKByTrgpgltLgySCntrYoq5d3q7aaxveSagwTlwI= -sigs.k8s.io/kustomize/kyaml v0.21.2 h1:1javwStFk7cgOeLU7yJtPmXcgMEhQgC2X0WjFT6U0p0= -sigs.k8s.io/kustomize/kyaml v0.21.2/go.mod h1:zX3qwtuouXd2K1fMiCV0VSFReX06a+CY1rhyf5Dy7hQ= +sigs.k8s.io/kustomize/kyaml v0.21.3 h1:4ygzLsc8B1ep9dFuEivrJ2lFIAglL19dhPrWp1ioceY= +sigs.k8s.io/kustomize/kyaml v0.21.3/go.mod h1:HrAVNlYyEphOlRCcaSIQziGR+0ehwx6Xp1ucUrpC6hs= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.4.2 h1:qdOxHwrl2Kaag1aQEarlYcOA9vSyGCp3CIki3aW8c4Q= sigs.k8s.io/structured-merge-diff/v6 v6.4.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v7 v7.0.0 h1:LnKTE1vO6tDITDMVOJ5oCsWauLIAPJnV9egetSfUCpI= +sigs.k8s.io/structured-merge-diff/v7 v7.0.0/go.mod h1:xKoMSgtnJnkfRR+CTNSQ1dBVhkKJR5OQl5RxX/OqHbI= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/vendor/github.com/go-openapi/swag/.codecov.yml b/vendor/github.com/go-openapi/swag/.codecov.yml deleted file mode 100644 index 3354f44b2..000000000 --- a/vendor/github.com/go-openapi/swag/.codecov.yml +++ /dev/null @@ -1,4 +0,0 @@ -ignore: - - jsonutils/fixtures_test - - jsonutils/adapters/ifaces/mocks - - jsonutils/adapters/testintegration/benchmarks diff --git a/vendor/github.com/go-openapi/swag/.editorconfig b/vendor/github.com/go-openapi/swag/.editorconfig deleted file mode 100644 index 3152da69a..000000000 --- a/vendor/github.com/go-openapi/swag/.editorconfig +++ /dev/null @@ -1,26 +0,0 @@ -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true - -# Set default charset -[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] -charset = utf-8 - -# Tab indentation (no size specified) -[*.go] -indent_style = tab - -[*.md] -trim_trailing_whitespace = false - -# Matches the exact files either package.json or .travis.yml -[{package.json,.travis.yml}] -indent_style = space -indent_size = 2 diff --git a/vendor/github.com/go-openapi/swag/.gitattributes b/vendor/github.com/go-openapi/swag/.gitattributes deleted file mode 100644 index 49ad52766..000000000 --- a/vendor/github.com/go-openapi/swag/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# gofmt always uses LF, whereas Git uses CRLF on Windows. -*.go text eol=lf diff --git a/vendor/github.com/go-openapi/swag/.gitignore b/vendor/github.com/go-openapi/swag/.gitignore deleted file mode 100644 index 3ceb596fa..000000000 --- a/vendor/github.com/go-openapi/swag/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -secrets.yml -vendor -Godeps -.idea -*.out -.mcp.json -.worktrees diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml deleted file mode 100644 index 099c0a78c..000000000 --- a/vendor/github.com/go-openapi/swag/.golangci.yml +++ /dev/null @@ -1,81 +0,0 @@ -version: "2" -linters: - default: all - disable: - - cyclop - - depguard - - errchkjson - - errorlint - - exhaustruct - - forcetypeassert - - funlen - - gochecknoglobals - - gochecknoinits - - gocognit - - godot - - godox - - goconst - - gomoddirectives - - gomodguard - - gomodguard_v2 - - gosmopolitan - - inamedparam - - intrange - - ireturn - - lll - - musttag - - modernize - - nestif - - nlreturn - - nonamedreturns - - noinlineerr - - paralleltest - - recvcheck - - testpackage - - thelper - - tagliatelle - - tparallel - - unparam - - varnamelen - - whitespace - - wrapcheck - - wsl - - wsl_v5 - settings: - dupl: - threshold: 200 - goconst: - min-len: 2 - min-occurrences: 3 - gocyclo: - min-complexity: 45 - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ -formatters: - enable: - - gofmt - - goimports - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ -issues: - # Maximum issues count per one linter. - # Set to 0 to disable. - # Default: 50 - max-issues-per-linter: 0 - # Maximum count of issues with the same text. - # Set to 0 to disable. - # Default: 3 - max-same-issues: 0 diff --git a/vendor/github.com/go-openapi/swag/.mockery.yml b/vendor/github.com/go-openapi/swag/.mockery.yml deleted file mode 100644 index 8557cb58d..000000000 --- a/vendor/github.com/go-openapi/swag/.mockery.yml +++ /dev/null @@ -1,30 +0,0 @@ -all: false -dir: '{{.InterfaceDir}}' -filename: mocks_test.go -force-file-write: true -formatter: goimports -include-auto-generated: false -log-level: info -structname: '{{.Mock}}{{.InterfaceName}}' -pkgname: '{{.SrcPackageName}}' -recursive: false -require-template-schema-exists: true -template: matryer -template-schema: '{{.Template}}.schema.json' -packages: - github.com/go-openapi/swag/jsonutils/adapters/ifaces: - config: - dir: jsonutils/adapters/ifaces/mocks - filename: mocks.go - pkgname: 'mocks' - force-file-write: true - all: true - github.com/go-openapi/swag/jsonutils/adapters/testintegration: - config: - inpackage: true - dir: jsonutils/adapters/testintegration - force-file-write: true - all: true - interfaces: - EJMarshaler: - EJUnmarshaler: diff --git a/vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md deleted file mode 100644 index bac878f21..000000000 --- a/vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - -advances - -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md b/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md deleted file mode 100644 index 0f0711cd5..000000000 --- a/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md +++ /dev/null @@ -1,36 +0,0 @@ -# Contributors - -- Repository: ['go-openapi/swag'] - -| Total Contributors | Total Contributions | -| --- | --- | -| 24 | 251 | - -| Username | All Time Contribution Count | All Commits | -| --- | --- | --- | -| @fredbi | 121 | | -| @casualjim | 98 | | -| @alexandear | 4 | | -| @orisano | 3 | | -| @reinerRubin | 2 | | -| @n-inja | 2 | | -| @nitinmohan87 | 2 | | -| @Neo2308 | 2 | | -| @michaelbowler-form3 | 2 | | -| @ujjwalsh | 1 | | -| @griffin-stewie | 1 | | -| @POD666 | 1 | | -| @pytlesk4 | 1 | | -| @shirou | 1 | | -| @seanprince | 1 | | -| @petrkotas | 1 | | -| @mszczygiel | 1 | | -| @sosiska | 1 | | -| @kzys | 1 | | -| @faguirre1 | 1 | | -| @posener | 1 | | -| @diego-fu-hs | 1 | | -| @davidalpert | 1 | | -| @Xe | 1 | | - - _this file was generated by the [Contributors GitHub Action](https://github.com/github-community-projects/contributors)_ diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md deleted file mode 100644 index c6c2d21e9..000000000 --- a/vendor/github.com/go-openapi/swag/README.md +++ /dev/null @@ -1,223 +0,0 @@ -# Swag - - -[![Tests][test-badge]][test-url] [![Coverage][cov-badge]][cov-url] [![CI vuln scan][vuln-scan-badge]][vuln-scan-url] [![CodeQL][codeql-badge]][codeql-url] - - - -[![Release][release-badge]][release-url] [![Go Report Card][gocard-badge]][gocard-url] [![CodeFactor Grade][codefactor-badge]][codefactor-url] [![License][license-badge]][license-url] - - -[![GoDoc][godoc-badge]][godoc-url] [![Discord Channel][discord-badge]][discord-url] [![go version][goversion-badge]][goversion-url] ![Top language][top-badge] ![Commits since latest release][commits-badge] - ---- - -A bunch of helper functions for go-openapi and go-swagger projects. - -You may also use it standalone for your projects. - -> **NOTE** -> `swag` is one of the foundational building blocks of the go-openapi initiative. -> -> Most repositories in `github.com/go-openapi/...` depend on it in some way. -> And so does our CLI tool `github.com/go-swagger/go-swagger`, -> as well as the code generated by this tool. - -* [Contents](#contents) -* [Dependencies](#dependencies) -* [Change log](#change-log) -* [Licensing](#licensing) -* [Note to contributors](#note-to-contributors) -* [Roadmap](#roadmap) - -## Announcements - -* **2025-12-19** : new community chat on discord - * a new discord community channel is available to be notified of changes and support users - -You may join the discord community by clicking the invite link on the discord badge (also above). [![Discord Channel][discord-badge]][discord-url] - -## Status - -API is stable. - -## Import this library in your project - -```cmd -go get github.com/go-openapi/swag/{module} -``` - -Or for backward compatibility: - -```cmd -go get github.com/go-openapi/swag -``` - -## Contents - -`go-openapi/swag` exposes a collection of relatively independent modules. - -Moving forward, no additional feature will be added to the `swag` API directly at the root package level, -which remains there for backward-compatibility purposes. All exported top-level features are now deprecated. - -Child modules will continue to evolve and some new ones may be added in the future. - -| Module | Content | Main features | -|---------------|---------|---------------| -| `cmdutils` | utilities to work with CLIs || -| `conv` | type conversion utilities | convert between values and pointers for any types
convert from string to builtin types (wraps `strconv`)
require `./typeutils` (test dependency)
| -| `fileutils` | file utilities | | -| `jsonname` | JSON utilities (deprecated) | infer JSON names from `go` properties
use `github.com/go-openapi/jsonpointer/jsonname` instead | -| `jsonutils` | JSON utilities | fast json concatenation
read and write JSON from and to dynamic `go` data structures
~require `github.com/mailru/easyjson`~
| -| `loading` | file loading | load from file or http
require `./yamlutils`
| -| `mangling` | safe name generation | name mangling for `go`
| -| `netutils` | networking utilities | host, port from address
| -| `pools` | utilities to work with sync.Pools | | -| `stringutils` | `string` utilities | search in slice (with case-insensitive)
split/join query parameters as arrays
| -| `typeutils` | `go` types utilities | check the zero value for any type
safe check for a nil value
| -| `yamlutils` | YAML utilities | converting YAML to JSON
loading YAML into a dynamic YAML document
maintaining the original order of keys in YAML objects
require `./jsonutils`
~require `github.com/mailru/easyjson`~
require `go.yaml.in/yaml/v3`
| - ---- - -## Dependencies - -The root module `github.com/go-openapi/swag` at the repo level maintains a few -dependencies outside of the standard library. - -* YAML utilities depend on `go.yaml.in/yaml/v3` -* JSON utilities depend on their registered adapter module: - * by default, only the standard library is used - * `github.com/mailru/easyjson` is now only a dependency for module - `github.com/go-openapi/swag/jsonutils/adapters/easyjson/json`, - for users willing to import that module. - * integration tests and benchmarks use all the dependencies are published as their own module -* other dependencies are test dependencies drawn from `github.com/stretchr/testify` - -## Usage - -**How to explicitly register a dependency at runtime**? - -The following would maintain how JSON utilities proposed by `swag` used work, up to `v0.24.1`. - - ```go - import ( - "github.com/go-openapi/swag/jsonutils/adapters" - easyjson "github.com/go-openapi/swag/jsonutils/adapters/easyjson/json" - ) - - func init() { - easyjson.Register(adapters.Registry) - } - ``` - -Subsequent calls to `jsonutils.ReadJSON()` or `jsonutils.WriteJSON()` will switch to `easyjson` -whenever the passed data structures implement the `easyjson.Unmarshaler` or `easyjson.Marshaler` respectively, -or fallback to the standard library. - -For more details, you may also look at our -[integration tests](jsonutils/adapters/testintegration/integration_suite_test.go#29). - ---- - -## Note to contributors - -All kinds of contributions are welcome. - -This repo is a go mono-repo. See [docs](docs/MAINTAINERS.md). - -More general guidelines are available [here](.github/CONTRIBUTING.md). - -## Roadmap - -See the current [TODO list](docs/TODOS.md) - -## Change log - -See - -For pre-v0.26.0 releases, see [release notes](./docs/NOTES.md). - -**What coming next?** - -Moving forward, we want to : - -* provide an implementation of the JSON adapter based on `encoding/json/v2`, for `go1.25` builds. -* provide similar implementations for `goccy/go-json` and `jsoniterator/go`, and perhaps some other - similar libraries may be interesting too. - - - -## Licensing - -This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). - - - - - -## Other documentation - -* [All-time contributors](./CONTRIBUTORS.md) -* [Contributing guidelines][contributing-doc-site] -* [Maintainers documentation][maintainers-doc-site] -* [Code style][style-doc-site] - -## Cutting a new release - -Maintainers can cut a new release by either: - -* running [this workflow](https://github.com/go-openapi/swag/actions/workflows/bump-release.yml) -* or pushing a semver tag - * signed tags are preferred - * The tag message is prepended to release notes - - -[test-badge]: https://github.com/go-openapi/swag/actions/workflows/go-test.yml/badge.svg -[test-url]: https://github.com/go-openapi/swag/actions/workflows/go-test.yml -[cov-badge]: https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg -[cov-url]: https://codecov.io/gh/go-openapi/swag -[vuln-scan-badge]: https://github.com/go-openapi/swag/actions/workflows/scanner.yml/badge.svg -[vuln-scan-url]: https://github.com/go-openapi/swag/actions/workflows/scanner.yml -[codeql-badge]: https://github.com/go-openapi/swag/actions/workflows/codeql.yml/badge.svg -[codeql-url]: https://github.com/go-openapi/swag/actions/workflows/codeql.yml - -[release-badge]: https://badge.fury.io/gh/go-openapi%2Fswag.svg -[release-url]: https://badge.fury.io/gh/go-openapi%2Fswag -[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fswag.svg -[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fswag - -[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/swag -[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/swag -[codefactor-badge]: https://img.shields.io/codefactor/grade/github/go-openapi/swag -[codefactor-url]: https://www.codefactor.io/repository/github/go-openapi/swag - -[doc-badge]: https://img.shields.io/badge/doc-site-blue?link=https%3A%2F%2Fgoswagger.io%2Fgo-openapi%2F -[doc-url]: https://goswagger.io/go-openapi -[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/swag -[godoc-url]: http://pkg.go.dev/github.com/go-openapi/swag -[discord-badge]: https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue -[discord-url]: https://discord.gg/FfnFYaC3k5 - - -[license-badge]: http://img.shields.io/badge/license-Apache%20v2-orange.svg -[license-url]: https://github.com/go-openapi/swag/?tab=Apache-2.0-1-ov-file#readme - -[goversion-badge]: https://img.shields.io/github/go-mod/go-version/go-openapi/swag -[goversion-url]: https://github.com/go-openapi/swag/blob/master/go.mod -[top-badge]: https://img.shields.io/github/languages/top/go-openapi/swag -[commits-badge]: https://img.shields.io/github/commits-since/go-openapi/swag/latest - -[contributing-doc-site]: https://go-openapi.github.io/doc-site/contributing/contributing/index.html -[maintainers-doc-site]: https://go-openapi.github.io/doc-site/maintainers/index.html -[style-doc-site]: https://go-openapi.github.io/doc-site/contributing/style/index.html diff --git a/vendor/github.com/go-openapi/swag/SECURITY.md b/vendor/github.com/go-openapi/swag/SECURITY.md deleted file mode 100644 index 1fea2c573..000000000 --- a/vendor/github.com/go-openapi/swag/SECURITY.md +++ /dev/null @@ -1,37 +0,0 @@ -# Security Policy - -This policy outlines the commitment and practices of the go-openapi maintainers regarding security. - -## Supported Versions - -| Version | Supported | -| ------- | ------------------ | -| O.x | :white_check_mark: | - -## Vulnerability checks in place - -This repository uses automated vulnerability scans, at every merged commit and at least once a week. - -We use: - -* [`GitHub CodeQL`][codeql-url] -* [`trivy`][trivy-url] -* [`govulncheck`][govulncheck-url] - -Reports are centralized in github security reports and visible only to the maintainers. - -## Reporting a vulnerability - -If you become aware of a security vulnerability that affects the current repository, -**please report it privately to the maintainers** -rather than opening a publicly visible GitHub issue. - -Please follow the instructions provided by github to [Privately report a security vulnerability][github-guidance-url]. - -> [!NOTE] -> On Github, navigate to the project's "Security" tab then click on "Report a vulnerability". - -[codeql-url]: https://github.com/github/codeql -[trivy-url]: https://trivy.dev/docs/latest/getting-started -[govulncheck-url]: https://go.dev/blog/govulncheck -[github-guidance-url]: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability diff --git a/vendor/github.com/go-openapi/swag/cmdutils/LICENSE b/vendor/github.com/go-openapi/swag/cmdutils/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/cmdutils/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/cmdutils/cmd_utils.go b/vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go deleted file mode 100644 index 6c7bbb26f..000000000 --- a/vendor/github.com/go-openapi/swag/cmdutils/cmd_utils.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package cmdutils - -// CommandLineOptionsGroup represents a group of user-defined command line options. -// -// This is for instance used to configure command line arguments in API servers generated by go-swagger. -type CommandLineOptionsGroup struct { - ShortDescription string - LongDescription string - Options any -} diff --git a/vendor/github.com/go-openapi/swag/cmdutils/doc.go b/vendor/github.com/go-openapi/swag/cmdutils/doc.go deleted file mode 100644 index 31f2c3753..000000000 --- a/vendor/github.com/go-openapi/swag/cmdutils/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package cmdutils brings helpers for CLIs produced by go-openapi -package cmdutils diff --git a/vendor/github.com/go-openapi/swag/cmdutils_iface.go b/vendor/github.com/go-openapi/swag/cmdutils_iface.go deleted file mode 100644 index bd0c1fc12..000000000 --- a/vendor/github.com/go-openapi/swag/cmdutils_iface.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import "github.com/go-openapi/swag/cmdutils" - -// CommandLineOptionsGroup represents a group of user-defined command line options. -// -// Deprecated: use [cmdutils.CommandLineOptionsGroup] instead. -type CommandLineOptionsGroup = cmdutils.CommandLineOptionsGroup diff --git a/vendor/github.com/go-openapi/swag/conv_iface.go b/vendor/github.com/go-openapi/swag/conv_iface.go deleted file mode 100644 index eea7b2e56..000000000 --- a/vendor/github.com/go-openapi/swag/conv_iface.go +++ /dev/null @@ -1,486 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import ( - "time" - - "github.com/go-openapi/swag/conv" -) - -// IsFloat64AJSONInteger allows for integers [-2^53, 2^53-1] inclusive. -// -// Deprecated: use [conv.IsFloat64AJSONInteger] instead. -func IsFloat64AJSONInteger(f float64) bool { return conv.IsFloat64AJSONInteger(f) } - -// ConvertBool turns a string into a boolean. -// -// Deprecated: use [conv.ConvertBool] instead. -func ConvertBool(str string) (bool, error) { return conv.ConvertBool(str) } - -// ConvertFloat32 turns a string into a float32. -// -// Deprecated: use [conv.ConvertFloat32] instead. Alternatively, you may use the generic version [conv.ConvertFloat]. -func ConvertFloat32(str string) (float32, error) { return conv.ConvertFloat[float32](str) } - -// ConvertFloat64 turns a string into a float64. -// -// Deprecated: use [conv.ConvertFloat64] instead. Alternatively, you may use the generic version [conv.ConvertFloat]. -func ConvertFloat64(str string) (float64, error) { return conv.ConvertFloat[float64](str) } - -// ConvertInt8 turns a string into an int8. -// -// Deprecated: use [conv.ConvertInt8] instead. Alternatively, you may use the generic version [conv.ConvertInteger]. -func ConvertInt8(str string) (int8, error) { return conv.ConvertInteger[int8](str) } - -// ConvertInt16 turns a string into an int16. -// -// Deprecated: use [conv.ConvertInt16] instead. Alternatively, you may use the generic version [conv.ConvertInteger]. -func ConvertInt16(str string) (int16, error) { return conv.ConvertInteger[int16](str) } - -// ConvertInt32 turns a string into an int32. -// -// Deprecated: use [conv.ConvertInt32] instead. Alternatively, you may use the generic version [conv.ConvertInteger]. -func ConvertInt32(str string) (int32, error) { return conv.ConvertInteger[int32](str) } - -// ConvertInt64 turns a string into an int64. -// -// Deprecated: use [conv.ConvertInt64] instead. Alternatively, you may use the generic version [conv.ConvertInteger]. -func ConvertInt64(str string) (int64, error) { return conv.ConvertInteger[int64](str) } - -// ConvertUint8 turns a string into an uint8. -// -// Deprecated: use [conv.ConvertUint8] instead. Alternatively, you may use the generic version [conv.ConvertUinteger]. -func ConvertUint8(str string) (uint8, error) { return conv.ConvertUinteger[uint8](str) } - -// ConvertUint16 turns a string into an uint16. -// -// Deprecated: use [conv.ConvertUint16] instead. Alternatively, you may use the generic version [conv.ConvertUinteger]. -func ConvertUint16(str string) (uint16, error) { return conv.ConvertUinteger[uint16](str) } - -// ConvertUint32 turns a string into an uint32. -// -// Deprecated: use [conv.ConvertUint32] instead. Alternatively, you may use the generic version [conv.ConvertUinteger]. -func ConvertUint32(str string) (uint32, error) { return conv.ConvertUinteger[uint32](str) } - -// ConvertUint64 turns a string into an uint64. -// -// Deprecated: use [conv.ConvertUint64] instead. Alternatively, you may use the generic version [conv.ConvertUinteger]. -func ConvertUint64(str string) (uint64, error) { return conv.ConvertUinteger[uint64](str) } - -// FormatBool turns a boolean into a string. -// -// Deprecated: use [conv.FormatBool] instead. -func FormatBool(value bool) string { return conv.FormatBool(value) } - -// FormatFloat32 turns a float32 into a string. -// -// Deprecated: use [conv.FormatFloat] instead. -func FormatFloat32(value float32) string { return conv.FormatFloat(value) } - -// FormatFloat64 turns a float64 into a string. -// -// Deprecated: use [conv.FormatFloat] instead. -func FormatFloat64(value float64) string { return conv.FormatFloat(value) } - -// FormatInt8 turns an int8 into a string. -// -// Deprecated: use [conv.FormatInteger] instead. -func FormatInt8(value int8) string { return conv.FormatInteger(value) } - -// FormatInt16 turns an int16 into a string. -// -// Deprecated: use [conv.FormatInteger] instead. -func FormatInt16(value int16) string { return conv.FormatInteger(value) } - -// FormatInt32 turns an int32 into a string -// -// Deprecated: use [conv.FormatInteger] instead. -func FormatInt32(value int32) string { return conv.FormatInteger(value) } - -// FormatInt64 turns an int64 into a string. -// -// Deprecated: use [conv.FormatInteger] instead. -func FormatInt64(value int64) string { return conv.FormatInteger(value) } - -// FormatUint8 turns an uint8 into a string. -// -// Deprecated: use [conv.FormatUinteger] instead. -func FormatUint8(value uint8) string { return conv.FormatUinteger(value) } - -// FormatUint16 turns an uint16 into a string. -// -// Deprecated: use [conv.FormatUinteger] instead. -func FormatUint16(value uint16) string { return conv.FormatUinteger(value) } - -// FormatUint32 turns an uint32 into a string. -// -// Deprecated: use [conv.FormatUinteger] instead. -func FormatUint32(value uint32) string { return conv.FormatUinteger(value) } - -// FormatUint64 turns an uint64 into a string. -// -// Deprecated: use [conv.FormatUinteger] instead. -func FormatUint64(value uint64) string { return conv.FormatUinteger(value) } - -// String turn a pointer to of the string value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func String(v string) *string { return conv.Pointer(v) } - -// StringValue turn the value of the string pointer passed in or -// "" if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func StringValue(v *string) string { return conv.Value(v) } - -// StringSlice converts a slice of string values into a slice of string pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func StringSlice(src []string) []*string { return conv.PointerSlice(src) } - -// StringValueSlice converts a slice of string pointers into a slice of string values. -// -// Deprecated: use [conv.ValueSlice] instead. -func StringValueSlice(src []*string) []string { return conv.ValueSlice(src) } - -// StringMap converts a string map of string values into a string map of string pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func StringMap(src map[string]string) map[string]*string { return conv.PointerMap(src) } - -// StringValueMap converts a string map of string pointers into a string map of string values. -// -// Deprecated: use [conv.ValueMap] instead. -func StringValueMap(src map[string]*string) map[string]string { return conv.ValueMap(src) } - -// Bool turn a pointer to of the bool value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Bool(v bool) *bool { return conv.Pointer(v) } - -// BoolValue turn the value of the bool pointer passed in or false if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func BoolValue(v *bool) bool { return conv.Value(v) } - -// BoolSlice converts a slice of bool values into a slice of bool pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func BoolSlice(src []bool) []*bool { return conv.PointerSlice(src) } - -// BoolValueSlice converts a slice of bool pointers into a slice of bool values. -// -// Deprecated: use [conv.ValueSlice] instead. -func BoolValueSlice(src []*bool) []bool { return conv.ValueSlice(src) } - -// BoolMap converts a string map of bool values into a string map of bool pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func BoolMap(src map[string]bool) map[string]*bool { return conv.PointerMap(src) } - -// BoolValueMap converts a string map of bool pointers into a string map of bool values. -// -// Deprecated: use [conv.ValueMap] instead. -func BoolValueMap(src map[string]*bool) map[string]bool { return conv.ValueMap(src) } - -// Int turn a pointer to of the int value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Int(v int) *int { return conv.Pointer(v) } - -// IntValue turn the value of the int pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func IntValue(v *int) int { return conv.Value(v) } - -// IntSlice converts a slice of int values into a slice of int pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func IntSlice(src []int) []*int { return conv.PointerSlice(src) } - -// IntValueSlice converts a slice of int pointers into a slice of int values. -// -// Deprecated: use [conv.ValueSlice] instead. -func IntValueSlice(src []*int) []int { return conv.ValueSlice(src) } - -// IntMap converts a string map of int values into a string map of int pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func IntMap(src map[string]int) map[string]*int { return conv.PointerMap(src) } - -// IntValueMap converts a string map of int pointers into a string map of int values. -// -// Deprecated: use [conv.ValueMap] instead. -func IntValueMap(src map[string]*int) map[string]int { return conv.ValueMap(src) } - -// Int32 turn a pointer to of the int32 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Int32(v int32) *int32 { return conv.Pointer(v) } - -// Int32Value turn the value of the int32 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Int32Value(v *int32) int32 { return conv.Value(v) } - -// Int32Slice converts a slice of int32 values into a slice of int32 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Int32Slice(src []int32) []*int32 { return conv.PointerSlice(src) } - -// Int32ValueSlice converts a slice of int32 pointers into a slice of int32 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Int32ValueSlice(src []*int32) []int32 { return conv.ValueSlice(src) } - -// Int32Map converts a string map of int32 values into a string map of int32 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Int32Map(src map[string]int32) map[string]*int32 { return conv.PointerMap(src) } - -// Int32ValueMap converts a string map of int32 pointers into a string map of int32 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Int32ValueMap(src map[string]*int32) map[string]int32 { return conv.ValueMap(src) } - -// Int64 turn a pointer to of the int64 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Int64(v int64) *int64 { return conv.Pointer(v) } - -// Int64Value turn the value of the int64 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Int64Value(v *int64) int64 { return conv.Value(v) } - -// Int64Slice converts a slice of int64 values into a slice of int64 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Int64Slice(src []int64) []*int64 { return conv.PointerSlice(src) } - -// Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Int64ValueSlice(src []*int64) []int64 { return conv.ValueSlice(src) } - -// Int64Map converts a string map of int64 values into a string map of int64 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Int64Map(src map[string]int64) map[string]*int64 { return conv.PointerMap(src) } - -// Int64ValueMap converts a string map of int64 pointers into a string map of int64 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Int64ValueMap(src map[string]*int64) map[string]int64 { return conv.ValueMap(src) } - -// Uint16 turn a pointer to of the uint16 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Uint16(v uint16) *uint16 { return conv.Pointer(v) } - -// Uint16Value turn the value of the uint16 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Uint16Value(v *uint16) uint16 { return conv.Value(v) } - -// Uint16Slice converts a slice of uint16 values into a slice of uint16 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Uint16Slice(src []uint16) []*uint16 { return conv.PointerSlice(src) } - -// Uint16ValueSlice converts a slice of uint16 pointers into a slice of uint16 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Uint16ValueSlice(src []*uint16) []uint16 { return conv.ValueSlice(src) } - -// Uint16Map converts a string map of uint16 values into a string map of uint16 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Uint16Map(src map[string]uint16) map[string]*uint16 { return conv.PointerMap(src) } - -// Uint16ValueMap converts a string map of uint16 pointers into a string map of uint16 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Uint16ValueMap(src map[string]*uint16) map[string]uint16 { return conv.ValueMap(src) } - -// Uint turn a pointer to of the uint value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Uint(v uint) *uint { return conv.Pointer(v) } - -// UintValue turn the value of the uint pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func UintValue(v *uint) uint { return conv.Value(v) } - -// UintSlice converts a slice of uint values into a slice of uint pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func UintSlice(src []uint) []*uint { return conv.PointerSlice(src) } - -// UintValueSlice converts a slice of uint pointers into a slice of uint values. -// -// Deprecated: use [conv.ValueSlice] instead. -func UintValueSlice(src []*uint) []uint { return conv.ValueSlice(src) } - -// UintMap converts a string map of uint values into a string map of uint pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func UintMap(src map[string]uint) map[string]*uint { return conv.PointerMap(src) } - -// UintValueMap converts a string map of uint pointers into a string map of uint values. -// -// Deprecated: use [conv.ValueMap] instead. -func UintValueMap(src map[string]*uint) map[string]uint { return conv.ValueMap(src) } - -// Uint32 turn a pointer to of the uint32 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Uint32(v uint32) *uint32 { return conv.Pointer(v) } - -// Uint32Value turn the value of the uint32 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Uint32Value(v *uint32) uint32 { return conv.Value(v) } - -// Uint32Slice converts a slice of uint32 values into a slice of uint32 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Uint32Slice(src []uint32) []*uint32 { return conv.PointerSlice(src) } - -// Uint32ValueSlice converts a slice of uint32 pointers into a slice of uint32 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Uint32ValueSlice(src []*uint32) []uint32 { return conv.ValueSlice(src) } - -// Uint32Map converts a string map of uint32 values into a string map of uint32 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Uint32Map(src map[string]uint32) map[string]*uint32 { return conv.PointerMap(src) } - -// Uint32ValueMap converts a string map of uint32 pointers into a string map of uint32 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Uint32ValueMap(src map[string]*uint32) map[string]uint32 { return conv.ValueMap(src) } - -// Uint64 turn a pointer to of the uint64 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Uint64(v uint64) *uint64 { return conv.Pointer(v) } - -// Uint64Value turn the value of the uint64 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Uint64Value(v *uint64) uint64 { return conv.Value(v) } - -// Uint64Slice converts a slice of uint64 values into a slice of uint64 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Uint64Slice(src []uint64) []*uint64 { return conv.PointerSlice(src) } - -// Uint64ValueSlice converts a slice of uint64 pointers into a slice of uint64 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Uint64ValueSlice(src []*uint64) []uint64 { return conv.ValueSlice(src) } - -// Uint64Map converts a string map of uint64 values into a string map of uint64 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Uint64Map(src map[string]uint64) map[string]*uint64 { return conv.PointerMap(src) } - -// Uint64ValueMap converts a string map of uint64 pointers into a string map of uint64 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Uint64ValueMap(src map[string]*uint64) map[string]uint64 { return conv.ValueMap(src) } - -// Float32 turn a pointer to of the float32 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Float32(v float32) *float32 { return conv.Pointer(v) } - -// Float32Value turn the value of the float32 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Float32Value(v *float32) float32 { return conv.Value(v) } - -// Float32Slice converts a slice of float32 values into a slice of float32 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Float32Slice(src []float32) []*float32 { return conv.PointerSlice(src) } - -// Float32ValueSlice converts a slice of float32 pointers into a slice of float32 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Float32ValueSlice(src []*float32) []float32 { return conv.ValueSlice(src) } - -// Float32Map converts a string map of float32 values into a string map of float32 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Float32Map(src map[string]float32) map[string]*float32 { return conv.PointerMap(src) } - -// Float32ValueMap converts a string map of float32 pointers into a string map of float32 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Float32ValueMap(src map[string]*float32) map[string]float32 { return conv.ValueMap(src) } - -// Float64 turn a pointer to of the float64 value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Float64(v float64) *float64 { return conv.Pointer(v) } - -// Float64Value turn the value of the float64 pointer passed in or 0 if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func Float64Value(v *float64) float64 { return conv.Value(v) } - -// Float64Slice converts a slice of float64 values into a slice of float64 pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func Float64Slice(src []float64) []*float64 { return conv.PointerSlice(src) } - -// Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values. -// -// Deprecated: use [conv.ValueSlice] instead. -func Float64ValueSlice(src []*float64) []float64 { return conv.ValueSlice(src) } - -// Float64Map converts a string map of float64 values into a string map of float64 pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func Float64Map(src map[string]float64) map[string]*float64 { return conv.PointerMap(src) } - -// Float64ValueMap converts a string map of float64 pointers into a string map of float64 values. -// -// Deprecated: use [conv.ValueMap] instead. -func Float64ValueMap(src map[string]*float64) map[string]float64 { return conv.ValueMap(src) } - -// Time turn a pointer to of the time.Time value passed in. -// -// Deprecated: use [conv.Pointer] instead. -func Time(v time.Time) *time.Time { return conv.Pointer(v) } - -// TimeValue turn the value of the time.Time pointer passed in or time.Time{} if the pointer is nil. -// -// Deprecated: use [conv.Value] instead. -func TimeValue(v *time.Time) time.Time { return conv.Value(v) } - -// TimeSlice converts a slice of time.Time values into a slice of time.Time pointers. -// -// Deprecated: use [conv.PointerSlice] instead. -func TimeSlice(src []time.Time) []*time.Time { return conv.PointerSlice(src) } - -// TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values -// -// Deprecated: use [conv.ValueSlice] instead. -func TimeValueSlice(src []*time.Time) []time.Time { return conv.ValueSlice(src) } - -// TimeMap converts a string map of time.Time values into a string map of time.Time pointers. -// -// Deprecated: use [conv.PointerMap] instead. -func TimeMap(src map[string]time.Time) map[string]*time.Time { return conv.PointerMap(src) } - -// TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values. -// -// Deprecated: use [conv.ValueMap] instead. -func TimeValueMap(src map[string]*time.Time) map[string]time.Time { return conv.ValueMap(src) } diff --git a/vendor/github.com/go-openapi/swag/doc.go b/vendor/github.com/go-openapi/swag/doc.go deleted file mode 100644 index b54b57478..000000000 --- a/vendor/github.com/go-openapi/swag/doc.go +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package swag contains a bunch of helper functions for go-openapi and go-swagger projects. -// -// You may also use it standalone for your projects. -// -// NOTE: all features that used to be exposed as package-level members (constants, variables, -// functions and types) are now deprecated and are superseded by equivalent features in -// more specialized sub-packages. -// Moving forward, no additional feature will be added to the [swag] API directly at the root package level, -// which remains there for backward-compatibility purposes. -// -// Child modules will continue to evolve or some new ones may be added in the future. -// -// # Modules -// -// - [cmdutils] utilities to work with CLIs -// -// - [conv] type conversion utilities -// -// - [fileutils] file utilities -// -// - [jsonname] JSON utilities -// -// - [jsonutils] JSON utilities -// -// - [loading] file loading -// -// - [mangling] safe name generation -// -// - [netutils] networking utilities -// -// - [stringutils] `string` utilities -// -// - [typeutils] `go` types utilities -// -// - [yamlutils] YAML utilities -// -// # Dependencies -// -// This repo has a few dependencies outside of the standard library: -// -// - YAML utilities depend on [go.yaml.in/yaml/v3] -package swag - -//go:generate mockery diff --git a/vendor/github.com/go-openapi/swag/fileutils/LICENSE b/vendor/github.com/go-openapi/swag/fileutils/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/fileutils/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/fileutils/doc.go b/vendor/github.com/go-openapi/swag/fileutils/doc.go deleted file mode 100644 index 859a200d8..000000000 --- a/vendor/github.com/go-openapi/swag/fileutils/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package fileutils exposes utilities to deal with files and paths. -// -// Currently, there is: -// - [File] to represent an abstraction of an uploaded file. -// For instance, this is used by [github.com/go-openapi/runtime.File]. -// - path search utilities (e.g. finding packages in the GO search path) -package fileutils diff --git a/vendor/github.com/go-openapi/swag/fileutils/file.go b/vendor/github.com/go-openapi/swag/fileutils/file.go deleted file mode 100644 index 5ad4cfaea..000000000 --- a/vendor/github.com/go-openapi/swag/fileutils/file.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package fileutils - -import "mime/multipart" - -// File represents an uploaded file. -type File struct { - Data multipart.File - Header *multipart.FileHeader -} - -// Read bytes from the file -func (f *File) Read(p []byte) (n int, err error) { - return f.Data.Read(p) -} - -// Close the file -func (f *File) Close() error { - return f.Data.Close() -} diff --git a/vendor/github.com/go-openapi/swag/fileutils/path.go b/vendor/github.com/go-openapi/swag/fileutils/path.go deleted file mode 100644 index dd09f690b..000000000 --- a/vendor/github.com/go-openapi/swag/fileutils/path.go +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package fileutils - -import ( - "os" - "path/filepath" - "runtime" - "strings" -) - -// GOPATHKey represents the env key for gopath -const GOPATHKey = "GOPATH" - -// FindInSearchPath finds a package in a provided lists of paths -func FindInSearchPath(searchPath, pkg string) string { - pathsList := filepath.SplitList(searchPath) - for _, path := range pathsList { - if evaluatedPath, err := filepath.EvalSymlinks(filepath.Join(path, "src", pkg)); err == nil { - if _, err := os.Stat(evaluatedPath); err == nil { - return evaluatedPath - } - } - } - return "" -} - -// FindInGoSearchPath finds a package in the $GOPATH:$GOROOT -// -// Deprecated: this function is no longer relevant with modern go. -// It uses [runtime.GOROOT] under the hood, which is deprecated as of go1.24. -func FindInGoSearchPath(pkg string) string { - return FindInSearchPath(FullGoSearchPath(), pkg) -} - -// FullGoSearchPath gets the search paths for finding packages -// -// Deprecated: this function is no longer relevant with modern go. -// It uses [runtime.GOROOT] under the hood, which is deprecated as of go1.24. -func FullGoSearchPath() string { - allPaths := os.Getenv(GOPATHKey) - if allPaths == "" { - allPaths = filepath.Join(os.Getenv("HOME"), "go") - } - if allPaths != "" { - allPaths = strings.Join([]string{allPaths, runtime.GOROOT()}, ":") - } else { - allPaths = runtime.GOROOT() - } - return allPaths -} diff --git a/vendor/github.com/go-openapi/swag/fileutils_iface.go b/vendor/github.com/go-openapi/swag/fileutils_iface.go deleted file mode 100644 index f3e79a0e4..000000000 --- a/vendor/github.com/go-openapi/swag/fileutils_iface.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import "github.com/go-openapi/swag/fileutils" - -// GOPATHKey represents the env key for gopath -// -// Deprecated: use [fileutils.GOPATHKey] instead. -const GOPATHKey = fileutils.GOPATHKey - -// File represents an uploaded file. -// -// Deprecated: use [fileutils.File] instead. -type File = fileutils.File - -// FindInSearchPath finds a package in a provided lists of paths. -// -// Deprecated: use [fileutils.FindInSearchPath] instead. -func FindInSearchPath(searchPath, pkg string) string { - return fileutils.FindInSearchPath(searchPath, pkg) -} - -// FindInGoSearchPath finds a package in the $GOPATH:$GOROOT -// -// Deprecated: use [fileutils.FindInGoSearchPath] instead. -func FindInGoSearchPath(pkg string) string { return fileutils.FindInGoSearchPath(pkg) } - -// FullGoSearchPath gets the search paths for finding packages -// -// Deprecated: use [fileutils.FullGoSearchPath] instead. -func FullGoSearchPath() string { return fileutils.FullGoSearchPath() } diff --git a/vendor/github.com/go-openapi/swag/go.work b/vendor/github.com/go-openapi/swag/go.work deleted file mode 100644 index f1dddc436..000000000 --- a/vendor/github.com/go-openapi/swag/go.work +++ /dev/null @@ -1,21 +0,0 @@ -use ( - . - ./cmdutils - ./conv - ./fileutils - ./jsonname - ./jsonutils - ./jsonutils/adapters/easyjson - ./jsonutils/adapters/testintegration - ./jsonutils/adapters/testintegration/benchmarks - ./jsonutils/fixtures_test - ./loading - ./mangling - ./netutils - ./pools - ./stringutils - ./typeutils - ./yamlutils -) - -go 1.25.0 diff --git a/vendor/github.com/go-openapi/swag/go.work.sum b/vendor/github.com/go-openapi/swag/go.work.sum deleted file mode 100644 index c1308cafa..000000000 --- a/vendor/github.com/go-openapi/swag/go.work.sum +++ /dev/null @@ -1,7 +0,0 @@ -github.com/go-openapi/testify/v2 v2.0.1/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= diff --git a/vendor/github.com/go-openapi/swag/jsonname_iface.go b/vendor/github.com/go-openapi/swag/jsonname_iface.go deleted file mode 100644 index 443560caa..000000000 --- a/vendor/github.com/go-openapi/swag/jsonname_iface.go +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import ( - "github.com/go-openapi/jsonpointer/jsonname" -) - -// DefaultJSONNameProvider is the default cache for types -// -// Deprecated: use [github.com/go-openapi/jsonpointer/jsonname.DefaultJSONNameProvider] instead. -var DefaultJSONNameProvider = jsonname.DefaultJSONNameProvider - -// NameProvider represents an object capable of translating from go property names -// to json property names. -// -// Deprecated: use [github.com/go-openapi/jsonpointer/jsonname.NameProvider] instead. -type NameProvider = jsonname.NameProvider - -// NewNameProvider creates a new name provider -// -// Deprecated: use [github.com/go-openapi/jsonpointer/jsonname.NewNameProvider] instead. -func NewNameProvider() *NameProvider { return jsonname.NewNameProvider() } diff --git a/vendor/github.com/go-openapi/swag/jsonutils_iface.go b/vendor/github.com/go-openapi/swag/jsonutils_iface.go deleted file mode 100644 index 7bd4105fa..000000000 --- a/vendor/github.com/go-openapi/swag/jsonutils_iface.go +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import ( - "log" - - "github.com/go-openapi/swag/jsonutils" -) - -// JSONMapSlice represents a JSON object, with the order of keys maintained -// -// Deprecated: use [jsonutils.JSONMapSlice] instead, or [yamlutils.YAMLMapSlice] if you marshal YAML. -type JSONMapSlice = jsonutils.JSONMapSlice - -// JSONMapItem represents a JSON object, with the order of keys maintained -// -// Deprecated: use [jsonutils.JSONMapItem] instead. -type JSONMapItem = jsonutils.JSONMapItem - -// WriteJSON writes json data. -// -// Deprecated: use [jsonutils.WriteJSON] instead. -func WriteJSON(data any) ([]byte, error) { return jsonutils.WriteJSON(data) } - -// ReadJSON reads json data. -// -// Deprecated: use [jsonutils.ReadJSON] instead. -func ReadJSON(data []byte, value any) error { return jsonutils.ReadJSON(data, value) } - -// DynamicJSONToStruct converts an untyped JSON structure into a target data type. -// -// Deprecated: use [jsonutils.FromDynamicJSON] instead. -func DynamicJSONToStruct(data any, target any) error { - return jsonutils.FromDynamicJSON(data, target) -} - -// ConcatJSON concatenates multiple JSON objects efficiently. -// -// Deprecated: use [jsonutils.ConcatJSON] instead. -func ConcatJSON(blobs ...[]byte) []byte { return jsonutils.ConcatJSON(blobs...) } - -// ToDynamicJSON turns a go value into a properly JSON untyped structure. -// -// It is the same as [FromDynamicJSON], but doesn't check for errors. -// -// Deprecated: this function is a misnomer and is unsafe. Use [jsonutils.FromDynamicJSON] instead. -func ToDynamicJSON(value any) any { - var res any - if err := FromDynamicJSON(value, &res); err != nil { - log.Println(err) - } - - return res -} - -// FromDynamicJSON turns a go value into a properly JSON typed structure. -// -// "Dynamic JSON" refers to what you get when unmarshaling JSON into an untyped any, -// i.e. objects are represented by map[string]any, arrays by []any, and all -// scalar values are any. -// -// Deprecated: use [jsonutils.FromDynamicJSON] instead. -func FromDynamicJSON(data, target any) error { return jsonutils.FromDynamicJSON(data, target) } diff --git a/vendor/github.com/go-openapi/swag/loading/LICENSE b/vendor/github.com/go-openapi/swag/loading/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/loading/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/loading/doc.go b/vendor/github.com/go-openapi/swag/loading/doc.go deleted file mode 100644 index 112c49968..000000000 --- a/vendor/github.com/go-openapi/swag/loading/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package loading provides tools to load a file from http or from a local file system. -// -// # Security -// -// By default, the local loader reads any path the process can access, including absolute -// paths and "file://" URIs (for example "file:///etc/passwd"). Applications that pass -// untrusted input to [LoadFromFileOrHTTP], [JSONDoc] (or to downstream consumers such as -// go-openapi/loads) must confine local loading to a trusted directory. -// -// Use [WithRoot] to do so: it resolves every requested path relative to a chosen directory -// and rejects anything that escapes it, including via symlink. It is built on [os.Root] -// and is therefore safer than passing an [os.DirFS] to [WithFS], which does not block -// symlink escapes. -// -// Remote loading uses a standard [net/http] client. -// By default it follows redirects and performs no destination filtering — exactly like [net/http.DefaultClient]. -// -// A caller-controlled URL may therefore reach internal services or cloud metadata endpoints -// (server-side request forgery). -// -// This package does not, and should not, embed a network policy: -// when the URL may derive from untrusted input, supply a restricted client with -// [WithHTTPClient] whose transport rejects unwanted destinations at dial time — which also -// covers redirects and DNS rebinding. -// See the example on [LoadFromFileOrHTTP]. -package loading diff --git a/vendor/github.com/go-openapi/swag/loading/errors.go b/vendor/github.com/go-openapi/swag/loading/errors.go deleted file mode 100644 index b3964289c..000000000 --- a/vendor/github.com/go-openapi/swag/loading/errors.go +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package loading - -type loadingError string - -const ( - // ErrLoader is an error raised by the file loader utility - ErrLoader loadingError = "loader error" -) - -func (e loadingError) Error() string { - return string(e) -} diff --git a/vendor/github.com/go-openapi/swag/loading/json.go b/vendor/github.com/go-openapi/swag/loading/json.go deleted file mode 100644 index 59db12f5c..000000000 --- a/vendor/github.com/go-openapi/swag/loading/json.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package loading - -import ( - "encoding/json" - "errors" - "path/filepath" -) - -// JSONMatcher matches json for a file loader. -func JSONMatcher(path string) bool { - ext := filepath.Ext(path) - return ext == ".json" || ext == ".jsn" || ext == ".jso" -} - -// JSONDoc loads a json document from either a file or a remote url. -func JSONDoc(path string, opts ...Option) (json.RawMessage, error) { - data, err := LoadFromFileOrHTTP(path, opts...) - if err != nil { - return nil, errors.Join(err, ErrLoader) - } - return json.RawMessage(data), nil -} diff --git a/vendor/github.com/go-openapi/swag/loading/loading.go b/vendor/github.com/go-openapi/swag/loading/loading.go deleted file mode 100644 index 0b38ac1e3..000000000 --- a/vendor/github.com/go-openapi/swag/loading/loading.go +++ /dev/null @@ -1,188 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package loading - -import ( - "context" - "embed" - "fmt" - "io" - "log" - "net/http" - "net/url" - "path" - "path/filepath" - "runtime" - "strings" -) - -// LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in. -// -// Security: by default a local path is read with no confinement, so a caller-controlled path -// (including a "file://" URI or an absolute path) may read any file the process can access. -// When the path may derive from untrusted input, confine local loading with [WithRoot]. -func LoadFromFileOrHTTP(pth string, opts ...Option) ([]byte, error) { - o := optionsWithDefaults(opts) - return LoadStrategy(pth, o.ReadFileFunc(), loadHTTPBytes(opts...), opts...)(pth) -} - -// LoadStrategy returns a loader function for a given path or URI. -// -// The load strategy returns the remote load for any path starting with `http`. -// So this works for any URI with a scheme `http` or `https`. -// -// The fallback strategy is to call the local loader. -// -// The local loader takes a local file system path (absolute or relative) as argument, -// or alternatively a `file://...` URI, **without host** (see also below for windows). -// -// There are a few liberalities, initially intended to be tolerant regarding the URI syntax, -// especially on windows. -// -// Before the local loader is called, the given path is transformed: -// - percent-encoded characters are unescaped -// - simple paths (e.g. `./folder/file`) are passed as-is -// - on windows, occurrences of `/` are replaced by `\`, so providing a relative path such a `folder/file` works too. -// -// For paths provided as URIs with the "file" scheme, please note that: -// - `file://` is simply stripped. -// This means that the host part of the URI is not parsed at all. -// For example, `file:///folder/file" becomes "/folder/file`, -// but `file://localhost/folder/file` becomes `localhost/folder/file` on unix systems. -// Similarly, `file://./folder/file` yields `./folder/file`. -// - on windows, `file://...` can take a host so as to specify an UNC share location. -// -// Reminder about windows-specifics: -// - `file://host/folder/file` becomes an UNC path like `\\host\folder\file` (no port specification is supported) -// - `file:///c:/folder/file` becomes `C:\folder\file` -// - `file://c:/folder/file` is tolerated (without leading `/`) and becomes `c:\folder\file` -func LoadStrategy(pth string, local, remote func(string) ([]byte, error), opts ...Option) func(string) ([]byte, error) { - if hasHTTPScheme(pth) { - return remote - } - o := optionsWithDefaults(opts) - _, isEmbedFS := o.fs.(embed.FS) - // any loader backed by an fs.FS or an os.Root consumes forward-slash paths on every - // platform, so it must not go through the windows-native file:// preprocessing below. - isFSBacked := o.fs != nil || o.root != "" - - return func(p string) ([]byte, error) { - upth, err := url.PathUnescape(p) - if err != nil { - return nil, err - } - - cpth, hasPrefix := strings.CutPrefix(upth, "file://") - if !hasPrefix || isFSBacked || runtime.GOOS != "windows" { - // crude processing: trim the file:// prefix. This leaves full URIs with a host with a (mostly) unexpected result - // regular file path provided: just normalize slashes - if isEmbedFS { - // embed.FS always uses "/" as separator, even on windows, and rejects leading "./" or "/". - return local(strings.TrimLeft(filepath.ToSlash(cpth), "./")) // remove invalid leading characters for embed FS - } - - if isFSBacked { - // other fs.FS (e.g. os.DirFS) and os.Root loaders also use "/" on every platform. - // Escaping paths (absolute, "..", escaping symlinks) are rejected by the loader, not rewritten here. - return local(filepath.ToSlash(cpth)) - } - - return local(filepath.FromSlash(cpth)) - } - - // windows-only pre-processing of file://... URIs, excluding embed.FS - - // support for canonical file URIs on windows. - u, err := url.Parse(filepath.ToSlash(upth)) - if err != nil { - return nil, err - } - - if u.Host != "" { - // assume UNC name (volume share) - // NOTE: UNC port not yet supported - - // when the "host" segment is a drive letter: - // file://C:/folder/... => C:\folder - upth = path.Clean(strings.Join([]string{u.Host, u.Path}, `/`)) - if !strings.HasSuffix(u.Host, ":") && u.Host[0] != '.' { - // tolerance: if we have a leading dot, this can't be a host - // file://host/share/folder\... ==> \\host\share\path\folder - upth = "//" + upth - } - } else { - // no host, let's figure out if this is a drive letter - upth = strings.TrimPrefix(upth, `file://`) - first, _, _ := strings.Cut(strings.TrimPrefix(u.Path, "/"), "/") - if strings.HasSuffix(first, ":") { - // drive letter in the first segment: - // file:///c:/folder/... ==> strip the leading slash - upth = strings.TrimPrefix(upth, `/`) - } - } - - return local(filepath.FromSlash(upth)) - } -} - -// hasHTTPScheme reports whether pth is an absolute URL with an http or https scheme, -// selecting the remote loader. The comparison is case-insensitive, as URL schemes are. -// -// Requiring the "://" separator (rather than a bare "http" prefix) avoids misrouting a -// local file whose name merely starts with "http" (e.g. "httpbin.json") to the remote loader. -func hasHTTPScheme(pth string) bool { - for _, scheme := range [...]string{"http://", "https://"} { - if len(pth) >= len(scheme) && strings.EqualFold(pth[:len(scheme)], scheme) { - return true - } - } - - return false -} - -func loadHTTPBytes(opts ...Option) func(path string) ([]byte, error) { - o := optionsWithDefaults(opts) - - return func(path string) ([]byte, error) { - client := o.client - timeoutCtx := context.Background() - var cancel func() - - if o.httpTimeout > 0 { - timeoutCtx, cancel = context.WithTimeout(timeoutCtx, o.httpTimeout) - defer cancel() - } - - req, err := http.NewRequestWithContext(timeoutCtx, http.MethodGet, path, nil) - if err != nil { - return nil, err - } - - if o.basicAuthUsername != "" && o.basicAuthPassword != "" { - req.SetBasicAuth(o.basicAuthUsername, o.basicAuthPassword) - } - - for key, val := range o.customHeaders { - req.Header.Set(key, val) - } - - resp, err := client.Do(req) - defer func() { - if resp != nil { - if e := resp.Body.Close(); e != nil { - log.Println(e) - } - } - }() - if err != nil { - return nil, err - } - - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("could not access document at %q [%s]: %w", path, resp.Status, ErrLoader) - } - - return io.ReadAll(resp.Body) - } -} diff --git a/vendor/github.com/go-openapi/swag/loading/options.go b/vendor/github.com/go-openapi/swag/loading/options.go deleted file mode 100644 index 2c1282317..000000000 --- a/vendor/github.com/go-openapi/swag/loading/options.go +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package loading - -import ( - "errors" - "io/fs" - "net/http" - "os" - "time" -) - -type ( - // Option provides options for loading a file over HTTP or from a file. - Option func(*options) - - httpOptions struct { - httpTimeout time.Duration - basicAuthUsername string - basicAuthPassword string - customHeaders map[string]string - client *http.Client - } - - fileOptions struct { - fs fs.ReadFileFS - root string // when non-empty, local reads are confined to this directory via os.Root - } - - options struct { - httpOptions - fileOptions - } -) - -func (fo fileOptions) ReadFileFunc() func(string) ([]byte, error) { - if fo.root != "" { - root := fo.root - - return func(name string) ([]byte, error) { - r, err := os.OpenRoot(root) - if err != nil { - return nil, errors.Join(err, ErrLoader) - } - defer func() { _ = r.Close() }() - - return r.ReadFile(name) - } - } - - if fo.fs == nil { - return os.ReadFile - } - - return fo.fs.ReadFile -} - -// WithTimeout sets a timeout for the remote file loader. -// -// The default timeout is 30s. -func WithTimeout(timeout time.Duration) Option { - return func(o *options) { - o.httpTimeout = timeout - } -} - -// WithBasicAuth sets a basic authentication scheme for the remote file loader. -func WithBasicAuth(username, password string) Option { - return func(o *options) { - o.basicAuthUsername = username - o.basicAuthPassword = password - } -} - -// WithCustomHeaders sets custom headers for the remote file loader. -func WithCustomHeaders(headers map[string]string) Option { - return func(o *options) { - if o.customHeaders == nil { - o.customHeaders = make(map[string]string, len(headers)) - } - - for header, value := range headers { - o.customHeaders[header] = value - } - } -} - -// WithHTTPClient overrides the default HTTP client used to fetch a remote file. -// -// By default, [http.DefaultClient] is used. -func WithHTTPClient(client *http.Client) Option { - return func(o *options) { - o.client = client - } -} - -// WithFS sets a file system for the local file loader. -// -// If the provided file system is a [fs.ReadFileFS], the ReadFile function is used. -// Otherwise, ReadFile is wrapped using [fs.ReadFile]. -// -// By default, the file system is the one provided by the os package. -// -// For example, this may be set to consume from an embedded file system, or a rooted FS. -// -// WithFS and [WithRoot] are mutually exclusive: the last one applied wins. -// -// Security note: a file system built from [os.DirFS] confines paths but does NOT protect -// against symlinks that escape the root. To load from a directory derived from untrusted -// input, prefer [WithRoot], which is symlink-escape resistant. -func WithFS(filesystem fs.FS) Option { - return func(o *options) { - o.root = "" // last-wins vs WithRoot - if rfs, ok := filesystem.(fs.ReadFileFS); ok { - o.fs = rfs - - return - } - o.fs = readFileFS{FS: filesystem} - } -} - -// WithRoot confines local file loading to dir. -// -// Every requested path is resolved relative to dir, and any path that would escape dir — -// whether through an absolute path, ".." traversal, or a symlink pointing outside dir — is -// rejected. This is built on [os.Root] and is therefore resistant to the symlink escapes -// that a plain [os.DirFS] does not prevent. -// -// WithRoot is the recommended option when loading specs from a location derived from -// untrusted input. It applies to local loading only and has no effect on remote -// (http/https) loading. WithRoot and [WithFS] are mutually exclusive: the last one applied -// wins. -// -// Note: [os.Root] confines path resolution but does not, by itself, protect against -// traversal of mount/bind boundaries, /proc special files, or device files. Point WithRoot -// at a directory that holds only the documents you intend to expose. -func WithRoot(dir string) Option { - return func(o *options) { - o.root = dir - o.fs = nil // last-wins vs WithFS - } -} - -type readFileFS struct { - fs.FS -} - -func (r readFileFS) ReadFile(name string) ([]byte, error) { - return fs.ReadFile(r.FS, name) -} - -func optionsWithDefaults(opts []Option) options { - const defaultTimeout = 30 * time.Second - - o := options{ - // package level defaults - httpOptions: httpOptions{ - httpTimeout: defaultTimeout, - client: http.DefaultClient, - }, - } - - for _, apply := range opts { - apply(&o) - } - - return o -} diff --git a/vendor/github.com/go-openapi/swag/loading/yaml.go b/vendor/github.com/go-openapi/swag/loading/yaml.go deleted file mode 100644 index 3ebb53668..000000000 --- a/vendor/github.com/go-openapi/swag/loading/yaml.go +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package loading - -import ( - "encoding/json" - "path/filepath" - - "github.com/go-openapi/swag/yamlutils" -) - -// YAMLMatcher matches yaml for a file loader. -func YAMLMatcher(path string) bool { - ext := filepath.Ext(path) - return ext == ".yaml" || ext == ".yml" -} - -// YAMLDoc loads a yaml document from either http or a file and converts it to json. -func YAMLDoc(path string, opts ...Option) (json.RawMessage, error) { - yamlDoc, err := YAMLData(path, opts...) - if err != nil { - return nil, err - } - - return yamlutils.YAMLToJSON(yamlDoc) -} - -// YAMLData loads a yaml document from either http or a file. -func YAMLData(path string, opts ...Option) (any, error) { - data, err := LoadFromFileOrHTTP(path, opts...) - if err != nil { - return nil, err - } - - return yamlutils.BytesToYAMLDoc(data) -} diff --git a/vendor/github.com/go-openapi/swag/loading_iface.go b/vendor/github.com/go-openapi/swag/loading_iface.go deleted file mode 100644 index 78dadfccd..000000000 --- a/vendor/github.com/go-openapi/swag/loading_iface.go +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import ( - "encoding/json" - "time" - - "github.com/go-openapi/swag/loading" -) - -var ( - // Package-level defaults for the file loading utilities (deprecated). - - // LoadHTTPTimeout the default timeout for load requests. - // - // Deprecated: use [loading.WithTimeout] instead. - LoadHTTPTimeout = 30 * time.Second - - // LoadHTTPBasicAuthUsername the username to use when load requests require basic auth. - // - // Deprecated: use [loading.WithBasicAuth] instead. - LoadHTTPBasicAuthUsername = "" - - // LoadHTTPBasicAuthPassword the password to use when load requests require basic auth. - // - // Deprecated: use [loading.WithBasicAuth] instead. - LoadHTTPBasicAuthPassword = "" - - // LoadHTTPCustomHeaders an optional collection of custom HTTP headers for load requests. - // - // Deprecated: use [loading.WithCustomHeaders] instead. - LoadHTTPCustomHeaders = map[string]string{} -) - -// LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the provided path. -// -// Deprecated: use [loading.LoadFromFileOrHTTP] instead. -func LoadFromFileOrHTTP(pth string, opts ...loading.Option) ([]byte, error) { - return loading.LoadFromFileOrHTTP(pth, loadingOptionsWithDefaults(opts)...) -} - -// LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in -// timeout arg allows for per request overriding of the request timeout. -// -// Deprecated: use [loading.LoadFileOrHTTP] with the [loading.WithTimeout] option instead. -func LoadFromFileOrHTTPWithTimeout(pth string, timeout time.Duration, opts ...loading.Option) ([]byte, error) { - opts = append(opts, loading.WithTimeout(timeout)) - - return LoadFromFileOrHTTP(pth, opts...) -} - -// LoadStrategy returns a loader function for a given path or URL. -// -// Deprecated: use [loading.LoadStrategy] instead. -func LoadStrategy(pth string, local, remote func(string) ([]byte, error), opts ...loading.Option) func(string) ([]byte, error) { - return loading.LoadStrategy(pth, local, remote, loadingOptionsWithDefaults(opts)...) -} - -// YAMLMatcher matches yaml for a file loader. -// -// Deprecated: use [loading.YAMLMatcher] instead. -func YAMLMatcher(path string) bool { return loading.YAMLMatcher(path) } - -// YAMLDoc loads a yaml document from either http or a file and converts it to json. -// -// Deprecated: use [loading.YAMLDoc] instead. -func YAMLDoc(path string) (json.RawMessage, error) { - return loading.YAMLDoc(path) -} - -// YAMLData loads a yaml document from either http or a file. -// -// Deprecated: use [loading.YAMLData] instead. -func YAMLData(path string) (any, error) { - return loading.YAMLData(path) -} - -// loadingOptionsWithDefaults bridges deprecated default settings that use package-level variables, -// with the recommended use of loading.Option. -func loadingOptionsWithDefaults(opts []loading.Option) []loading.Option { - const defaultOptions = 3 - o := make([]loading.Option, 0, defaultOptions+len(opts)) - o = append(o, []loading.Option{ - loading.WithTimeout(LoadHTTPTimeout), - loading.WithBasicAuth(LoadHTTPBasicAuthUsername, LoadHTTPBasicAuthPassword), - loading.WithCustomHeaders(LoadHTTPCustomHeaders), - }...) - o = append(o, opts...) - - return o -} diff --git a/vendor/github.com/go-openapi/swag/mangling/BENCHMARK.md b/vendor/github.com/go-openapi/swag/mangling/BENCHMARK.md deleted file mode 100644 index abe6e9533..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/BENCHMARK.md +++ /dev/null @@ -1,90 +0,0 @@ -# Benchmarking name mangling utilities - -```bash -go test -bench XXX -run XXX -benchtime 30s -``` - -## Benchmarks at `b3e7a5386f996177e4808f11acb2aa93a0f660df` - -``` -goos: linux -goarch: amd64 -pkg: github.com/go-openapi/swag -cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz -BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op -BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op -BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op -BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op -BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op -BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op -``` - -## Benchmarks after PR #79 - -~ x10 performance improvement and ~ /100 memory allocations. - -``` -goos: linux -goarch: amd64 -pkg: github.com/go-openapi/swag -cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz -BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op -BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op -BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op -BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op -BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op -BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op -``` - -``` -goos: linux -goarch: amd64 -pkg: github.com/go-openapi/swag -cpu: AMD Ryzen 7 5800X 8-Core Processor -BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op -BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op -BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op -BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op -BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op -BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op -``` - -## Benchmarks at `d7d2d1b895f5b6747afaff312dd2a402e69e818b` - -go1.24 - -``` -goos: linux -goarch: amd64 -pkg: github.com/go-openapi/swag -cpu: AMD Ryzen 7 5800X 8-Core Processor -BenchmarkToXXXName/ToGoName-16 19757858 1881 ns/op 42 B/op 5 allocs/op -BenchmarkToXXXName/ToVarName-16 17494111 2094 ns/op 74 B/op 7 allocs/op -BenchmarkToXXXName/ToFileName-16 28161226 1492 ns/op 158 B/op 7 allocs/op -BenchmarkToXXXName/ToCommandName-16 23787333 1489 ns/op 158 B/op 7 allocs/op -BenchmarkToXXXName/ToHumanNameLower-16 17537257 2030 ns/op 103 B/op 6 allocs/op -BenchmarkToXXXName/ToHumanNameTitle-16 16977453 2156 ns/op 105 B/op 6 allocs/op -``` - -## Benchmarks after PR #106 - -Moving the scope of everything down to a struct allowed to reduce a bit garbage and pooling. - -On top of that, ToGoName (and thus ToVarName) have been subject to a minor optimization, removing a few allocations. - -Overall timings improve by ~ -10%. - -go1.24 - -``` -goos: linux -goarch: amd64 -pkg: github.com/go-openapi/swag/mangling -cpu: AMD Ryzen 7 5800X 8-Core Processor -BenchmarkToXXXName/ToGoName-16 22496130 1618 ns/op 31 B/op 3 allocs/op -BenchmarkToXXXName/ToVarName-16 22538068 1618 ns/op 33 B/op 3 allocs/op -BenchmarkToXXXName/ToFileName-16 27722977 1236 ns/op 105 B/op 6 allocs/op -BenchmarkToXXXName/ToCommandName-16 27967395 1258 ns/op 105 B/op 6 allocs/op -BenchmarkToXXXName/ToHumanNameLower-16 18587901 1917 ns/op 103 B/op 6 allocs/op -BenchmarkToXXXName/ToHumanNameTitle-16 17193208 2019 ns/op 108 B/op 7 allocs/op -``` diff --git a/vendor/github.com/go-openapi/swag/mangling/LICENSE b/vendor/github.com/go-openapi/swag/mangling/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/mangling/doc.go b/vendor/github.com/go-openapi/swag/mangling/doc.go deleted file mode 100644 index ce0d89048..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package mangling provides name mangling capabilities. -// -// Name mangling is an important stage when generating code: -// it helps construct safe program identifiers that abide by the language rules -// and play along with linters. -// -// Examples: -// -// Suppose we get an object name taken from an API spec: "json_object", -// -// We may generate a legit go type name using [NameMangler.ToGoName]: "JsonObject". -// -// We may then locate this type in a source file named using [NameMangler.ToFileName]: "json_object.go". -// -// The methods exposed by the NameMangler are used to generate code in many different contexts, such as: -// -// - generating exported or unexported go identifiers from a JSON schema or an API spec -// - generating file names -// - generating human-readable comments for types and variables -// - generating JSON-like API identifiers from go code -// - ... -package mangling diff --git a/vendor/github.com/go-openapi/swag/mangling/initialism_index.go b/vendor/github.com/go-openapi/swag/mangling/initialism_index.go deleted file mode 100644 index e5b70c149..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/initialism_index.go +++ /dev/null @@ -1,270 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import ( - "sort" - "strings" - "unicode" - "unicode/utf8" -) - -// DefaultInitialisms returns all the initialisms configured by default for this package. -// -// # Motivation -// -// Common initialisms are acronyms for which the ordinary camel-casing rules are altered and -// for which we retain the original case. -// -// This is largely specific to the go naming conventions enforced by golint (now revive). -// -// # Example -// -// In go, "id" is a good-looking identifier, but "Id" is not and "ID" is preferred -// (notice that this stems only from conventions: the go compiler accepts all of these). -// -// Similarly, we may use "http", but not "Http". In this case, "HTTP" is preferred. -// -// # Reference and customization -// -// The default list of these casing-style exceptions is taken from the [github.com/mgechev/revive] linter for go: -// https://github.com/mgechev/revive/blob/master/lint/name.go#L93 -// -// There are a few additions to the original list, such as IPv4, IPv6 and OAI ("OpenAPI"). -// -// For these additions, "IPv4" would be preferred to "Ipv4" or "IPV4", and "OAI" to "Oai" -// -// You may redefine this list entirely using the mangler option [WithInitialisms], or simply add extra definitions -// using [WithAdditionalInitialisms]. -// -// # Mixed-case and plurals -// -// Notice that initialisms are not necessarily fully upper-cased: a mixed-case initialism indicates the preferred casing. -// -// Obviously, lower-case only initialisms do not make a lot of sense: if lower-case only initialisms are added, -// they will be considered fully capitalized. -// -// Plural forms use mixed case like "IDs". And so do values like "IPv4" or "IPv6". -// -// The [NameMangler] automatically detects simple plurals for words such as "IDs" or "APIs", -// so you don't need to configure these variants. -// -// At this moment, it doesn't support pluralization of terms that ends with an 's' (or 'S'), since there is -// no clear consensus on whether a word like DNS should be pluralized as DNSes or remain invariant. -// The [NameMangler] consider those invariant. Therefore DNSs or DNSes are not recognized as plurals for DNS. -// -// Besids, we don't want to support pluralization of terms which would otherwise conflict with another one, -// like "HTTPs" vs "HTTPS". All these should be considered invariant. Hence: "Https" matches "HTTPS" and -// "HTTPSS" is "HTTPS" followed by "S". -func DefaultInitialisms() []string { - return []string{ - "ACL", - "API", - "ASCII", - "CPU", - "CSS", - "DNS", - "EOF", - "GUID", - "HTML", - "HTTPS", - "HTTP", - "ID", - "IP", - "IPv4", // prefer the mixed case outcome IPv4 over the capitalized IPV4 - "IPv6", // prefer the mixed case outcome IPv6 over the capitalized IPV6 - "JSON", - "LHS", - "OAI", - "QPS", - "RAM", - "RHS", - "RPC", - "SLA", - "SMTP", - "SQL", - "SSH", - "TCP", - "TLS", - "TTL", - "UDP", - "UI", - "UID", - "UUID", - "URI", - "URL", - "UTF8", - "VM", - "XML", - "XMPP", - "XSRF", - "XSS", - } -} - -type indexOfInitialisms struct { - initialismsCache - - index map[string]struct{} -} - -func newIndexOfInitialisms() *indexOfInitialisms { - return &indexOfInitialisms{ - index: make(map[string]struct{}), - } -} - -func (m *indexOfInitialisms) add(words ...string) *indexOfInitialisms { - for _, word := range words { - // sanitization of injected words: trimmed from blanks, and must start with a letter - trimmed := strings.TrimSpace(word) - - firstRune, _ := utf8.DecodeRuneInString(trimmed) - if !unicode.IsLetter(firstRune) { - continue - } - - // Initialisms are case-sensitive. This means that we support mixed-case words. - // However, if specified as a lower-case string, the initialism should be fully capitalized. - if trimmed == strings.ToLower(trimmed) { - m.index[strings.ToUpper(trimmed)] = struct{}{} - - continue - } - - m.index[trimmed] = struct{}{} - } - return m -} - -func (m *indexOfInitialisms) sorted() []string { - result := make([]string, 0, len(m.index)) - for k := range m.index { - result = append(result, k) - } - sort.Sort(sort.Reverse(byInitialism(result))) - return result -} - -func (m *indexOfInitialisms) buildCache() { - m.build(m.sorted(), m.pluralForm) -} - -// initialismsCache caches all needed pre-computed and converted initialism entries, -// in the desired resolution order. -type initialismsCache struct { - initialisms []string - initialismsRunes [][]rune - initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version - initialismsPluralForm []pluralForm -} - -func (c *initialismsCache) build(in []string, pluralfunc func(string) pluralForm) { - c.initialisms = in - c.initialismsRunes = asRunes(c.initialisms) - c.initialismsUpperCased = asUpperCased(c.initialisms) - c.initialismsPluralForm = asPluralForms(c.initialisms, pluralfunc) -} - -// pluralForm denotes the kind of pluralization to be used for initialisms. -// -// At this moment, initialisms are either invariant or follow a simple plural form with an -// extra (lower case) "s". -type pluralForm uint8 - -const ( - notPlural pluralForm = iota - invariantPlural - simplePlural -) - -func (f pluralForm) String() string { - switch f { - case notPlural: - return "notPlural" - case invariantPlural: - return "invariantPlural" - case simplePlural: - return "simplePlural" - default: - return "" - } -} - -// pluralForm indicates how we want to pluralize a given initialism. -// -// Besides configured invariant forms (like HTTP and HTTPS), -// an initialism is normally pluralized by adding a single 's', like in IDs. -// -// Initialisms ending with an 'S' or an 's' are configured as invariant (we don't -// support plural forms like CSSes or DNSes, however the mechanism could be extended to -// do just that). -func (m *indexOfInitialisms) pluralForm(key string) pluralForm { - if _, ok := m.index[key]; !ok { - return notPlural - } - - if strings.HasSuffix(strings.ToUpper(key), "S") { - return invariantPlural - } - - if _, ok := m.index[key+"s"]; ok { - return invariantPlural - } - - if _, ok := m.index[key+"S"]; ok { - return invariantPlural - } - - return simplePlural -} - -type byInitialism []string - -func (s byInitialism) Len() int { - return len(s) -} -func (s byInitialism) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Less specifies the order in which initialisms are prioritized: -// 1. match longest first -// 2. when equal length, match in reverse lexicographical order, lower case match comes first -func (s byInitialism) Less(i, j int) bool { - if len(s[i]) != len(s[j]) { - return len(s[i]) < len(s[j]) - } - - return s[i] < s[j] -} - -func asRunes(in []string) [][]rune { - out := make([][]rune, len(in)) - for i, initialism := range in { - out[i] = []rune(initialism) - } - - return out -} - -func asUpperCased(in []string) [][]rune { - out := make([][]rune, len(in)) - - for i, initialism := range in { - out[i] = []rune(upper(trim(initialism))) - } - - return out -} - -// asPluralForms bakes an index of pluralization support. -func asPluralForms(in []string, pluralFunc func(string) pluralForm) []pluralForm { - out := make([]pluralForm, len(in)) - for i, initialism := range in { - out[i] = pluralFunc(initialism) - } - - return out -} diff --git a/vendor/github.com/go-openapi/swag/mangling/name_lexem.go b/vendor/github.com/go-openapi/swag/mangling/name_lexem.go deleted file mode 100644 index bc837e3b9..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/name_lexem.go +++ /dev/null @@ -1,186 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import ( - "bytes" - "strings" - "unicode" - "unicode/utf8" -) - -type ( - lexemKind uint8 - - nameLexem struct { - original string - matchedInitialism string - kind lexemKind - } -) - -const ( - lexemKindCasualName lexemKind = iota - lexemKindInitialismName -) - -func newInitialismNameLexem(original, matchedInitialism string) nameLexem { - return nameLexem{ - kind: lexemKindInitialismName, - original: original, - matchedInitialism: matchedInitialism, - } -} - -func newCasualNameLexem(original string) nameLexem { - return nameLexem{ - kind: lexemKindCasualName, - original: trim(original), // TODO: save on calls to trim - } -} - -// WriteTitleized writes the titleized lexeme to a bytes.Buffer. -// -// If the first letter cannot be capitalized, it doesn't write anything and return false, -// so the caller may attempt some workaround strategy. -func (l nameLexem) WriteTitleized(w *bytes.Buffer, alwaysUpper bool) bool { - if l.kind == lexemKindInitialismName { - w.WriteString(l.matchedInitialism) - - return true - } - - if len(l.original) == 0 { - return true - } - - if len(l.original) == 1 { - // identifier is too short: casing will depend on the context - firstByte := l.original[0] - switch { - case 'A' <= firstByte && firstByte <= 'Z': - // safe - w.WriteByte(firstByte) - - return true - case alwaysUpper && 'a' <= firstByte && firstByte <= 'z': - w.WriteByte(firstByte - 'a' + 'A') - - return true - default: - - // not a letter: skip and let the caller decide - return false - } - } - - if firstByte := l.original[0]; firstByte < utf8.RuneSelf { - // ASCII - switch { - case 'A' <= firstByte && firstByte <= 'Z': - // already an upper case letter - w.WriteString(l.original) - - return true - case 'a' <= firstByte && firstByte <= 'z': - w.WriteByte(firstByte - 'a' + 'A') - w.WriteString(l.original[1:]) - - return true - default: - // not a good candidate: doesn't start with a letter - return false - } - } - - // unicode - firstRune, idx := utf8.DecodeRuneInString(l.original) - if !unicode.IsLetter(firstRune) || !unicode.IsUpper(unicode.ToUpper(firstRune)) { - // not a good candidate: doesn't start with a letter - // or a rune for which case doesn't make sense (e.g. East-Asian runes etc) - return false - } - - rest := l.original[idx:] - w.WriteRune(unicode.ToUpper(firstRune)) - w.WriteString(strings.ToLower(rest)) - - return true -} - -// WriteLower is like write titleized but it writes a lower-case version of the lexeme. -// -// Similarly, there is no writing if the casing of the first rune doesn't make sense. -func (l nameLexem) WriteLower(w *bytes.Buffer, alwaysLower bool) bool { - if l.kind == lexemKindInitialismName { - w.WriteString(lower(l.matchedInitialism)) - - return true - } - - if len(l.original) == 0 { - return true - } - - if len(l.original) == 1 { - // identifier is too short: casing will depend on the context - firstByte := l.original[0] - switch { - case 'a' <= firstByte && firstByte <= 'z': - // safe - w.WriteByte(firstByte) - - return true - case alwaysLower && 'A' <= firstByte && firstByte <= 'Z': - w.WriteByte(firstByte - 'A' + 'a') - - return true - default: - - // not a letter: skip and let the caller decide - return false - } - } - - if firstByte := l.original[0]; firstByte < utf8.RuneSelf { - // ASCII - switch { - case 'a' <= firstByte && firstByte <= 'z': - // already a lower case letter - w.WriteString(l.original) - - return true - case 'A' <= firstByte && firstByte <= 'Z': - w.WriteByte(firstByte - 'A' + 'a') - w.WriteString(l.original[1:]) - - return true - default: - // not a good candidate: doesn't start with a letter - return false - } - } - - // unicode - firstRune, idx := utf8.DecodeRuneInString(l.original) - if !unicode.IsLetter(firstRune) || !unicode.IsLower(unicode.ToLower(firstRune)) { - // not a good candidate: doesn't start with a letter - // or a rune for which case doesn't make sense (e.g. East-Asian runes etc) - return false - } - - rest := l.original[idx:] - w.WriteRune(unicode.ToLower(firstRune)) - w.WriteString(rest) - - return true -} - -func (l nameLexem) GetOriginal() string { - return l.original -} - -func (l nameLexem) IsInitialism() bool { - return l.kind == lexemKindInitialismName -} diff --git a/vendor/github.com/go-openapi/swag/mangling/name_mangler.go b/vendor/github.com/go-openapi/swag/mangling/name_mangler.go deleted file mode 100644 index da685681d..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/name_mangler.go +++ /dev/null @@ -1,370 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import ( - "strings" - "unicode" -) - -// NameMangler knows how to transform sentences or words into -// identifiers that are a better fit in contexts such as: -// -// - unexported or exported go variable identifiers -// - file names -// - camel cased identifiers -// - ... -// -// The [NameMangler] is safe for concurrent use, save for its [NameMangler.AddInitialisms] method, -// which is not. -// -// # Known limitations -// -// At this moment, the [NameMangler] doesn't play well with "all caps" text: -// -// unless every single upper-cased word is declared as an initialism, capitalized words would generally -// not be transformed with the expected result, e.g. -// -// ToFileName("THIS_IS_ALL_CAPS") -// -// yields the weird outcome -// -// "t_h_i_s_i_s_a_l_l_c_a_p_s" -type NameMangler struct { - options - - index *indexOfInitialisms - - splitter splitter - splitterWithPostSplit splitter - - _ struct{} -} - -// NewNameMangler builds a name mangler ready to convert strings. -// -// The default name mangler is configured with default common initialisms and all default options. -func NewNameMangler(opts ...Option) NameMangler { - m := NameMangler{ - options: optionsWithDefaults(opts), - index: newIndexOfInitialisms(), - } - m.addInitialisms(m.commonInitialisms...) - - // a splitter that returns matches lexemes as ready-to-assemble strings: - // details of the lexemes are redeemed. - m.splitter = newSplitter( - withInitialismsCache(&m.index.initialismsCache), - withReplaceFunc(m.replaceFunc), - ) - - // a splitter that returns matches lexemes ready for post-processing - m.splitterWithPostSplit = newSplitter( - withInitialismsCache(&m.index.initialismsCache), - withReplaceFunc(m.replaceFunc), - withPostSplitInitialismCheck, - ) - - return m -} - -// AddInitialisms declares extra initialisms to the mangler. -// -// It declares extra words as "initialisms" (i.e. words that won't be camel cased or titled cased), -// on top of the existing list of common initialisms (such as ID, HTTP...). -// -// Added words must start with a (unicode) letter. If some don't, they are ignored. -// Added words are either fully capitalized or mixed-cased. Lower-case only words are considered capitalized. -// -// It is typically used just after initializing the [NameMangler]. -// -// When all initialisms are known at the time the mangler is initialized, it is preferable to -// use [NewNameMangler] with the option [WithAdditionalInitialisms]. -// -// Adding initialisms mutates the mangler and should not be carried out concurrently with other calls to the mangler. -func (m *NameMangler) AddInitialisms(words ...string) { - m.addInitialisms(words...) -} - -// Initialisms renders the list of initialisms supported by this mangler. -func (m *NameMangler) Initialisms() []string { - return m.index.initialisms -} - -// Camelize a single word. -// -// Example: -// -// - "HELLO" and "hello" become "Hello". -func (m NameMangler) Camelize(word string) string { - ru := []rune(word) - - switch len(ru) { - case 0: - return "" - case 1: - return string(unicode.ToUpper(ru[0])) - default: - camelized := poolOfBuffers.BorrowBuffer(len(word)) - camelized.Grow(len(word)) - defer func() { - poolOfBuffers.RedeemBuffer(camelized) - }() - - camelized.WriteRune(unicode.ToUpper(ru[0])) - for _, ru := range ru[1:] { - camelized.WriteRune(unicode.ToLower(ru)) - } - - return camelized.String() - } -} - -// ToFileName generates a suitable snake-case file name from a sentence. -// -// It lower-cases everything with underscore (_) as a word separator. -// -// Examples: -// -// - "Hello, Swagger" becomes "hello_swagger" -// - "HelloSwagger" becomes "hello_swagger" -func (m NameMangler) ToFileName(name string) string { - inptr := m.split(name) - in := *inptr - out := make([]string, 0, len(in)) - - for _, w := range in { - out = append(out, lower(w)) - } - poolOfStrings.RedeemStrings(inptr) - - return strings.Join(out, "_") -} - -// ToCommandName generates a suitable CLI command name from a sentence. -// -// It lower-cases everything with dash (-) as a word separator. -// -// Examples: -// -// - "Hello, Swagger" becomes "hello-swagger" -// - "HelloSwagger" becomes "hello-swagger" -func (m NameMangler) ToCommandName(name string) string { - inptr := m.split(name) - in := *inptr - out := make([]string, 0, len(in)) - - for _, w := range in { - out = append(out, lower(w)) - } - poolOfStrings.RedeemStrings(inptr) - - return strings.Join(out, "-") -} - -// ToHumanNameLower represents a code name as a human-readable series of words. -// -// It lower-cases everything with blank space as a word separator. -// -// NOTE: parts recognized as initialisms just keep their original casing. -// -// Examples: -// -// - "Hello, Swagger" becomes "hello swagger" -// - "HelloSwagger" or "Hello-Swagger" become "hello swagger" -func (m NameMangler) ToHumanNameLower(name string) string { - s := m.splitterWithPostSplit - in := s.split(name) - out := make([]string, 0, len(*in)) - - for _, w := range *in { - if !w.IsInitialism() { - out = append(out, lower(w.GetOriginal())) - } else { - out = append(out, trim(w.GetOriginal())) - } - } - - poolOfLexems.RedeemLexems(in) - - return strings.Join(out, " ") -} - -// ToHumanNameTitle represents a code name as a human-readable series of titleized words. -// -// It titleizes every word with blank space as a word separator. -// -// Examples: -// -// - "hello, Swagger" becomes "Hello Swagger" -// - "helloSwagger" becomes "Hello Swagger" -func (m NameMangler) ToHumanNameTitle(name string) string { - s := m.splitterWithPostSplit - in := s.split(name) - - out := make([]string, 0, len(*in)) - for _, w := range *in { - original := trim(w.GetOriginal()) - if !w.IsInitialism() { - out = append(out, m.Camelize(original)) - } else { - out = append(out, original) - } - } - poolOfLexems.RedeemLexems(in) - - return strings.Join(out, " ") -} - -// ToJSONName generates a camelized single-word version of a sentence. -// -// The output assembles every camelized word, but for the first word, which -// is lower-cased. -// -// Example: -// -// - "Hello_swagger" becomes "helloSwagger" -func (m NameMangler) ToJSONName(name string) string { - inptr := m.split(name) - in := *inptr - out := make([]string, 0, len(in)) - - for i, w := range in { - if i == 0 { - out = append(out, lower(w)) - continue - } - out = append(out, m.Camelize(trim(w))) - } - - poolOfStrings.RedeemStrings(inptr) - - return strings.Join(out, "") -} - -// ToVarName generates a legit unexported go variable name from a sentence. -// -// The generated name plays well with linters (see also [NameMangler.ToGoName]). -// -// Examples: -// -// - "Hello_swagger" becomes "helloSwagger" -// - "Http_server" becomes "httpServer" -// -// This name applies the same rules as [NameMangler.ToGoName] (legit exported variable), save the -// capitalization of the initial rune. -// -// Special case: when the initial part is a recognized as an initialism (like in the example above), -// the full part is lower-cased. -func (m NameMangler) ToVarName(name string) string { - return m.goIdentifier(name, false) -} - -// ToGoName generates a legit exported go variable name from a sentence. -// -// The generated name plays well with most linters. -// -// ToGoName abides by the go "exported" symbol rule starting with an upper-case letter. -// -// Examples: -// -// - "hello_swagger" becomes "HelloSwagger" -// - "Http_server" becomes "HTTPServer" -// -// # Edge cases -// -// Whenever the first rune is not eligible to upper case, a special prefix is prepended to the resulting name. -// By default this is simply "X" and you may customize this behavior using the [WithGoNamePrefixFunc] option. -// -// This happens when the first rune is not a letter, e.g. a digit, or a symbol that has no word transliteration -// (see also [WithReplaceFunc] about symbol transliterations), -// as well as for most East Asian or Devanagari runes, for which there is no such concept as upper-case. -// -// # Linting -// -// [revive], the successor of golint is the reference linter. -// -// This means that [NameMangler.ToGoName] supports the initialisms that revive checks (see also [DefaultInitialisms]). -// -// At this moment, there is no attempt to transliterate unicode into ascii, meaning that some linters -// (e.g. asciicheck, gosmopolitan) may croak on go identifiers generated from unicode input. -// -// [revive]: https://github.com/mgechev/revive -func (m NameMangler) ToGoName(name string) string { - return m.goIdentifier(name, true) -} - -func (m NameMangler) goIdentifier(name string, exported bool) string { - s := m.splitterWithPostSplit - lexems := s.split(name) - defer func() { - poolOfLexems.RedeemLexems(lexems) - }() - lexemes := *lexems - - if len(lexemes) == 0 { - return "" - } - - result := poolOfBuffers.BorrowBuffer(len(name)) - defer func() { - poolOfBuffers.RedeemBuffer(result) - }() - - firstPart := lexemes[0] - if !exported { - if ok := firstPart.WriteLower(result, true); !ok { - // NOTE: an initialism as the first part is lower-cased: no longer generates stuff like hTTPxyz. - // - // same prefixing rule applied to unexported variable as to an exported one, so that we have consistent - // names, whether the generated identifier is exported or not. - result.WriteString(strings.ToLower(m.prefixFunc()(name))) - result.WriteString(lexemes[0].GetOriginal()) - } - } else { - if ok := firstPart.WriteTitleized(result, true); !ok { - // "repairs" a lexeme that doesn't start with a letter to become - // the start a legit go name. The current strategy is very crude and simply adds a fixed prefix, - // e.g. "X". - // For instance "1_sesame_street" would be split into lexemes ["1", "sesame", "street"] and - // the first one ("1") would result in something like "X1" (with the default prefix function). - // - // NOTE: no longer forcing the first part to be fully upper-cased - result.WriteString(m.prefixFunc()(name)) - result.WriteString(lexemes[0].GetOriginal()) - } - } - - for _, lexem := range lexemes[1:] { - // NOTE: no longer forcing initialism parts to be fully upper-cased: - // * pluralized initialism preserve their trailing "s" - // * mixed-cased initialisms, such as IPv4, are preserved - if ok := lexem.WriteTitleized(result, false); !ok { - // it's not titleized: perhaps it's too short, perhaps the first rune is not a letter. - // write anyway - result.WriteString(lexem.GetOriginal()) - } - } - - return result.String() -} - -func (m *NameMangler) addInitialisms(words ...string) { - m.index.add(words...) - m.index.buildCache() -} - -// split calls the inner splitter. -func (m NameMangler) split(str string) *[]string { - s := m.splitter - lexems := s.split(str) - result := poolOfStrings.BorrowStrings() - - for _, lexem := range *lexems { - *result = append(*result, lexem.GetOriginal()) - } - poolOfLexems.RedeemLexems(lexems) - - return result -} diff --git a/vendor/github.com/go-openapi/swag/mangling/options.go b/vendor/github.com/go-openapi/swag/mangling/options.go deleted file mode 100644 index 3c92b2f18..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/options.go +++ /dev/null @@ -1,150 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -type ( - // PrefixFunc defines a safeguard rule (that may depend on the input string), to prefix - // a generated go name (in [NameMangler.ToGoName] and [NameMangler.ToVarName]). - // - // See [NameMangler.ToGoName] for more about which edge cases the prefix function covers. - PrefixFunc func(string) string - - // ReplaceFunc is a transliteration function to replace special runes by a word. - ReplaceFunc func(r rune) (string, bool) - - // Option to configure a [NameMangler]. - Option func(*options) - - options struct { - commonInitialisms []string - - goNamePrefixFunc PrefixFunc - goNamePrefixFuncPtr *PrefixFunc - replaceFunc func(r rune) (string, bool) - } -) - -func (o *options) prefixFunc() PrefixFunc { - if o.goNamePrefixFuncPtr != nil && *o.goNamePrefixFuncPtr != nil { - return *o.goNamePrefixFuncPtr - } - - return o.goNamePrefixFunc -} - -// WithGoNamePrefixFunc overrides the default prefix rule to safeguard generated go names. -// -// Example: -// -// This helps convert "123" into "{prefix}123" (a very crude strategy indeed, but it works). -// -// See [github.com/go-swagger/go-swagger/generator.DefaultFuncMap] for an example. -// -// The prefix function is assumed to return a string that starts with an upper case letter. -// -// The default is to prefix with "X". -// -// See [NameMangler.ToGoName] for more about which edge cases the prefix function covers. -func WithGoNamePrefixFunc(fn PrefixFunc) Option { - return func(o *options) { - o.goNamePrefixFunc = fn - } -} - -// WithGoNamePrefixFuncPtr is like [WithGoNamePrefixFunc] but it specifies a pointer to a function. -// -// [WithGoNamePrefixFunc] should be preferred in most situations. This option should only serve the -// purpose of handling special situations where the prefix function is not an internal variable -// (e.g. an exported package global). -// -// [WithGoNamePrefixFuncPtr] supersedes [WithGoNamePrefixFunc] if it also specified. -// -// If the provided pointer is nil or points to a nil value, this option has no effect. -// -// The caller should ensure that no undesirable concurrent changes are applied to the function pointed to. -func WithGoNamePrefixFuncPtr(ptr *PrefixFunc) Option { - return func(o *options) { - o.goNamePrefixFuncPtr = ptr - } -} - -// WithInitialisms declares the initialisms this mangler supports. -// -// This supersedes any pre-loaded defaults (see [DefaultInitialisms] for more about what initialisms are). -// -// It declares words to be recognized as "initialisms" (i.e. words that won't be camel cased or titled cased). -// -// Words must start with a (unicode) letter. If some don't, they are ignored. -// Words are either fully capitalized or mixed-cased. Lower-case only words are considered capitalized. -func WithInitialisms(words ...string) Option { - return func(o *options) { - o.commonInitialisms = words - } -} - -// WithAdditionalInitialisms adds new initialisms to the currently supported list (see [DefaultInitialisms]). -// -// The same sanitization rules apply as those described for [WithInitialisms]. -func WithAdditionalInitialisms(words ...string) Option { - return func(o *options) { - o.commonInitialisms = append(o.commonInitialisms, words...) - } -} - -// WithReplaceFunc specifies a custom transliteration function instead of the default. -// -// The default translates the following characters into words as follows: -// -// - '@' -> 'At' -// - '&' -> 'And' -// - '|' -> 'Pipe' -// - '$' -> 'Dollar' -// - '!' -> 'Bang' -// -// Notice that the outcome of a transliteration should always be titleized. -func WithReplaceFunc(fn ReplaceFunc) Option { - return func(o *options) { - o.replaceFunc = fn - } -} - -func defaultPrefixFunc(_ string) string { - return "X" -} - -// defaultReplaceTable finds a word representation for special characters. -func defaultReplaceTable(r rune) (string, bool) { - switch r { - case '@': - return "At ", true - case '&': - return "And ", true - case '|': - return "Pipe ", true - case '$': - return "Dollar ", true - case '!': - return "Bang ", true - case '-': - return "", true - case '_': - return "", true - default: - return "", false - } -} - -func optionsWithDefaults(opts []Option) options { - o := options{ - commonInitialisms: DefaultInitialisms(), - goNamePrefixFunc: defaultPrefixFunc, - replaceFunc: defaultReplaceTable, - } - - for _, apply := range opts { - apply(&o) - } - - return o -} diff --git a/vendor/github.com/go-openapi/swag/mangling/pools.go b/vendor/github.com/go-openapi/swag/mangling/pools.go deleted file mode 100644 index f81043514..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/pools.go +++ /dev/null @@ -1,123 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import ( - "bytes" - "sync" -) - -const maxAllocMatches = 8 - -type ( - // memory pools of temporary objects. - // - // These are used to recycle temporarily allocated objects - // and relieve the GC from undue pressure. - - matchesPool struct { - *sync.Pool - } - - buffersPool struct { - *sync.Pool - } - - lexemsPool struct { - *sync.Pool - } - - stringsPool struct { - *sync.Pool - } -) - -var ( - // poolOfMatches holds temporary slices for recycling during the initialism match process - poolOfMatches = matchesPool{ - Pool: &sync.Pool{ - New: func() any { - s := make(initialismMatches, 0, maxAllocMatches) - - return &s - }, - }, - } - - poolOfBuffers = buffersPool{ - Pool: &sync.Pool{ - New: func() any { - return new(bytes.Buffer) - }, - }, - } - - poolOfLexems = lexemsPool{ - Pool: &sync.Pool{ - New: func() any { - s := make([]nameLexem, 0, maxAllocMatches) - - return &s - }, - }, - } - - poolOfStrings = stringsPool{ - Pool: &sync.Pool{ - New: func() any { - s := make([]string, 0, maxAllocMatches) - - return &s - }, - }, - } -) - -func (p matchesPool) BorrowMatches() *initialismMatches { - s := p.Get().(*initialismMatches) - *s = (*s)[:0] // reset slice, keep allocated capacity - - return s -} - -func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer { - s := p.Get().(*bytes.Buffer) - s.Reset() - - if s.Cap() < size { - s.Grow(size) - } - - return s -} - -func (p lexemsPool) BorrowLexems() *[]nameLexem { - s := p.Get().(*[]nameLexem) - *s = (*s)[:0] // reset slice, keep allocated capacity - - return s -} - -func (p stringsPool) BorrowStrings() *[]string { - s := p.Get().(*[]string) - *s = (*s)[:0] // reset slice, keep allocated capacity - - return s -} - -func (p matchesPool) RedeemMatches(s *initialismMatches) { - p.Put(s) -} - -func (p buffersPool) RedeemBuffer(s *bytes.Buffer) { - p.Put(s) -} - -func (p lexemsPool) RedeemLexems(s *[]nameLexem) { - p.Put(s) -} - -func (p stringsPool) RedeemStrings(s *[]string) { - p.Put(s) -} diff --git a/vendor/github.com/go-openapi/swag/mangling/split.go b/vendor/github.com/go-openapi/swag/mangling/split.go deleted file mode 100644 index ed12ea256..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/split.go +++ /dev/null @@ -1,341 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import ( - "fmt" - "unicode" -) - -type splitterOption func(*splitter) - -// withPostSplitInitialismCheck allows to catch initialisms after main split process -func withPostSplitInitialismCheck(s *splitter) { - s.postSplitInitialismCheck = true -} - -func withReplaceFunc(fn ReplaceFunc) func(*splitter) { - return func(s *splitter) { - s.replaceFunc = fn - } -} - -func withInitialismsCache(c *initialismsCache) splitterOption { - return func(s *splitter) { - s.initialismsCache = c - } -} - -type ( - initialismMatch struct { - body []rune - start, end int - complete bool - hasPlural pluralForm - } - initialismMatches []initialismMatch -) - -// String representation of a match, e.g. for debugging. -func (m initialismMatch) String() string { - return fmt.Sprintf("{body: %s (%d), start: %d, end; %d, complete: %t, hasPlural: %v}", - string(m.body), len(m.body), m.start, m.end, m.complete, m.hasPlural, - ) -} - -func (m initialismMatch) isZero() bool { - return m.start == 0 && m.end == 0 -} - -type splitter struct { - *initialismsCache - - postSplitInitialismCheck bool - replaceFunc ReplaceFunc -} - -func newSplitter(options ...splitterOption) splitter { - var s splitter - - for _, option := range options { - option(&s) - } - - if s.replaceFunc == nil { - s.replaceFunc = defaultReplaceTable - } - - return s -} - -func (s splitter) split(name string) *[]nameLexem { - nameRunes := []rune(name) - matches := s.gatherInitialismMatches(nameRunes) - if matches == nil { - return poolOfLexems.BorrowLexems() - } - - return s.mapMatchesToNameLexems(nameRunes, matches) -} - -func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { - matches := poolOfMatches.BorrowMatches() - const minLenInitialism = 1 - if len(nameRunes) < minLenInitialism+1 { - // can't match initialism with 0 or 1 rune - return matches - } - - // first iteration - s.findMatches(matches, nameRunes, nameRunes[0], 0) - - for i, currentRune := range nameRunes[1:] { - currentRunePosition := i + 1 - // recycle allocations as we loop over runes - // with such recycling, only 2 slices should be allocated per call - // instead of o(n). - // - // BorrowMatches always yields slices with zero length (with some capacity) - newMatches := poolOfMatches.BorrowMatches() - - // check current initialism matches - for _, match := range *matches { - if keepCompleteMatch := match.complete; keepCompleteMatch { - // the match is already complete: keep it then move on to the next match - *newMatches = append(*newMatches, match) - continue - } - - if currentRunePosition-match.start == len(match.body) { - // unmatched: skip - continue - } - - // 1. by construction of the matches, we can't have currentRunePosition - match.start < 0 - // because matches have been computed with their start <= currentRunePosition in the previous - // iterations. - // 2. by construction of the matches, we can't have currentRunePosition - match.start >= len(match.body) - - currentMatchRune := match.body[currentRunePosition-match.start] - if currentMatchRune != currentRune { - // failed match, discard it then move on to the next match - continue - } - - // try to complete the current match - if currentRunePosition-match.start == len(match.body)-1 { - // we are close: the next step is to check the symbol ahead - // if it is a lowercase letter, then it is not the end of match - // but the beginning of the next word. - // - // NOTE(fredbi): this heuristic sometimes leads to counterintuitive splits and - // perhaps (not sure yet) we should check against case _alternance_. - // - // Example: - // - // In the current version, in the sentence "IDS initialism", "ID" is recognized as an initialism, - // leading to a split like "id_s_initialism" (or IDSInitialism), - // whereas in the sentence "IDx initialism", it is not and produces something like - // "i_d_x_initialism" (or IDxInitialism). The generated file name is not great. - // - // Both go identifiers are tolerated by linters. - // - // Notice that the slightly different input "IDs initialism" is correctly detected - // as a pluralized initialism and produces something like "ids_initialism" (or IDsInitialism). - - if currentRunePosition < len(nameRunes)-1 { // when before the last rune - nextRune := nameRunes[currentRunePosition+1] - - // recognize a plural form for this initialism (only simple english pluralization is supported). - if nextRune == 's' && match.hasPlural == simplePlural { - // detected a pluralized initialism - match.body = append(match.body, nextRune) - lookAhead := currentRunePosition + 1 - if lookAhead < len(nameRunes)-1 { - nextRune = nameRunes[lookAhead+1] - if newWord := unicode.IsLower(nextRune); newWord { - // it is the start of a new word. - // Match is only partial and the initialism is not recognized: - // move on to the next match, but do not advance the rune position - continue - } - } - - // this is a pluralized match: keep it - currentRunePosition++ - match.complete = true - match.hasPlural = simplePlural - match.end = currentRunePosition - *newMatches = append(*newMatches, match) - - // match is complete: keep it then move on to the next match - continue - } - - // other cases - // example: invariant plural such as "TLS" - if newWord := unicode.IsLower(nextRune); newWord { - // it is the start of a new word - // Match is only partial and the initialism is not recognized : move on - continue - } - } - - match.complete = true - match.end = currentRunePosition - } - - // append the ongoing matching attempt: it is not necessarily complete, but was successful so far. - // Let's see if it still matches on the next rune. - *newMatches = append(*newMatches, match) - } - - s.findMatches(newMatches, nameRunes, currentRune, currentRunePosition) - - poolOfMatches.RedeemMatches(matches) - matches = newMatches - } - - // it is up to the caller to redeem this last slice - return matches -} - -func (s splitter) findMatches(newMatches *initialismMatches, nameRunes []rune, currentRune rune, currentRunePosition int) { - // check for new initialism matches, based on the first character - for i, r := range s.initialismsRunes { - if r[0] != currentRune { - continue - } - - if currentRunePosition+len(r) > len(nameRunes) { - continue // not eligible: would spilll over the initial string - } - - // possible matches: all initialisms starting with the current rune and that can fit the given string (nameRunes) - *newMatches = append(*newMatches, initialismMatch{ - start: currentRunePosition, - body: r, - complete: false, - hasPlural: s.initialismsPluralForm[i], - }) - } -} - -func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { - nameLexems := poolOfLexems.BorrowLexems() - - var lastAcceptedMatch initialismMatch - for _, match := range *matches { - if !match.complete { - continue - } - - if firstMatch := lastAcceptedMatch.isZero(); firstMatch { - s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start]) - *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) - - lastAcceptedMatch = match - - continue - } - - if overlappedMatch := match.start <= lastAcceptedMatch.end; overlappedMatch { - continue - } - - middle := nameRunes[lastAcceptedMatch.end+1 : match.start] - s.appendBrokenDownCasualString(nameLexems, middle) - *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) - - lastAcceptedMatch = match - } - - // we have not found any accepted matches - if lastAcceptedMatch.isZero() { - *nameLexems = (*nameLexems)[:0] - s.appendBrokenDownCasualString(nameLexems, nameRunes) - } else if lastAcceptedMatch.end+1 != len(nameRunes) { - rest := nameRunes[lastAcceptedMatch.end+1:] - s.appendBrokenDownCasualString(nameLexems, rest) - } - - poolOfMatches.RedeemMatches(matches) - - return nameLexems -} - -func (s splitter) breakInitialism(original string) nameLexem { - return newInitialismNameLexem(original, original) -} - -func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) { - currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused - defer func() { - poolOfBuffers.RedeemBuffer(currentSegment) - }() - - addCasualNameLexem := func(original string) { - *segments = append(*segments, newCasualNameLexem(original)) - } - - addInitialismNameLexem := func(original, match string) { - *segments = append(*segments, newInitialismNameLexem(original, match)) - } - - var addNameLexem func(string) - if s.postSplitInitialismCheck { - addNameLexem = func(original string) { - for i := range s.initialisms { - if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) { - addInitialismNameLexem(original, s.initialisms[i]) - - return - } - } - - addCasualNameLexem(original) - } - } else { - addNameLexem = addCasualNameLexem - } - - // NOTE: (performance). The few remaining non-amortized allocations - // lay in the code below: using String() forces - for _, rn := range str { - if replace, found := s.replaceFunc(rn); found { - if currentSegment.Len() > 0 { - addNameLexem(currentSegment.String()) - currentSegment.Reset() - } - - if replace != "" { - addNameLexem(replace) - } - - continue - } - - if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) { - if currentSegment.Len() > 0 { - addNameLexem(currentSegment.String()) - currentSegment.Reset() - } - - continue - } - - if unicode.IsUpper(rn) { - if currentSegment.Len() > 0 { - addNameLexem(currentSegment.String()) - } - currentSegment.Reset() - } - - currentSegment.WriteRune(rn) - } - - if currentSegment.Len() > 0 { - addNameLexem(currentSegment.String()) - } -} diff --git a/vendor/github.com/go-openapi/swag/mangling/string_bytes.go b/vendor/github.com/go-openapi/swag/mangling/string_bytes.go deleted file mode 100644 index 28daaf72b..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/string_bytes.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import "unsafe" - -// hackStringBytes returns the (unsafe) underlying bytes slice of a string. -func hackStringBytes(str string) []byte { - return unsafe.Slice(unsafe.StringData(str), len(str)) -} diff --git a/vendor/github.com/go-openapi/swag/mangling/util.go b/vendor/github.com/go-openapi/swag/mangling/util.go deleted file mode 100644 index 0636417e3..000000000 --- a/vendor/github.com/go-openapi/swag/mangling/util.go +++ /dev/null @@ -1,118 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package mangling - -import ( - "strings" - "unicode" - "unicode/utf8" -) - -// Removes leading whitespaces -func trim(str string) string { return strings.TrimSpace(str) } - -// upper is strings.ToUpper() combined with trim -func upper(str string) string { - return strings.ToUpper(trim(str)) -} - -// lower is strings.ToLower() combined with trim -func lower(str string) string { - return strings.ToLower(trim(str)) -} - -// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but -// it ignores leading and trailing blank spaces in the compared -// string. -// -// base is assumed to be composed of upper-cased runes, and be already -// trimmed. -// -// This code is heavily inspired from strings.EqualFold. -func isEqualFoldIgnoreSpace(base []rune, str string) bool { - var i, baseIndex int - // equivalent to b := []byte(str), but without data copy - b := hackStringBytes(str) - - for i < len(b) { - if c := b[i]; c < utf8.RuneSelf { - // fast path for ASCII - if c != ' ' && c != '\t' { - break - } - i++ - - continue - } - - // unicode case - r, size := utf8.DecodeRune(b[i:]) - if !unicode.IsSpace(r) { - break - } - i += size - } - - if i >= len(b) { - return len(base) == 0 - } - - for _, baseRune := range base { - if i >= len(b) { - break - } - - if c := b[i]; c < utf8.RuneSelf { - // single byte rune case (ASCII) - if baseRune >= utf8.RuneSelf { - return false - } - - baseChar := byte(baseRune) - if c != baseChar && ((c < 'a') || (c > 'z') || (c-'a'+'A' != baseChar)) { - return false - } - - baseIndex++ - i++ - - continue - } - - // unicode case - r, size := utf8.DecodeRune(b[i:]) - if unicode.ToUpper(r) != baseRune { - return false - } - baseIndex++ - i += size - } - - if baseIndex != len(base) { - return false - } - - // all passed: now we should only have blanks - for i < len(b) { - if c := b[i]; c < utf8.RuneSelf { - // fast path for ASCII - if c != ' ' && c != '\t' { - return false - } - i++ - - continue - } - - // unicode case - r, size := utf8.DecodeRune(b[i:]) - if !unicode.IsSpace(r) { - return false - } - - i += size - } - - return true -} diff --git a/vendor/github.com/go-openapi/swag/mangling_iface.go b/vendor/github.com/go-openapi/swag/mangling_iface.go deleted file mode 100644 index 98b9a9992..000000000 --- a/vendor/github.com/go-openapi/swag/mangling_iface.go +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import "github.com/go-openapi/swag/mangling" - -// GoNamePrefixFunc sets an optional rule to prefix go names -// which do not start with a letter. -// -// GoNamePrefixFunc should not be written to while concurrently using the other mangling functions of this package. -// -// Deprecated: use [mangling.WithGoNamePrefixFunc] instead. -var GoNamePrefixFunc mangling.PrefixFunc - -// swagNameMangler is a global instance of the name mangler specifically alloted -// to support deprecated functions. -var swagNameMangler = mangling.NewNameMangler( - mangling.WithGoNamePrefixFuncPtr(&GoNamePrefixFunc), -) - -// AddInitialisms adds additional initialisms to the default list (see [mangling.DefaultInitialisms]). -// -// AddInitialisms is not safe to be called concurrently. -// -// Deprecated: use [mangling.WithAdditionalInitialisms] instead. -func AddInitialisms(words ...string) { - swagNameMangler.AddInitialisms(words...) -} - -// Camelize a single word. -// -// Deprecated: use [mangling.NameMangler.Camelize] instead. -func Camelize(word string) string { return swagNameMangler.Camelize(word) } - -// ToFileName lowercases and underscores a go type name. -// -// Deprecated: use [mangling.NameMangler.ToFileName] instead. -func ToFileName(name string) string { return swagNameMangler.ToFileName(name) } - -// ToCommandName lowercases and underscores a go type name. -// -// Deprecated: use [mangling.NameMangler.ToCommandName] instead. -func ToCommandName(name string) string { return swagNameMangler.ToCommandName(name) } - -// ToHumanNameLower represents a code name as a human series of words. -// -// Deprecated: use [mangling.NameMangler.ToHumanNameLower] instead. -func ToHumanNameLower(name string) string { return swagNameMangler.ToHumanNameLower(name) } - -// ToHumanNameTitle represents a code name as a human series of words with the first letters titleized. -// -// Deprecated: use [mangling.NameMangler.ToHumanNameTitle] instead. -func ToHumanNameTitle(name string) string { return swagNameMangler.ToHumanNameTitle(name) } - -// ToJSONName camel-cases a name which can be underscored or pascal-cased. -// -// Deprecated: use [mangling.NameMangler.ToJSONName] instead. -func ToJSONName(name string) string { return swagNameMangler.ToJSONName(name) } - -// ToVarName camel-cases a name which can be underscored or pascal-cased. -// -// Deprecated: use [mangling.NameMangler.ToVarName] instead. -func ToVarName(name string) string { return swagNameMangler.ToVarName(name) } - -// ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes. -// -// Deprecated: use [mangling.NameMangler.ToGoName] instead. -func ToGoName(name string) string { return swagNameMangler.ToGoName(name) } diff --git a/vendor/github.com/go-openapi/swag/netutils/LICENSE b/vendor/github.com/go-openapi/swag/netutils/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/netutils/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/netutils/doc.go b/vendor/github.com/go-openapi/swag/netutils/doc.go deleted file mode 100644 index 74282f8e5..000000000 --- a/vendor/github.com/go-openapi/swag/netutils/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package netutils provides helpers for network-related tasks. -package netutils diff --git a/vendor/github.com/go-openapi/swag/netutils/net.go b/vendor/github.com/go-openapi/swag/netutils/net.go deleted file mode 100644 index 82a1544af..000000000 --- a/vendor/github.com/go-openapi/swag/netutils/net.go +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package netutils - -import ( - "net" - "strconv" -) - -// SplitHostPort splits a network address into a host and a port. -// -// The difference with the standard net.SplitHostPort is that the port is converted to an int. -// -// The port is -1 when there is no port to be found. -func SplitHostPort(addr string) (host string, port int, err error) { - h, p, err := net.SplitHostPort(addr) - if err != nil { - return "", -1, err - } - if p == "" { - return "", -1, &net.AddrError{Err: "missing port in address", Addr: addr} - } - - pi, err := strconv.Atoi(p) - if err != nil { - return "", -1, err - } - - return h, pi, nil -} diff --git a/vendor/github.com/go-openapi/swag/netutils_iface.go b/vendor/github.com/go-openapi/swag/netutils_iface.go deleted file mode 100644 index d658de25b..000000000 --- a/vendor/github.com/go-openapi/swag/netutils_iface.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import "github.com/go-openapi/swag/netutils" - -// SplitHostPort splits a network address into a host and a port. -// -// Deprecated: use [netutils.SplitHostPort] instead. -func SplitHostPort(addr string) (host string, port int, err error) { - return netutils.SplitHostPort(addr) -} diff --git a/vendor/github.com/go-openapi/swag/stringutils/LICENSE b/vendor/github.com/go-openapi/swag/stringutils/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/stringutils/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/stringutils/collection_formats.go b/vendor/github.com/go-openapi/swag/stringutils/collection_formats.go deleted file mode 100644 index 28056ad25..000000000 --- a/vendor/github.com/go-openapi/swag/stringutils/collection_formats.go +++ /dev/null @@ -1,74 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package stringutils - -import "strings" - -const ( - // collectionFormatComma = "csv" - collectionFormatSpace = "ssv" - collectionFormatTab = "tsv" - collectionFormatPipe = "pipes" - collectionFormatMulti = "multi" - - collectionFormatDefaultSep = "," -) - -// JoinByFormat joins a string array by a known format (e.g. swagger's collectionFormat attribute): -// -// ssv: space separated value -// tsv: tab separated value -// pipes: pipe (|) separated value -// csv: comma separated value (default) -func JoinByFormat(data []string, format string) []string { - if len(data) == 0 { - return data - } - var sep string - switch format { - case collectionFormatSpace: - sep = " " - case collectionFormatTab: - sep = "\t" - case collectionFormatPipe: - sep = "|" - case collectionFormatMulti: - return data - default: - sep = collectionFormatDefaultSep - } - return []string{strings.Join(data, sep)} -} - -// SplitByFormat splits a string by a known format: -// -// ssv: space separated value -// tsv: tab separated value -// pipes: pipe (|) separated value -// csv: comma separated value (default) -func SplitByFormat(data, format string) []string { - if data == "" { - return nil - } - var sep string - switch format { - case collectionFormatSpace: - sep = " " - case collectionFormatTab: - sep = "\t" - case collectionFormatPipe: - sep = "|" - case collectionFormatMulti: - return nil - default: - sep = collectionFormatDefaultSep - } - var result []string - for _, s := range strings.Split(data, sep) { - if ts := strings.TrimSpace(s); ts != "" { - result = append(result, ts) - } - } - return result -} diff --git a/vendor/github.com/go-openapi/swag/stringutils/doc.go b/vendor/github.com/go-openapi/swag/stringutils/doc.go deleted file mode 100644 index c6d17a116..000000000 --- a/vendor/github.com/go-openapi/swag/stringutils/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package stringutils exposes helpers to search and process strings. -package stringutils diff --git a/vendor/github.com/go-openapi/swag/stringutils/strings.go b/vendor/github.com/go-openapi/swag/stringutils/strings.go deleted file mode 100644 index cd792b7d0..000000000 --- a/vendor/github.com/go-openapi/swag/stringutils/strings.go +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package stringutils - -import ( - "slices" - "strings" -) - -// ContainsStrings searches a slice of strings for a case-sensitive match -// -// Now equivalent to the standard library [slice.Contains]. -func ContainsStrings(coll []string, item string) bool { - return slices.Contains(coll, item) -} - -// ContainsStringsCI searches a slice of strings for a case-insensitive match -func ContainsStringsCI(coll []string, item string) bool { - return slices.ContainsFunc(coll, func(e string) bool { - return strings.EqualFold(e, item) - }) -} diff --git a/vendor/github.com/go-openapi/swag/stringutils_iface.go b/vendor/github.com/go-openapi/swag/stringutils_iface.go deleted file mode 100644 index dbfa48484..000000000 --- a/vendor/github.com/go-openapi/swag/stringutils_iface.go +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import "github.com/go-openapi/swag/stringutils" - -// ContainsStrings searches a slice of strings for a case-sensitive match. -// -// Deprecated: use [slices.Contains] or [stringutils.ContainsStrings] instead. -func ContainsStrings(coll []string, item string) bool { - return stringutils.ContainsStrings(coll, item) -} - -// ContainsStringsCI searches a slice of strings for a case-insensitive match. -// -// Deprecated: use [stringutils.ContainsStringsCI] instead. -func ContainsStringsCI(coll []string, item string) bool { - return stringutils.ContainsStringsCI(coll, item) -} - -// JoinByFormat joins a string array by a known format (e.g. swagger's collectionFormat attribute). -// -// Deprecated: use [stringutils.JoinByFormat] instead. -func JoinByFormat(data []string, format string) []string { - return stringutils.JoinByFormat(data, format) -} - -// SplitByFormat splits a string by a known format. -// -// Deprecated: use [stringutils.SplitByFormat] instead. -func SplitByFormat(data, format string) []string { - return stringutils.SplitByFormat(data, format) -} diff --git a/vendor/github.com/go-openapi/swag/typeutils_iface.go b/vendor/github.com/go-openapi/swag/typeutils_iface.go deleted file mode 100644 index b63813ea4..000000000 --- a/vendor/github.com/go-openapi/swag/typeutils_iface.go +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import "github.com/go-openapi/swag/typeutils" - -// IsZero returns true when the value passed into the function is a zero value. -// This allows for safer checking of interface values. -// -// Deprecated: use [typeutils.IsZero] instead. -func IsZero(data any) bool { return typeutils.IsZero(data) } diff --git a/vendor/github.com/go-openapi/swag/yamlutils/LICENSE b/vendor/github.com/go-openapi/swag/yamlutils/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/go-openapi/swag/yamlutils/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/github.com/go-openapi/swag/yamlutils/doc.go b/vendor/github.com/go-openapi/swag/yamlutils/doc.go deleted file mode 100644 index 7bb92a82f..000000000 --- a/vendor/github.com/go-openapi/swag/yamlutils/doc.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -// Package yamlutils provides utilities to work with YAML documents. -// -// - [BytesToYAMLDoc] to construct a [yaml.Node] document -// - [YAMLToJSON] to convert a [yaml.Node] document to JSON bytes -// - [YAMLMapSlice] to serialize and deserialize YAML with the order of keys maintained -package yamlutils - -import ( - _ "go.yaml.in/yaml/v3" // for documentation purpose only -) diff --git a/vendor/github.com/go-openapi/swag/yamlutils/errors.go b/vendor/github.com/go-openapi/swag/yamlutils/errors.go deleted file mode 100644 index e87bc5e8b..000000000 --- a/vendor/github.com/go-openapi/swag/yamlutils/errors.go +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package yamlutils - -type yamlError string - -const ( - // ErrYAML is an error raised by YAML utilities - ErrYAML yamlError = "yaml error" -) - -func (e yamlError) Error() string { - return string(e) -} diff --git a/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go b/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go deleted file mode 100644 index 24d951f8d..000000000 --- a/vendor/github.com/go-openapi/swag/yamlutils/ordered_map.go +++ /dev/null @@ -1,335 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package yamlutils - -import ( - "fmt" - "iter" - "slices" - "sort" - "strconv" - - "github.com/go-openapi/swag/conv" - "github.com/go-openapi/swag/jsonutils" - "github.com/go-openapi/swag/jsonutils/adapters/ifaces" - "github.com/go-openapi/swag/typeutils" - yaml "go.yaml.in/yaml/v3" -) - -var ( - _ yaml.Marshaler = YAMLMapSlice{} - _ yaml.Unmarshaler = &YAMLMapSlice{} -) - -// YAMLMapSlice represents a YAML object, with the order of keys maintained. -// -// It is similar to [jsonutils.JSONMapSlice] and also knows how to marshal and unmarshal YAML. -// -// It behaves like an ordered map, but keys can't be accessed in constant time. -type YAMLMapSlice []YAMLMapItem - -// YAMLMapItem represents the value of a key in a YAML object held by [YAMLMapSlice]. -// -// It is entirely equivalent to [jsonutils.JSONMapItem], with the same limitation that -// you should not Marshal or Unmarshal directly this type, outside of a [YAMLMapSlice]. -type YAMLMapItem = jsonutils.JSONMapItem - -func (s YAMLMapSlice) OrderedItems() iter.Seq2[string, any] { - return func(yield func(string, any) bool) { - for _, item := range s { - if !yield(item.Key, item.Value) { - return - } - } - } -} - -// SetOrderedItems implements [ifaces.SetOrdered]: it merges keys passed by the iterator argument -// into the [YAMLMapSlice]. -func (s *YAMLMapSlice) SetOrderedItems(items iter.Seq2[string, any]) { - if items == nil { - // force receiver to be a nil slice - *s = nil - - return - } - - m := *s - if len(m) > 0 { - // update mode: short-circuited when unmarshaling fresh data structures - idx := make(map[string]int, len(m)) - - for i, item := range m { - idx[item.Key] = i - } - - for k, v := range items { - idx, ok := idx[k] - if ok { - m[idx].Value = v - - continue - } - - m = append(m, YAMLMapItem{Key: k, Value: v}) - } - - *s = m - - return - } - - for k, v := range items { - m = append(m, YAMLMapItem{Key: k, Value: v}) - } - - *s = m -} - -// MarshalJSON renders this YAML object as JSON bytes. -// -// The difference with standard JSON marshaling is that the order of keys is maintained. -func (s YAMLMapSlice) MarshalJSON() ([]byte, error) { - return jsonutils.JSONMapSlice(s).MarshalJSON() -} - -// UnmarshalJSON builds this YAML object from JSON bytes. -// -// The difference with standard JSON marshaling is that the order of keys is maintained. -func (s *YAMLMapSlice) UnmarshalJSON(data []byte) error { - js := jsonutils.JSONMapSlice(*s) - - if err := js.UnmarshalJSON(data); err != nil { - return err - } - - *s = YAMLMapSlice(js) - - return nil -} - -// MarshalYAML produces a YAML document as bytes -// -// The difference with standard YAML marshaling is that the order of keys is maintained. -// -// It implements [yaml.Marshaler]. -func (s YAMLMapSlice) MarshalYAML() (any, error) { - if typeutils.IsNil(s) { - return []byte("null\n"), nil - } - var n yaml.Node - n.Kind = yaml.DocumentNode - var nodes []*yaml.Node - - for _, item := range s { - nn, err := json2yaml(item.Value, 1) - if err != nil { - return nil, err - } - - ns := []*yaml.Node{ - { - Kind: yaml.ScalarNode, - Tag: yamlStringScalar, - Value: item.Key, - }, - nn, - } - nodes = append(nodes, ns...) - } - - n.Content = []*yaml.Node{ - { - Kind: yaml.MappingNode, - Content: nodes, - }, - } - - return yaml.Marshal(&n) -} - -// UnmarshalYAML builds a YAMLMapSlice object from a YAML document [yaml.Node]. -// -// It implements [yaml.Unmarshaler]. -func (s *YAMLMapSlice) UnmarshalYAML(node *yaml.Node) error { - return s.unmarshalYAML(newYAMLWalker(), node, 0) -} - -// unmarshalYAML builds the slice from a [yaml.Node], tracking the recursion depth (against -// stack-overflow) and threading the [yamlWalker] so anchor/alias expansion stays bounded -// across the whole document. -func (s *YAMLMapSlice) unmarshalYAML(w *yamlWalker, node *yaml.Node, depth int) error { - if depth > defaultMaxNestingDepth { - return errMaxNestingDepth - } - - if typeutils.IsNil(*s) { - // allow to unmarshal with a simple var declaration (nil slice) - *s = YAMLMapSlice{} - } - if node == nil { - *s = nil - return nil - } - - const sensibleAllocDivider = 2 - m := slices.Grow(*s, len(node.Content)/sensibleAllocDivider) - m = m[:0] - - for i := 0; i < len(node.Content); i += 2 { - if err := w.account(); err != nil { // account the key node - return err - } - - var nmi YAMLMapItem - k, err := yamlStringScalarC(node.Content[i]) - if err != nil { - return fmt.Errorf("unable to decode YAML map key: %w: %w", err, ErrYAML) - } - nmi.Key = k - v, err := w.node(node.Content[i+1], depth+1) - if err != nil { - return fmt.Errorf("unable to process YAML map value for key %q: %w: %w", k, err, ErrYAML) - } - nmi.Value = v - m = append(m, nmi) - } - - *s = m - - return nil -} - -func json2yaml(item any, depth int) (*yaml.Node, error) { - if depth > defaultMaxNestingDepth { - return nil, errMaxNestingDepth - } - - if typeutils.IsNil(item) { - return &yaml.Node{ - Kind: yaml.ScalarNode, - Value: "null", - }, nil - } - - switch val := item.(type) { - case ifaces.Ordered: - return orderedYAML(val, depth) - - case map[string]any: - var n yaml.Node - n.Kind = yaml.MappingNode - keys := make([]string, 0, len(val)) - for k := range val { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, k := range keys { - v := val[k] - childNode, err := json2yaml(v, depth+1) - if err != nil { - return nil, err - } - n.Content = append(n.Content, &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlStringScalar, - Value: k, - }, childNode) - } - return &n, nil - - case []any: - var n yaml.Node - n.Kind = yaml.SequenceNode - for i := range val { - childNode, err := json2yaml(val[i], depth+1) - if err != nil { - return nil, err - } - n.Content = append(n.Content, childNode) - } - return &n, nil - case string: - return &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlStringScalar, - Value: val, - }, nil - case float32: - return floatNode(val) - case float64: - return floatNode(val) - case int: - return integerNode(val) - case int8: - return integerNode(val) - case int16: - return integerNode(val) - case int32: - return integerNode(val) - case int64: - return integerNode(val) - case uint: - return uintegerNode(val) - case uint8: - return uintegerNode(val) - case uint16: - return uintegerNode(val) - case uint32: - return uintegerNode(val) - case uint64: - return uintegerNode(val) - case bool: - return &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlBoolScalar, - Value: strconv.FormatBool(val), - }, nil - default: - return nil, fmt.Errorf("unhandled type: %T: %w", val, ErrYAML) - } -} - -func floatNode[T conv.Float](val T) (*yaml.Node, error) { - return &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlFloatScalar, - Value: conv.FormatFloat(val), - }, nil -} - -func integerNode[T conv.Signed](val T) (*yaml.Node, error) { - return &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlIntScalar, - Value: conv.FormatInteger(val), - }, nil -} - -func uintegerNode[T conv.Unsigned](val T) (*yaml.Node, error) { - return &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlIntScalar, - Value: conv.FormatUinteger(val), - }, nil -} - -func orderedYAML[T ifaces.Ordered](val T, depth int) (*yaml.Node, error) { - var n yaml.Node - n.Kind = yaml.MappingNode - for key, value := range val.OrderedItems() { - childNode, err := json2yaml(value, depth+1) - if err != nil { - return nil, err - } - - n.Content = append(n.Content, &yaml.Node{ - Kind: yaml.ScalarNode, - Tag: yamlStringScalar, - Value: key, - }, childNode) - } - return &n, nil -} diff --git a/vendor/github.com/go-openapi/swag/yamlutils/yaml.go b/vendor/github.com/go-openapi/swag/yamlutils/yaml.go deleted file mode 100644 index d4b5335f6..000000000 --- a/vendor/github.com/go-openapi/swag/yamlutils/yaml.go +++ /dev/null @@ -1,328 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package yamlutils - -import ( - json "encoding/json" - "fmt" - "strconv" - - "github.com/go-openapi/swag/jsonutils" - yaml "go.yaml.in/yaml/v3" -) - -// defaultMaxNestingDepth caps the recursion depth of the YAML<->JSON transforms to -// guard against stack-overflow on deeply nested (possibly adversarial) input. -// -// It matches the limit enforced by go.yaml.in/yaml/v3's own parser and by -// encoding/json's decoder. -const defaultMaxNestingDepth = 10000 - -// Bounds on YAML anchor/alias expansion. -// -// go.yaml.in/yaml/v3 enforces these when decoding into Go values, but that guard is -// coupled to the library's own tree walk: when we decode into a low-level [yaml.Node] -// (to preserve key order) and expand aliases ourselves in [yamlWalker.node], we bypass -// it. We therefore reproduce it here, with the same constants and ratio schedule as the -// library's decoder (see go.yaml.in/yaml/v3 decode.go, "excessive aliasing"). -const ( - aliasCountThreshold = 100 - decodeCountThreshold = 1000 - - // 400,000 decode operations is ~500kb of dense object declarations, or - // ~5kb of dense object declarations with 10000% alias expansion. - aliasRatioRangeLow = 400000 - // 4,000,000 decode operations is ~5MB of dense object declarations. - aliasRatioRangeHigh = 4000000 - aliasRatioRange = float64(aliasRatioRangeHigh - aliasRatioRangeLow) - - // tolerated share of alias-driven decodes: from aliasRatioSmall (small/medium documents) - // down to aliasRatioLarge (very large ones), interpolated with slope aliasRatioSlope. - aliasRatioSmall = 0.99 - aliasRatioLarge = 0.10 - aliasRatioSlope = aliasRatioSmall - aliasRatioLarge -) - -var ( - // errMaxNestingDepth is returned when a document nests deeper than [defaultMaxNestingDepth]. - errMaxNestingDepth = fmt.Errorf("maximum nesting depth of %d exceeded: %w", defaultMaxNestingDepth, ErrYAML) - - // errExcessiveAliasing is returned when anchor/alias expansion is disproportionate to the - // size of the document, i.e. an "alias bomb". - errExcessiveAliasing = fmt.Errorf("document contains excessive aliasing: %w", ErrYAML) -) - -// allowedAliasRatio scales the tolerated share of alias-driven decode operations from 99% -// for small-to-medium documents down to 10% for very large ones, mirroring go.yaml.in/yaml/v3. -func allowedAliasRatio(decodeCount int) float64 { - switch { - case decodeCount <= aliasRatioRangeLow: - return aliasRatioSmall - case decodeCount >= aliasRatioRangeHigh: - return aliasRatioLarge - default: - return aliasRatioSmall - aliasRatioSlope*(float64(decodeCount-aliasRatioRangeLow)/aliasRatioRange) - } -} - -// yamlWalker carries the state needed to bound a single YAML-tree traversal: -// anchor/alias expansion accounting and cycle detection. -// -// A fresh walker is created per top-level conversion; it is threaded (not copied) through -// the whole recursive walk so its counters accumulate across the entire document. -type yamlWalker struct { - decodeCount int - aliasCount int - aliasDepth int - aliases map[*yaml.Node]bool // anchors currently being expanded, for cycle detection -} - -func newYAMLWalker() *yamlWalker { - return &yamlWalker{aliases: make(map[*yaml.Node]bool)} -} - -// account records one processed node and fails if alias expansion has become excessive. -func (w *yamlWalker) account() error { - w.decodeCount++ - if w.aliasDepth > 0 { - w.aliasCount++ - } - - if w.aliasCount > aliasCountThreshold && - w.decodeCount > decodeCountThreshold && - float64(w.aliasCount)/float64(w.decodeCount) > allowedAliasRatio(w.decodeCount) { - return errExcessiveAliasing - } - - return nil -} - -// YAMLToJSON converts a YAML document into JSON bytes. -// -// Note: a YAML document is the output from a [yaml.Marshaler], e.g a pointer to a [yaml.Node]. -// -// [YAMLToJSON] is typically called after [BytesToYAMLDoc]. -func YAMLToJSON(value any) (json.RawMessage, error) { - jm, err := transformData(value, 0) - if err != nil { - return nil, err - } - - b, err := jsonutils.WriteJSON(jm) - - return json.RawMessage(b), err -} - -// BytesToYAMLDoc converts a byte slice into a YAML document. -// -// This function only supports root documents that are objects. -// -// A YAML document is a pointer to a [yaml.Node]. -func BytesToYAMLDoc(data []byte) (any, error) { - var document yaml.Node // preserve order that is present in the document - if err := yaml.Unmarshal(data, &document); err != nil { - return nil, err - } - if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode { - return nil, fmt.Errorf("only YAML documents that are objects are supported: %w", ErrYAML) - } - return &document, nil -} - -func (w *yamlWalker) node(root *yaml.Node, depth int) (any, error) { - if depth > defaultMaxNestingDepth { - return nil, errMaxNestingDepth - } - if err := w.account(); err != nil { - return nil, err - } - - switch root.Kind { - case yaml.DocumentNode: - return w.document(root, depth) - case yaml.SequenceNode: - return w.sequence(root, depth) - case yaml.MappingNode: - return w.mapping(root, depth) - case yaml.ScalarNode: - return yamlScalar(root) - case yaml.AliasNode: - return w.alias(root, depth) - default: - return nil, fmt.Errorf("unsupported YAML node type: %v: %w", root.Kind, ErrYAML) - } -} - -// alias resolves an anchor reference, expanding the anchored subtree. It detects cycles -// (an anchor whose expansion transitively references itself) and accounts the expansion -// against the alias-bomb budget via [yamlWalker.aliasDepth]. -func (w *yamlWalker) alias(node *yaml.Node, depth int) (any, error) { - if node.Alias == nil { - return nil, fmt.Errorf("invalid YAML alias node %q: %w", node.Value, ErrYAML) - } - if w.aliases[node.Alias] { - return nil, fmt.Errorf("anchor %q contains itself: %w", node.Value, ErrYAML) - } - - w.aliases[node.Alias] = true - w.aliasDepth++ - out, err := w.node(node.Alias, depth+1) - w.aliasDepth-- - delete(w.aliases, node.Alias) - - return out, err -} - -func (w *yamlWalker) document(node *yaml.Node, depth int) (any, error) { - if len(node.Content) != 1 { - return nil, fmt.Errorf("unexpected YAML Document node content length: %d: %w", len(node.Content), ErrYAML) - } - return w.node(node.Content[0], depth+1) -} - -func (w *yamlWalker) mapping(node *yaml.Node, depth int) (any, error) { - const sensibleAllocDivider = 2 // nodes concatenate (key,value) sequences - m := make(YAMLMapSlice, len(node.Content)/sensibleAllocDivider) - - if err := m.unmarshalYAML(w, node, depth); err != nil { - return nil, err - } - - return m, nil -} - -func (w *yamlWalker) sequence(node *yaml.Node, depth int) (any, error) { - s := make([]any, 0) - - for i := range len(node.Content) { - v, err := w.node(node.Content[i], depth+1) - if err != nil { - return nil, fmt.Errorf("unable to decode YAML sequence value: %w: %w", err, ErrYAML) - } - s = append(s, v) - } - return s, nil -} - -const ( // See https://yaml.org/type/ - yamlStringScalar = "tag:yaml.org,2002:str" - yamlIntScalar = "tag:yaml.org,2002:int" - yamlBoolScalar = "tag:yaml.org,2002:bool" - yamlFloatScalar = "tag:yaml.org,2002:float" - yamlTimestamp = "tag:yaml.org,2002:timestamp" - yamlNull = "tag:yaml.org,2002:null" -) - -func yamlScalar(node *yaml.Node) (any, error) { - switch node.LongTag() { - case yamlStringScalar: - return node.Value, nil - case yamlBoolScalar: - b, err := strconv.ParseBool(node.Value) - if err != nil { - return nil, fmt.Errorf("unable to process scalar node. Got %q. Expecting bool content: %w: %w", node.Value, err, ErrYAML) - } - return b, nil - case yamlIntScalar: - i, err := strconv.ParseInt(node.Value, 10, 64) - if err != nil { - return nil, fmt.Errorf("unable to process scalar node. Got %q. Expecting integer content: %w: %w", node.Value, err, ErrYAML) - } - return i, nil - case yamlFloatScalar: - f, err := strconv.ParseFloat(node.Value, 64) - if err != nil { - return nil, fmt.Errorf("unable to process scalar node. Got %q. Expecting float content: %w: %w", node.Value, err, ErrYAML) - } - return f, nil - case yamlTimestamp: - // YAML timestamp is marshaled as string, not time - return node.Value, nil - case yamlNull: - return nil, nil //nolint:nilnil - default: - return nil, fmt.Errorf("YAML tag %q is not supported: %w", node.LongTag(), ErrYAML) - } -} - -func yamlStringScalarC(node *yaml.Node) (string, error) { - if node.Kind != yaml.ScalarNode { - return "", fmt.Errorf("expecting a string scalar but got %q: %w", node.Kind, ErrYAML) - } - switch node.LongTag() { - case yamlStringScalar, yamlIntScalar, yamlFloatScalar: - return node.Value, nil - default: - return "", fmt.Errorf("YAML tag %q is not supported as map key: %w", node.LongTag(), ErrYAML) - } -} - -func format(t any) (string, error) { - switch k := t.(type) { - case string: - return k, nil - case uint: - return strconv.FormatUint(uint64(k), 10), nil - case uint8: - return strconv.FormatUint(uint64(k), 10), nil - case uint16: - return strconv.FormatUint(uint64(k), 10), nil - case uint32: - return strconv.FormatUint(uint64(k), 10), nil - case uint64: - return strconv.FormatUint(k, 10), nil - case int: - return strconv.Itoa(k), nil - case int8: - return strconv.FormatInt(int64(k), 10), nil - case int16: - return strconv.FormatInt(int64(k), 10), nil - case int32: - return strconv.FormatInt(int64(k), 10), nil - case int64: - return strconv.FormatInt(k, 10), nil - default: - return "", fmt.Errorf("unexpected map key type, got: %T: %w", k, ErrYAML) - } -} - -func transformData(input any, depth int) (out any, err error) { - if depth > defaultMaxNestingDepth { - return nil, errMaxNestingDepth - } - - switch in := input.(type) { - case yaml.Node: - return newYAMLWalker().node(&in, depth) - case *yaml.Node: - return newYAMLWalker().node(in, depth) - case map[any]any: - o := make(YAMLMapSlice, 0, len(in)) - for ke, va := range in { - var nmi YAMLMapItem - if nmi.Key, err = format(ke); err != nil { - return nil, err - } - - v, ert := transformData(va, depth+1) - if ert != nil { - return nil, ert - } - nmi.Value = v - o = append(o, nmi) - } - return o, nil - case []any: - len1 := len(in) - o := make([]any, len1) - for i := range len1 { - o[i], err = transformData(in[i], depth+1) - if err != nil { - return nil, err - } - } - return o, nil - } - return input, nil -} diff --git a/vendor/github.com/go-openapi/swag/yamlutils_iface.go b/vendor/github.com/go-openapi/swag/yamlutils_iface.go deleted file mode 100644 index 57767efc5..000000000 --- a/vendor/github.com/go-openapi/swag/yamlutils_iface.go +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers -// SPDX-License-Identifier: Apache-2.0 - -package swag - -import ( - "encoding/json" - - "github.com/go-openapi/swag/yamlutils" -) - -// YAMLToJSON converts YAML unmarshaled data into json compatible data -// -// Deprecated: use [yamlutils.YAMLToJSON] instead. -func YAMLToJSON(data any) (json.RawMessage, error) { return yamlutils.YAMLToJSON(data) } - -// BytesToYAMLDoc converts a byte slice into a YAML document -// -// Deprecated: use [yamlutils.BytesToYAMLDoc] instead. -func BytesToYAMLDoc(data []byte) (any, error) { return yamlutils.BytesToYAMLDoc(data) } diff --git a/vendor/github.com/longhorn/go-common-libs/ns/sys.go b/vendor/github.com/longhorn/go-common-libs/ns/sys.go index b224a9bc1..56b89e535 100644 --- a/vendor/github.com/longhorn/go-common-libs/ns/sys.go +++ b/vendor/github.com/longhorn/go-common-libs/ns/sys.go @@ -146,3 +146,28 @@ func ResolveBlockDeviceToPhysicalDevice(blockDevice string) (result string, err } return result, nil } + +// FindBlockDeviceForPath switches to the host namespace and returns the block +// device backing the filesystem that contains the given path. The path does not +// need to be a mount point. +func FindBlockDeviceForPath(path string) (result string, err error) { + defer func() { + err = errors.Wrapf(err, "failed to find block device for path %s", path) + }() + + fn := func() (any, error) { + return sys.FindBlockDeviceForPath(path) + } + + rawResult, err := RunFunc(fn, 0) + if err != nil { + return "", err + } + + var ableToCast bool + result, ableToCast = rawResult.(string) + if !ableToCast { + return "", errors.Errorf(types.ErrNamespaceCastResultFmt, result, rawResult) + } + return result, nil +} diff --git a/vendor/github.com/longhorn/go-common-libs/sys/device.go b/vendor/github.com/longhorn/go-common-libs/sys/device.go index 62ed18c27..4ea90cd95 100644 --- a/vendor/github.com/longhorn/go-common-libs/sys/device.go +++ b/vendor/github.com/longhorn/go-common-libs/sys/device.go @@ -6,6 +6,8 @@ import ( "os" "path/filepath" "regexp" + "slices" + "strconv" "strings" "syscall" @@ -18,6 +20,345 @@ func FindBlockDeviceForMount(mountPath string) (string, error) { return findBlockDeviceForMountWithDeps(mountPath, "/proc/mounts", findBlockDeviceByMajorMinor) } +// maxStackedDeviceDepth bounds how many stacked device layers (e.g. LVM on top +// of dm-crypt, or a partitioned md array) FindBlockDeviceForPath follows. +const maxStackedDeviceDepth = 8 + +// Mocked in tests. +var ( + sysfsDir = "/sys" + // The mount table of the calling thread rather than of the process, as + // they differ once the thread has joined another mount namespace. + mountInfoPath = "/proc/thread-self/mountinfo" + filesystemsPath = "/proc/filesystems" + statBlockDev = statBlockDeviceNumber + statMountID = getMountID + readMounts = readMountInfo +) + +// mountInfoReadAttempts bounds how many times the mount table is read when the +// mount looked up is missing from it. +const mountInfoReadAttempts = 3 + +// statBlockDeviceNumber returns the device number of the block device file at +// path. +func statBlockDeviceNumber(path string) (uint64, error) { + var st unix.Stat_t + if err := unix.Stat(path, &st); err != nil { + return 0, err + } + // The types of Stat_t.Mode and Stat_t.Rdev differ between platforms. + if uint32(st.Mode)&unix.S_IFMT != unix.S_IFBLK { // nolint: unconvert + return 0, fmt.Errorf("%s is not a block device", path) + } + return uint64(st.Rdev), nil // nolint: unconvert +} + +// mountInfo is an entry of /proc//mountinfo. +type mountInfo struct { + id string + devNum string // ":" of the mounted filesystem + mountPoint string + fsType string + source string +} + +// FindBlockDeviceForPath returns the block device (e.g. /dev/sdb1) backing the +// filesystem that contains the given path. Unlike FindBlockDeviceForMount, the +// path does not need to be a mount point: like findmnt --target, it is resolved +// through the mount containing it, so it can be any file or directory. +// +// The mount is resolved to a block device through its device number, or +// through its source for filesystems such as btrfs that use an anonymous +// device number but need a block device. Only the device the filesystem is +// mounted from is considered, so a btrfs filesystem spanning multiple devices +// is reported as being on that device. +// +// A stacked device (e.g. an LVM logical volume or dm-crypt device) is resolved +// to its underlying device as long as each layer has exactly one. A partition +// of a stacked device (e.g. /dev/md0p1) is resolved through the device it +// belongs to, while a partition of a plain disk (e.g. /dev/sda1) is returned +// as is. The path is looked up in the mount namespace of the calling thread. +func FindBlockDeviceForPath(path string) (string, error) { + mount, err := findMountForPath(path) + if err != nil { + return "", err + } + + name, err := mountBlockDeviceName(mount) + if err != nil { + return "", errors.Wrapf(err, "failed to find block device for %s", path) + } + if name == "" { + return "", fmt.Errorf("%s is on %s filesystem %q mounted at %s, which is not backed by a block device", + path, mount.fsType, mount.source, mount.mountPoint) + } + + // Up to maxStackedDeviceDepth stacked layers plus the bottom device. + for range maxStackedDeviceDepth + 1 { + owner := name + slaves, err := readBlockDeviceSlaves(owner) + if err != nil { + return "", err + } + if len(slaves) == 0 { + // A partition has no slaves of its own; the underlying devices of + // e.g. md0p1 are listed under its parent md0. + parent, err := blockDevicePartitionParent(name) + if err != nil { + return "", err + } + if parent != "" { + owner = parent + if slaves, err = readBlockDeviceSlaves(owner); err != nil { + return "", err + } + } + } + if len(slaves) == 0 { + // sysfs encodes "/" in device names as "!", e.g. cciss!c0d0p1 for + // /dev/cciss/c0d0p1. + return "/dev/" + strings.ReplaceAll(name, "!", "/"), nil + } + if len(slaves) > 1 { + return "", fmt.Errorf("%s is on device %s, which spans multiple devices %v", path, owner, slaves) + } + name = slaves[0] + } + return "", fmt.Errorf("%s is on a device stacked more than %d levels deep", path, maxStackedDeviceDepth) +} + +// findMountForPath returns the mount containing the given path, identified by +// the mount ID the kernel reports for it. The kernel resolves the path itself, +// including relative paths, symlinks followed by "..", and procfs magic links +// such as /proc/self/fd/ of an unlinked file. +// +// Mount points are not matched against the path, as the listing order of +// mountinfo does not tell which of the mounts on a path is visible, e.g. +// after a mount has been moved under another one. +func findMountForPath(path string) (mountInfo, error) { + // Get the mount ID first, as resolving the path may trigger an automount + // that must then be in the mount table. + id, err := statMountID(path) + if err != nil { + return mountInfo{}, errors.Wrapf(err, "failed to get mount ID of %s", path) + } + + // A mount table larger than a page is read in several chunks, and an + // unmount in between can make the kernel skip an entry, so read it again + // when the mount is missing. + for range mountInfoReadAttempts { + mounts, err := readMounts() + if err != nil { + return mountInfo{}, err + } + for _, mount := range mounts { + if mount.id == id { + return mount, nil + } + } + } + return mountInfo{}, fmt.Errorf("mount %s of %s not found in %s", id, path, mountInfoPath) +} + +// readMountInfo returns the mounts listed in mountInfoPath, in order. +func readMountInfo() ([]mountInfo, error) { + // Read the whole file rather than scanning it, as lines have no length + // limit, e.g. with long overlayfs lowerdir options. + content, err := os.ReadFile(mountInfoPath) + if err != nil { + return nil, errors.Wrapf(err, "failed to read %s", mountInfoPath) + } + + var mounts []mountInfo + for line := range strings.Lines(string(content)) { + mount, err := parseMountInfoLine(strings.TrimSuffix(line, "\n")) + if err != nil { + return nil, errors.Wrapf(err, "failed to parse %s", mountInfoPath) + } + mounts = append(mounts, mount) + } + return mounts, nil +} + +// parseMountInfoLine parses a line of /proc//mountinfo, e.g. +// +// 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue +// +// where the optional fields before "-" may be absent. +func parseMountInfoLine(line string) (mountInfo, error) { + // Fields are separated by single ASCII spaces. Spaces, tabs, newlines and + // backslashes in them are escaped, but other whitespace is not. + fields := strings.Split(line, " ") + if len(fields) < 10 { + return mountInfo{}, fmt.Errorf("invalid mountinfo line %q", line) + } + sep := slices.Index(fields[6:], "-") + if sep < 0 || 6+sep+2 >= len(fields) { + return mountInfo{}, fmt.Errorf("invalid mountinfo line %q", line) + } + sep += 6 + return mountInfo{ + id: fields[0], + devNum: fields[2], + mountPoint: unescapeMountInfoField(fields[4]), + fsType: fields[sep+1], + source: unescapeMountInfoField(fields[sep+2]), + }, nil +} + +// unescapeMountInfoField decodes the octal escapes (e.g. \040 for a space) +// used in mountinfo fields. +func unescapeMountInfoField(s string) string { + if !strings.Contains(s, `\`) { + return s + } + var b strings.Builder + for i := 0; i < len(s); i++ { + if s[i] == '\\' && i+3 < len(s) { + if c, err := strconv.ParseUint(s[i+1:i+4], 8, 8); err == nil { + b.WriteByte(byte(c)) + i += 3 + continue + } + } + b.WriteByte(s[i]) + } + return b.String() +} + +// mountBlockDeviceName returns the sysfs name of the block device a mount is +// on, or an empty string if it is not on one. +func mountBlockDeviceName(mount mountInfo) (string, error) { + // For most filesystems, the device number is that of their block device. + name, err := blockDeviceNameByNumber(mount.devNum) + if err != nil || name != "" { + return name, err + } + + // Others, such as btrfs, use an anonymous device number, so fall back to + // the mount source, but only for filesystems that need a block device. + // For the others (nodev in /proc/filesystems), such as tmpfs, overlayfs + // or ZFS, the source is just a label, e.g. "tmpfs" or "tank/data". + if !filepath.IsAbs(mount.source) { + return "", nil + } + nodev, err := isNodevFilesystem(mount.fsType) + if err != nil { + return "", err + } + if nodev { + return "", nil + } + dev, err := statBlockDev(mount.source) + if err != nil { + // The source may be missing from /dev, e.g. in an unprivileged + // container, so look it up in sysfs by its kernel name instead. + if os.IsNotExist(err) { + if name := sysfsBlockDeviceName(mount.source); name != "" { + return name, nil + } + } + return "", errors.Wrapf(err, "failed to stat mount source %s", mount.source) + } + devNum := fmt.Sprintf("%d:%d", unix.Major(dev), unix.Minor(dev)) + name, err = blockDeviceNameByNumber(devNum) + if err != nil { + return "", err + } + if name == "" { + return "", fmt.Errorf("block device %s (%s) not found in sysfs", mount.source, devNum) + } + return name, nil +} + +// isNodevFilesystem returns whether the given filesystem type does not need a +// block device, according to /proc/filesystems. Unknown types are assumed not +// to need one. +func isNodevFilesystem(fsType string) (bool, error) { + // FUSE filesystems are listed with a subtype, e.g. fuse.sshfs. + fsType, _, _ = strings.Cut(fsType, ".") + + content, err := os.ReadFile(filesystemsPath) + if err != nil { + return false, errors.Wrapf(err, "failed to read %s", filesystemsPath) + } + for line := range strings.SplitSeq(string(content), "\n") { + // Each line is "nodev\t" or "\t". + flag, name, ok := strings.Cut(line, "\t") + if ok && name == fsType { + return flag == "nodev", nil + } + } + return true, nil +} + +// sysfsBlockDeviceName returns the sysfs name of the block device at the given +// /dev path (e.g. cciss!c0d0p1 for /dev/cciss/c0d0p1) if sysfs has a block +// device by that name, or an empty string otherwise. +func sysfsBlockDeviceName(devPath string) string { + rel, ok := strings.CutPrefix(devPath, "/dev/") + if !ok || rel == "" { + return "" + } + name := strings.ReplaceAll(rel, "/", "!") + if name == "." || name == ".." { + return "" + } + if _, err := os.Stat(filepath.Join(sysfsDir, "class", "block", name)); err != nil { + return "" + } + return name +} + +// blockDeviceNameByNumber returns the sysfs name of the block device with the +// given ":" number, or an empty string if there is none. +func blockDeviceNameByNumber(devNum string) (string, error) { + devLink := filepath.Join(sysfsDir, "dev", "block", devNum) + target, err := os.Readlink(devLink) + if err != nil { + if os.IsNotExist(err) { + return "", nil + } + return "", errors.Wrapf(err, "failed to read %s", devLink) + } + return filepath.Base(target), nil +} + +// readBlockDeviceSlaves returns the names of the devices underlying the given +// block device, if any. +func readBlockDeviceSlaves(name string) ([]string, error) { + slavesDir := filepath.Join(sysfsDir, "class", "block", name, "slaves") + entries, err := os.ReadDir(slavesDir) + if err != nil && !os.IsNotExist(err) { + return nil, errors.Wrapf(err, "failed to read %s", slavesDir) + } + slaves := make([]string, 0, len(entries)) + for _, entry := range entries { + slaves = append(slaves, entry.Name()) + } + return slaves, nil +} + +// blockDevicePartitionParent returns the name of the device containing the +// given partition, or an empty string if the device is not a partition. +func blockDevicePartitionParent(name string) (string, error) { + devDir := filepath.Join(sysfsDir, "class", "block", name) + if _, err := os.Stat(filepath.Join(devDir, "partition")); err != nil { + if os.IsNotExist(err) { + return "", nil + } + return "", errors.Wrapf(err, "failed to check whether %s is a partition", name) + } + // A partition's sysfs directory is nested in its parent's, e.g. + // /sys/devices/virtual/block/md0/md0p1. + realDir, err := filepath.EvalSymlinks(devDir) + if err != nil { + return "", errors.Wrapf(err, "failed to resolve %s", devDir) + } + return filepath.Base(filepath.Dir(realDir)), nil +} + // findBlockDeviceForMountWithDeps returns the block device associated with a given mount path // by reading the specified mounts file. // diff --git a/vendor/github.com/longhorn/go-common-libs/sys/mountid_linux.go b/vendor/github.com/longhorn/go-common-libs/sys/mountid_linux.go new file mode 100644 index 000000000..90a86e957 --- /dev/null +++ b/vendor/github.com/longhorn/go-common-libs/sys/mountid_linux.go @@ -0,0 +1,76 @@ +package sys + +import ( + "errors" + "fmt" + "os" + "runtime" + "strconv" + "strings" + + "golang.org/x/sys/unix" +) + +// Mocked in tests. +var statxMountIDFunc = statxMountID + +// getMountID returns the ID of the mount containing path, as listed in the +// first field of mountinfo. +func getMountID(path string) (string, error) { + id, ok, err := statxMountIDFunc(path) + if err != nil || ok { + return id, err + } + return fdinfoMountID(path) +} + +// statxMountID returns the ID of the mount containing path and whether statx +// reported it, which it does since Linux 5.8 unless blocked by seccomp. +func statxMountID(path string) (string, bool, error) { + var stx unix.Statx_t + if err := unix.Statx(unix.AT_FDCWD, path, 0, unix.STATX_MNT_ID, &stx); err != nil { + // statx is missing before Linux 4.11, and may be blocked by seccomp. + if errors.Is(err, unix.ENOSYS) || errors.Is(err, unix.EPERM) { + return "", false, nil + } + return "", false, err + } + if stx.Mask&unix.STATX_MNT_ID == 0 { + return "", false, nil + } + return strconv.FormatUint(stx.Mnt_id, 10), true, nil +} + +// fdinfoMountID returns the ID of the mount containing path from the fdinfo of +// a file descriptor for it, which reports it since Linux 3.15. +func fdinfoMountID(path string) (string, error) { + // O_PATH needs no permission on the file itself. Unlike statx, it only + // triggers an automount on path itself with O_DIRECTORY, which is enough + // as automount points are directories. + fd, err := unix.Open(path, unix.O_PATH|unix.O_DIRECTORY|unix.O_CLOEXEC, 0) + if errors.Is(err, unix.ENOTDIR) { + fd, err = unix.Open(path, unix.O_PATH|unix.O_CLOEXEC, 0) + } + if err != nil { + return "", fmt.Errorf("failed to open %s: %w", path, err) + } + defer unix.Close(fd) // nolint: errcheck // O_PATH descriptor. + + // /proc/thread-self is resolved when opened, and reading fdinfo fails once + // that thread has exited, which it does if a goroutine locked to it exits, + // so keep this goroutine on it until done. + runtime.LockOSThread() + defer runtime.UnlockOSThread() + + fdinfo := fmt.Sprintf("/proc/thread-self/fdinfo/%d", fd) + content, err := os.ReadFile(fdinfo) + if err != nil { + return "", fmt.Errorf("failed to read %s: %w", fdinfo, err) + } + for line := range strings.SplitSeq(string(content), "\n") { + if id, ok := strings.CutPrefix(line, "mnt_id:"); ok { + return strings.TrimSpace(id), nil + } + } + return "", fmt.Errorf("no mnt_id in %s", fdinfo) +} diff --git a/vendor/github.com/longhorn/go-common-libs/sys/mountid_other.go b/vendor/github.com/longhorn/go-common-libs/sys/mountid_other.go new file mode 100644 index 000000000..9ae5f7a47 --- /dev/null +++ b/vendor/github.com/longhorn/go-common-libs/sys/mountid_other.go @@ -0,0 +1,10 @@ +//go:build !linux + +package sys + +import "errors" + +// getMountID fails, as mount IDs are Linux-specific. +func getMountID(string) (string, error) { + return "", errors.New("mount IDs are only available on Linux") +} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/flags.go b/vendor/k8s.io/kube-openapi/pkg/internal/flags.go deleted file mode 100644 index da5485f6a..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/flags.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -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 internal - -// Used by tests to selectively disable experimental JSON unmarshaler -var UseOptimizedJSONUnmarshaling bool = true -var UseOptimizedJSONUnmarshalingV3 bool = true - -// Used by tests to selectively disable experimental JSON marshaler -var UseOptimizedJSONMarshaling bool = true -var UseOptimizedJSONMarshalingV3 bool = true diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go b/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go index 5d8ee9aa4..91c369963 100644 --- a/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go +++ b/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go @@ -17,8 +17,9 @@ limitations under the License. package internal import ( + jsonv2 "encoding/json/v2" + "github.com/go-openapi/jsonreference" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" ) // DeterministicMarshal calls the jsonv2 library with the deterministic diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/AUTHORS b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/AUTHORS deleted file mode 100644 index 2b00ddba0..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at https://tip.golang.org/AUTHORS. diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/CONTRIBUTORS b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/CONTRIBUTORS deleted file mode 100644 index 1fbd3e976..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at https://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE deleted file mode 100644 index 244127300..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2020 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/README.md b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/README.md deleted file mode 100644 index 937c39800..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# JSON Serialization (v2) - -[![GoDev](https://img.shields.io/static/v1?label=godev&message=reference&color=00add8)](https://pkg.go.dev/github.com/go-json-experiment/json) -[![Build Status](https://github.com/go-json-experiment/json/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/go-json-experiment/json/actions) - -This module hosts an experimental implementation of v2 `encoding/json`. -The API is unstable and breaking changes will regularly be made. -Do not depend on this in publicly available modules. - -Any commits that make breaking API or behavior changes will be marked -with the string "WARNING: " near the top of the commit message. -It is your responsibility to inspect the list of commit changes -when upgrading the module. Not all breaking changes will lead to build failures. - -A [proposal to include this module in Go as `encoding/json/v2` and `encoding/json/jsontext`](https://github.com/golang/go/issues/71497) has been started on the Go Github project on 2025-01-30. Please provide your feedback there. - -## Goals and objectives - -* **Mostly backwards compatible:** If possible, v2 should aim to be _mostly_ -compatible with v1 in terms of both API and default behavior to ease migration. -For example, the `Marshal` and `Unmarshal` functions are the most widely used -declarations in the v1 package. It seems sensible for equivalent functionality -in v2 to be named the same and have a mostly compatible signature. -Behaviorally, we should aim for 95% to 99% backwards compatibility. -We do not aim for 100% compatibility since we want the freedom to break -certain behaviors that are now considered to have been a mistake. -Options exist that can bring the v2 implementation to 100% compatibility, -but it will not be the default. - -* **More flexible:** There is a -[long list of feature requests](https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+encoding%2Fjson+in%3Atitle). -We should aim to provide the most flexible features that addresses most usages. -We do not want to over fit the v2 API to handle every possible use case. -Ideally, the features provided should be orthogonal in nature such that -any combination of features results in as few surprising edge cases as possible. - -* **More performant:** JSON serialization is widely used and any bit of extra -performance gains will be greatly appreciated. Some rarely used behaviors of v1 -may be dropped in favor of better performance. For example, -despite `Encoder` and `Decoder` operating on an `io.Writer` and `io.Reader`, -they do not operate in a truly streaming manner, -leading to a loss in performance. The v2 implementation should aim to be truly -streaming by default (see [#33714](https://golang.org/issue/33714)). - -* **Easy to use (hard to misuse):** The v2 API should aim to make -the common case easy and the less common case at least possible. -The API should avoid behavior that goes contrary to user expectation, -which may result in subtle bugs (see [#36225](https://golang.org/issue/36225)). - -* **v1 and v2 maintainability:** Since the v1 implementation must stay forever, -it would be beneficial if v1 could be implemented under the hood with v2, -allowing for less maintenance burden in the future. This probably implies that -behavioral changes in v2 relative to v1 need to be exposed as options. - -* **Avoid unsafe:** Standard library packages generally avoid the use of -package `unsafe` even if it could provide a performance boost. -We aim to preserve this property. - -## Expectations - -While this module aims to possibly be the v2 implementation of `encoding/json`, -there is no guarantee that this outcome will occur. As with any major change -to the Go standard library, this will eventually go through the -[Go proposal process](https://github.com/golang/proposal#readme). -At the present moment, this is still in the design and experimentation phase -and is not ready for a formal proposal. - -There are several possible outcomes from this experiment: -1. We determine that a v2 `encoding/json` would not provide sufficient benefit -over the existing v1 `encoding/json` package. Thus, we abandon this effort. -2. We propose a v2 `encoding/json` design, but it is rejected in favor of some -other design that is considered superior. -3. We propose a v2 `encoding/json` design, but rather than adding an entirely -new v2 `encoding/json` package, we decide to merge its functionality into -the existing v1 `encoding/json` package. -4. We propose a v2 `encoding/json` design and it is accepted, resulting in -its addition to the standard library. -5. Some other unforeseen outcome (among the infinite number of possibilities). - -## Development - -This module is primarily developed by -[@dsnet](https://github.com/dsnet), -[@mvdan](https://github.com/mvdan), and -[@johanbrandhorst](https://github.com/johanbrandhorst) -with feedback provided by -[@rogpeppe](https://github.com/rogpeppe), -[@ChrisHines](https://github.com/ChrisHines), and -[@rsc](https://github.com/rsc). - -Discussion about semantics occur semi-regularly, where a -[record of past meetings can be found here](https://docs.google.com/document/d/1rovrOTd-wTawGMPPlPuKhwXaYBg9VszTXR9AQQL5LfI/edit?usp=sharing). - -## Design overview - -This package aims to provide a clean separation between syntax and semantics. -Syntax deals with the structural representation of JSON (as specified in -[RFC 4627](https://tools.ietf.org/html/rfc4627), -[RFC 7159](https://tools.ietf.org/html/rfc7159), -[RFC 7493](https://tools.ietf.org/html/rfc7493), -[RFC 8259](https://tools.ietf.org/html/rfc8259), and -[RFC 8785](https://tools.ietf.org/html/rfc8785)). -Semantics deals with the meaning of syntactic data as usable application data. - -The `Encoder` and `Decoder` types are streaming tokenizers concerned with the -packing or parsing of JSON data. They operate on `Token` and `Value` types -which represent the common data structures that are representable in JSON. -`Encoder` and `Decoder` do not aim to provide any interpretation of the data. - -Functions like `Marshal`, `MarshalWrite`, `MarshalEncode`, `Unmarshal`, -`UnmarshalRead`, and `UnmarshalDecode` provide semantic meaning by correlating -any arbitrary Go type with some JSON representation of that type (as stored in -data types like `[]byte`, `io.Writer`, `io.Reader`, `Encoder`, or `Decoder`). - -![API overview](api.png) - -This diagram provides a high-level overview of the v2 `json` and `jsontext` packages. -Purple blocks represent types, while blue blocks represent functions or methods. -The arrows and their direction represent the approximate flow of data. -The bottom half of the diagram contains functionality that is only concerned -with syntax (implemented by the `jsontext` package), -while the upper half contains functionality that assigns -semantic meaning to syntactic data handled by the bottom half -(as implemented by the v2 `json` package). - -In contrast to v1 `encoding/json`, options are represented as separate types -rather than being setter methods on the `Encoder` or `Decoder` types. -Some options affects JSON serialization at the syntactic layer, -while others affect it at the semantic layer. -Some options only affect JSON when decoding, -while others affect JSON while encoding. - -## Behavior changes - -The v2 `json` package changes the default behavior of `Marshal` and `Unmarshal` -relative to the v1 `json` package to be more sensible. -Some of these behavior changes have options and workarounds to opt into -behavior similar to what v1 provided. - -This table shows an overview of the changes: - -| v1 | v2 | Details | -| -- | -- | ------- | -| JSON object members are unmarshaled into a Go struct using a **case-insensitive name match**. | JSON object members are unmarshaled into a Go struct using a **case-sensitive name match**. | [CaseSensitivity](/v1/diff_test.go#:~:text=TestCaseSensitivity) | -| When marshaling a Go struct, a struct field marked as `omitempty` is omitted if **the field value is an empty Go value**, which is defined as false, 0, a nil pointer, a nil interface value, and any empty array, slice, map, or string. | When marshaling a Go struct, a struct field marked as `omitempty` is omitted if **the field value would encode as an empty JSON value**, which is defined as a JSON null, or an empty JSON string, object, or array. | [OmitEmptyOption](/v1/diff_test.go#:~:text=TestOmitEmptyOption) | -| The `string` option **does affect** Go strings and bools. | The `string` option **does not affect** Go strings or bools. | [StringOption](/v1/diff_test.go#:~:text=TestStringOption) | -| The `string` option **does not recursively affect** sub-values of the Go field value. | The `string` option **does recursively affect** sub-values of the Go field value. | [StringOption](/v1/diff_test.go#:~:text=TestStringOption) | -| The `string` option **sometimes accepts** a JSON null escaped within a JSON string. | The `string` option **never accepts** a JSON null escaped within a JSON string. | [StringOption](/v1/diff_test.go#:~:text=TestStringOption) | -| A nil Go slice is marshaled as a **JSON null**. | A nil Go slice is marshaled as an **empty JSON array**. | [NilSlicesAndMaps](/v1/diff_test.go#:~:text=TestNilSlicesAndMaps) | -| A nil Go map is marshaled as a **JSON null**. | A nil Go map is marshaled as an **empty JSON object**. | [NilSlicesAndMaps](/v1/diff_test.go#:~:text=TestNilSlicesAndMaps) | -| A Go array may be unmarshaled from a **JSON array of any length**. | A Go array must be unmarshaled from a **JSON array of the same length**. | [Arrays](/v1/diff_test.go#:~:text=Arrays) | -| A Go byte array is represented as a **JSON array of JSON numbers**. | A Go byte array is represented as a **Base64-encoded JSON string**. | [ByteArrays](/v1/diff_test.go#:~:text=TestByteArrays) | -| `MarshalJSON` and `UnmarshalJSON` methods declared on a pointer receiver are **inconsistently called**. | `MarshalJSON` and `UnmarshalJSON` methods declared on a pointer receiver are **consistently called**. | [PointerReceiver](/v1/diff_test.go#:~:text=TestPointerReceiver) | -| A Go map is marshaled in a **deterministic order**. | A Go map is marshaled in a **non-deterministic order**. | [MapDeterminism](/v1/diff_test.go#:~:text=TestMapDeterminism) | -| JSON strings are encoded **with HTML-specific characters being escaped**. | JSON strings are encoded **without any characters being escaped** (unless necessary). | [EscapeHTML](/v1/diff_test.go#:~:text=TestEscapeHTML) | -| When marshaling, invalid UTF-8 within a Go string **are silently replaced**. | When marshaling, invalid UTF-8 within a Go string **results in an error**. | [InvalidUTF8](/v1/diff_test.go#:~:text=TestInvalidUTF8) | -| When unmarshaling, invalid UTF-8 within a JSON string **are silently replaced**. | When unmarshaling, invalid UTF-8 within a JSON string **results in an error**. | [InvalidUTF8](/v1/diff_test.go#:~:text=TestInvalidUTF8) | -| When marshaling, **an error does not occur** if the output JSON value contains objects with duplicate names. | When marshaling, **an error does occur** if the output JSON value contains objects with duplicate names. | [DuplicateNames](/v1/diff_test.go#:~:text=TestDuplicateNames) | -| When unmarshaling, **an error does not occur** if the input JSON value contains objects with duplicate names. | When unmarshaling, **an error does occur** if the input JSON value contains objects with duplicate names. | [DuplicateNames](/v1/diff_test.go#:~:text=TestDuplicateNames) | -| Unmarshaling a JSON null into a non-empty Go value **inconsistently clears the value or does nothing**. | Unmarshaling a JSON null into a non-empty Go value **always clears the value**. | [MergeNull](/v1/diff_test.go#:~:text=TestMergeNull) | -| Unmarshaling a JSON value into a non-empty Go value **follows inconsistent and bizarre behavior**. | Unmarshaling a JSON value into a non-empty Go value **always merges if the input is an object, and otherwise replaces**. | [MergeComposite](/v1/diff_test.go#:~:text=TestMergeComposite) | -| A `time.Duration` is represented as a **JSON number containing the decimal number of nanoseconds**. | A `time.Duration` has no default representation in v2 (see [#71631](https://golang.org/issue/71631)) and results in an error. | | -| A Go struct with only unexported fields **can be serialized**. | A Go struct with only unexported fields **cannot be serialized**. | [EmptyStructs](/v1/diff_test.go#:~:text=TestEmptyStructs) | - -See [diff_test.go](/v1/diff_test.go) for details about every change. - -## Performance - -One of the goals of the v2 module is to be more performant than v1, -but not at the expense of correctness. -In general, v2 is at performance parity with v1 for marshaling, -but dramatically faster for unmarshaling. - -See https://github.com/go-json-experiment/jsonbench for benchmarks -comparing v2 with v1 and a number of other popular JSON implementations. diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go deleted file mode 100644 index dbf92432d..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go +++ /dev/null @@ -1,578 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "bytes" - "encoding" - "io" - "reflect" - "slices" - "strings" - "sync" - "time" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -// Reference encoding and time packages to assist pkgsite -// in being able to hotlink references to those packages. -var ( - _ encoding.TextMarshaler - _ encoding.TextAppender - _ encoding.TextUnmarshaler - _ time.Time - _ time.Duration -) - -// export exposes internal functionality of the "jsontext" package. -var export = jsontext.Internal.Export(&internal.AllowInternalUse) - -// Marshal serializes a Go value as a []byte according to the provided -// marshal and encode options (while ignoring unmarshal or decode options). -// It does not terminate the output with a newline. -// -// Type-specific marshal functions and methods take precedence -// over the default representation of a value. -// Functions or methods that operate on *T are only called when encoding -// a value of type T (by taking its address) or a non-nil value of *T. -// Marshal ensures that a value is always addressable -// (by boxing it on the heap if necessary) so that -// these functions and methods can be consistently called. For performance, -// it is recommended that Marshal be passed a non-nil pointer to the value. -// -// The input value is encoded as JSON according the following rules: -// -// - If any type-specific functions in a [WithMarshalers] option match -// the value type, then those functions are called to encode the value. -// If all applicable functions return [SkipFunc], -// then the value is encoded according to subsequent rules. -// -// - If the value type implements [MarshalerTo], -// then the MarshalJSONTo method is called to encode the value. -// -// - If the value type implements [Marshaler], -// then the MarshalJSON method is called to encode the value. -// -// - If the value type implements [encoding.TextAppender], -// then the AppendText method is called to encode the value and -// subsequently encode its result as a JSON string. -// -// - If the value type implements [encoding.TextMarshaler], -// then the MarshalText method is called to encode the value and -// subsequently encode its result as a JSON string. -// -// - Otherwise, the value is encoded according to the value's type -// as described in detail below. -// -// Most Go types have a default JSON representation. -// Certain types support specialized formatting according to -// a format flag optionally specified in the Go struct tag -// for the struct field that contains the current value -// (see the “JSON Representation of Go structs” section for more details). -// -// The representation of each type is as follows: -// -// - A Go boolean is encoded as a JSON boolean (e.g., true or false). -// It does not support any custom format flags. -// -// - A Go string is encoded as a JSON string. -// It does not support any custom format flags. -// -// - A Go []byte or [N]byte is encoded as a JSON string containing -// the binary value encoded using RFC 4648. -// If the format is "base64" or unspecified, then this uses RFC 4648, section 4. -// If the format is "base64url", then this uses RFC 4648, section 5. -// If the format is "base32", then this uses RFC 4648, section 6. -// If the format is "base32hex", then this uses RFC 4648, section 7. -// If the format is "base16" or "hex", then this uses RFC 4648, section 8. -// If the format is "array", then the bytes value is encoded as a JSON array -// where each byte is recursively JSON-encoded as each JSON array element. -// -// - A Go integer is encoded as a JSON number without fractions or exponents. -// If [StringifyNumbers] is specified or encoding a JSON object name, -// then the JSON number is encoded within a JSON string. -// It does not support any custom format flags. -// -// - A Go float is encoded as a JSON number. -// If [StringifyNumbers] is specified or encoding a JSON object name, -// then the JSON number is encoded within a JSON string. -// If the format is "nonfinite", then NaN, +Inf, and -Inf are encoded as -// the JSON strings "NaN", "Infinity", and "-Infinity", respectively. -// Otherwise, the presence of non-finite numbers results in a [SemanticError]. -// -// - A Go map is encoded as a JSON object, where each Go map key and value -// is recursively encoded as a name and value pair in the JSON object. -// The Go map key must encode as a JSON string, otherwise this results -// in a [SemanticError]. The Go map is traversed in a non-deterministic order. -// For deterministic encoding, consider using the [Deterministic] option. -// If the format is "emitnull", then a nil map is encoded as a JSON null. -// If the format is "emitempty", then a nil map is encoded as an empty JSON object, -// regardless of whether [FormatNilMapAsNull] is specified. -// Otherwise by default, a nil map is encoded as an empty JSON object. -// -// - A Go struct is encoded as a JSON object. -// See the “JSON Representation of Go structs” section -// in the package-level documentation for more details. -// -// - A Go slice is encoded as a JSON array, where each Go slice element -// is recursively JSON-encoded as the elements of the JSON array. -// If the format is "emitnull", then a nil slice is encoded as a JSON null. -// If the format is "emitempty", then a nil slice is encoded as an empty JSON array, -// regardless of whether [FormatNilSliceAsNull] is specified. -// Otherwise by default, a nil slice is encoded as an empty JSON array. -// -// - A Go array is encoded as a JSON array, where each Go array element -// is recursively JSON-encoded as the elements of the JSON array. -// The JSON array length is always identical to the Go array length. -// It does not support any custom format flags. -// -// - A Go pointer is encoded as a JSON null if nil, otherwise it is -// the recursively JSON-encoded representation of the underlying value. -// Format flags are forwarded to the encoding of the underlying value. -// -// - A Go interface is encoded as a JSON null if nil, otherwise it is -// the recursively JSON-encoded representation of the underlying value. -// It does not support any custom format flags. -// -// - A Go [time.Time] is encoded as a JSON string containing the timestamp -// formatted in RFC 3339 with nanosecond precision. -// If the format matches one of the format constants declared -// in the time package (e.g., RFC1123), then that format is used. -// If the format is "unix", "unixmilli", "unixmicro", or "unixnano", -// then the timestamp is encoded as a possibly fractional JSON number -// of the number of seconds (or milliseconds, microseconds, or nanoseconds) -// since the Unix epoch, which is January 1st, 1970 at 00:00:00 UTC. -// To avoid a fractional component, round the timestamp to the relevant unit. -// Otherwise, the format is used as-is with [time.Time.Format] if non-empty. -// -// - A Go [time.Duration] currently has no default representation and -// requires an explicit format to be specified. -// If the format is "sec", "milli", "micro", or "nano", -// then the duration is encoded as a possibly fractional JSON number -// of the number of seconds (or milliseconds, microseconds, or nanoseconds). -// To avoid a fractional component, round the duration to the relevant unit. -// If the format is "units", it is encoded as a JSON string formatted using -// [time.Duration.String] (e.g., "1h30m" for 1 hour 30 minutes). -// If the format is "iso8601", it is encoded as a JSON string using the -// ISO 8601 standard for durations (e.g., "PT1H30M" for 1 hour 30 minutes) -// using only accurate units of hours, minutes, and seconds. -// -// - All other Go types (e.g., complex numbers, channels, and functions) -// have no default representation and result in a [SemanticError]. -// -// JSON cannot represent cyclic data structures and Marshal does not handle them. -// Passing cyclic structures will result in an error. -func Marshal(in any, opts ...Options) (out []byte, err error) { - enc := export.GetBufferedEncoder(opts...) - defer export.PutBufferedEncoder(enc) - xe := export.Encoder(enc) - xe.Flags.Set(jsonflags.OmitTopLevelNewline | 1) - err = marshalEncode(enc, in, &xe.Struct) - if err != nil && xe.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return nil, internal.TransformMarshalError(in, err) - } - return bytes.Clone(xe.Buf), err -} - -// MarshalWrite serializes a Go value into an [io.Writer] according to the provided -// marshal and encode options (while ignoring unmarshal or decode options). -// It does not terminate the output with a newline. -// See [Marshal] for details about the conversion of a Go value into JSON. -func MarshalWrite(out io.Writer, in any, opts ...Options) (err error) { - enc := export.GetStreamingEncoder(out, opts...) - defer export.PutStreamingEncoder(enc) - xe := export.Encoder(enc) - xe.Flags.Set(jsonflags.OmitTopLevelNewline | 1) - err = marshalEncode(enc, in, &xe.Struct) - if err != nil && xe.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.TransformMarshalError(in, err) - } - return err -} - -// MarshalEncode serializes a Go value into an [jsontext.Encoder] according to -// the provided marshal options (while ignoring unmarshal, encode, or decode options). -// Any marshal-relevant options already specified on the [jsontext.Encoder] -// take lower precedence than the set of options provided by the caller. -// Unlike [Marshal] and [MarshalWrite], encode options are ignored because -// they must have already been specified on the provided [jsontext.Encoder]. -// -// See [Marshal] for details about the conversion of a Go value into JSON. -func MarshalEncode(out *jsontext.Encoder, in any, opts ...Options) (err error) { - xe := export.Encoder(out) - if len(opts) > 0 { - optsOriginal := xe.Struct - defer func() { xe.Struct = optsOriginal }() - xe.Struct.JoinWithoutCoderOptions(opts...) - } - err = marshalEncode(out, in, &xe.Struct) - if err != nil && xe.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.TransformMarshalError(in, err) - } - return err -} - -func marshalEncode(out *jsontext.Encoder, in any, mo *jsonopts.Struct) (err error) { - v := reflect.ValueOf(in) - if !v.IsValid() || (v.Kind() == reflect.Pointer && v.IsNil()) { - return out.WriteToken(jsontext.Null) - } - // Shallow copy non-pointer values to obtain an addressable value. - // It is beneficial to performance to always pass pointers to avoid this. - forceAddr := v.Kind() != reflect.Pointer - if forceAddr { - v2 := reflect.New(v.Type()) - v2.Elem().Set(v) - v = v2 - } - va := addressableValue{v.Elem(), forceAddr} // dereferenced pointer is always addressable - t := va.Type() - - // Lookup and call the marshal function for this type. - marshal := lookupArshaler(t).marshal - if mo.Marshalers != nil { - marshal, _ = mo.Marshalers.(*Marshalers).lookup(marshal, t) - } - if err := marshal(out, va, mo); err != nil { - if !mo.Flags.Get(jsonflags.AllowDuplicateNames) { - export.Encoder(out).Tokens.InvalidateDisabledNamespaces() - } - return err - } - return nil -} - -// Unmarshal decodes a []byte input into a Go value according to the provided -// unmarshal and decode options (while ignoring marshal or encode options). -// The input must be a single JSON value with optional whitespace interspersed. -// The output must be a non-nil pointer. -// -// Type-specific unmarshal functions and methods take precedence -// over the default representation of a value. -// Functions or methods that operate on *T are only called when decoding -// a value of type T (by taking its address) or a non-nil value of *T. -// Unmarshal ensures that a value is always addressable -// (by boxing it on the heap if necessary) so that -// these functions and methods can be consistently called. -// -// The input is decoded into the output according the following rules: -// -// - If any type-specific functions in a [WithUnmarshalers] option match -// the value type, then those functions are called to decode the JSON -// value. If all applicable functions return [SkipFunc], -// then the input is decoded according to subsequent rules. -// -// - If the value type implements [UnmarshalerFrom], -// then the UnmarshalJSONFrom method is called to decode the JSON value. -// -// - If the value type implements [Unmarshaler], -// then the UnmarshalJSON method is called to decode the JSON value. -// -// - If the value type implements [encoding.TextUnmarshaler], -// then the input is decoded as a JSON string and -// the UnmarshalText method is called with the decoded string value. -// This fails with a [SemanticError] if the input is not a JSON string. -// -// - Otherwise, the JSON value is decoded according to the value's type -// as described in detail below. -// -// Most Go types have a default JSON representation. -// Certain types support specialized formatting according to -// a format flag optionally specified in the Go struct tag -// for the struct field that contains the current value -// (see the “JSON Representation of Go structs” section for more details). -// A JSON null may be decoded into every supported Go value where -// it is equivalent to storing the zero value of the Go value. -// If the input JSON kind is not handled by the current Go value type, -// then this fails with a [SemanticError]. Unless otherwise specified, -// the decoded value replaces any pre-existing value. -// -// The representation of each type is as follows: -// -// - A Go boolean is decoded from a JSON boolean (e.g., true or false). -// It does not support any custom format flags. -// -// - A Go string is decoded from a JSON string. -// It does not support any custom format flags. -// -// - A Go []byte or [N]byte is decoded from a JSON string -// containing the binary value encoded using RFC 4648. -// If the format is "base64" or unspecified, then this uses RFC 4648, section 4. -// If the format is "base64url", then this uses RFC 4648, section 5. -// If the format is "base32", then this uses RFC 4648, section 6. -// If the format is "base32hex", then this uses RFC 4648, section 7. -// If the format is "base16" or "hex", then this uses RFC 4648, section 8. -// If the format is "array", then the Go slice or array is decoded from a -// JSON array where each JSON element is recursively decoded for each byte. -// When decoding into a non-nil []byte, the slice length is reset to zero -// and the decoded input is appended to it. -// When decoding into a [N]byte, the input must decode to exactly N bytes, -// otherwise it fails with a [SemanticError]. -// -// - A Go integer is decoded from a JSON number. -// It must be decoded from a JSON string containing a JSON number -// if [StringifyNumbers] is specified or decoding a JSON object name. -// It fails with a [SemanticError] if the JSON number -// has a fractional or exponent component. -// It also fails if it overflows the representation of the Go integer type. -// It does not support any custom format flags. -// -// - A Go float is decoded from a JSON number. -// It must be decoded from a JSON string containing a JSON number -// if [StringifyNumbers] is specified or decoding a JSON object name. -// It fails if it overflows the representation of the Go float type. -// If the format is "nonfinite", then the JSON strings -// "NaN", "Infinity", and "-Infinity" are decoded as NaN, +Inf, and -Inf. -// Otherwise, the presence of such strings results in a [SemanticError]. -// -// - A Go map is decoded from a JSON object, -// where each JSON object name and value pair is recursively decoded -// as the Go map key and value. Maps are not cleared. -// If the Go map is nil, then a new map is allocated to decode into. -// If the decoded key matches an existing Go map entry, the entry value -// is reused by decoding the JSON object value into it. -// The formats "emitnull" and "emitempty" have no effect when decoding. -// -// - A Go struct is decoded from a JSON object. -// See the “JSON Representation of Go structs” section -// in the package-level documentation for more details. -// -// - A Go slice is decoded from a JSON array, where each JSON element -// is recursively decoded and appended to the Go slice. -// Before appending into a Go slice, a new slice is allocated if it is nil, -// otherwise the slice length is reset to zero. -// The formats "emitnull" and "emitempty" have no effect when decoding. -// -// - A Go array is decoded from a JSON array, where each JSON array element -// is recursively decoded as each corresponding Go array element. -// Each Go array element is zeroed before decoding into it. -// It fails with a [SemanticError] if the JSON array does not contain -// the exact same number of elements as the Go array. -// It does not support any custom format flags. -// -// - A Go pointer is decoded based on the JSON kind and underlying Go type. -// If the input is a JSON null, then this stores a nil pointer. -// Otherwise, it allocates a new underlying value if the pointer is nil, -// and recursively JSON decodes into the underlying value. -// Format flags are forwarded to the decoding of the underlying type. -// -// - A Go interface is decoded based on the JSON kind and underlying Go type. -// If the input is a JSON null, then this stores a nil interface value. -// Otherwise, a nil interface value of an empty interface type is initialized -// with a zero Go bool, string, float64, map[string]any, or []any if the -// input is a JSON boolean, string, number, object, or array, respectively. -// If the interface value is still nil, then this fails with a [SemanticError] -// since decoding could not determine an appropriate Go type to decode into. -// For example, unmarshaling into a nil io.Reader fails since -// there is no concrete type to populate the interface value with. -// Otherwise an underlying value exists and it recursively decodes -// the JSON input into it. It does not support any custom format flags. -// -// - A Go [time.Time] is decoded from a JSON string containing the time -// formatted in RFC 3339 with nanosecond precision. -// If the format matches one of the format constants declared in -// the time package (e.g., RFC1123), then that format is used for parsing. -// If the format is "unix", "unixmilli", "unixmicro", or "unixnano", -// then the timestamp is decoded from an optionally fractional JSON number -// of the number of seconds (or milliseconds, microseconds, or nanoseconds) -// since the Unix epoch, which is January 1st, 1970 at 00:00:00 UTC. -// Otherwise, the format is used as-is with [time.Time.Parse] if non-empty. -// -// - A Go [time.Duration] currently has no default representation and -// requires an explicit format to be specified. -// If the format is "sec", "milli", "micro", or "nano", -// then the duration is decoded from an optionally fractional JSON number -// of the number of seconds (or milliseconds, microseconds, or nanoseconds). -// If the format is "units", it is decoded from a JSON string parsed using -// [time.ParseDuration] (e.g., "1h30m" for 1 hour 30 minutes). -// If the format is "iso8601", it is decoded from a JSON string using the -// ISO 8601 standard for durations (e.g., "PT1H30M" for 1 hour 30 minutes) -// accepting only accurate units of hours, minutes, or seconds. -// -// - All other Go types (e.g., complex numbers, channels, and functions) -// have no default representation and result in a [SemanticError]. -// -// In general, unmarshaling follows merge semantics (similar to RFC 7396) -// where the decoded Go value replaces the destination value -// for any JSON kind other than an object. -// For JSON objects, the input object is merged into the destination value -// where matching object members recursively apply merge semantics. -func Unmarshal(in []byte, out any, opts ...Options) (err error) { - dec := export.GetBufferedDecoder(in, opts...) - defer export.PutBufferedDecoder(dec) - xd := export.Decoder(dec) - err = unmarshalDecode(dec, out, &xd.Struct, true) - if err != nil && xd.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.TransformUnmarshalError(out, err) - } - return err -} - -// UnmarshalRead deserializes a Go value from an [io.Reader] according to the -// provided unmarshal and decode options (while ignoring marshal or encode options). -// The input must be a single JSON value with optional whitespace interspersed. -// It consumes the entirety of [io.Reader] until [io.EOF] is encountered, -// without reporting an error for EOF. The output must be a non-nil pointer. -// See [Unmarshal] for details about the conversion of JSON into a Go value. -func UnmarshalRead(in io.Reader, out any, opts ...Options) (err error) { - dec := export.GetStreamingDecoder(in, opts...) - defer export.PutStreamingDecoder(dec) - xd := export.Decoder(dec) - err = unmarshalDecode(dec, out, &xd.Struct, true) - if err != nil && xd.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.TransformUnmarshalError(out, err) - } - return err -} - -// UnmarshalDecode deserializes a Go value from a [jsontext.Decoder] according to -// the provided unmarshal options (while ignoring marshal, encode, or decode options). -// Any unmarshal options already specified on the [jsontext.Decoder] -// take lower precedence than the set of options provided by the caller. -// Unlike [Unmarshal] and [UnmarshalRead], decode options are ignored because -// they must have already been specified on the provided [jsontext.Decoder]. -// -// The input may be a stream of one or more JSON values, -// where this only unmarshals the next JSON value in the stream. -// The output must be a non-nil pointer. -// See [Unmarshal] for details about the conversion of JSON into a Go value. -func UnmarshalDecode(in *jsontext.Decoder, out any, opts ...Options) (err error) { - xd := export.Decoder(in) - if len(opts) > 0 { - optsOriginal := xd.Struct - defer func() { xd.Struct = optsOriginal }() - xd.Struct.JoinWithoutCoderOptions(opts...) - } - err = unmarshalDecode(in, out, &xd.Struct, false) - if err != nil && xd.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.TransformUnmarshalError(out, err) - } - return err -} - -func unmarshalDecode(in *jsontext.Decoder, out any, uo *jsonopts.Struct, last bool) (err error) { - v := reflect.ValueOf(out) - if v.Kind() != reflect.Pointer || v.IsNil() { - return &SemanticError{action: "unmarshal", GoType: reflect.TypeOf(out), Err: internal.ErrNonNilReference} - } - va := addressableValue{v.Elem(), false} // dereferenced pointer is always addressable - t := va.Type() - - // In legacy semantics, the entirety of the next JSON value - // was validated before attempting to unmarshal it. - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - if err := export.Decoder(in).CheckNextValue(last); err != nil { - if err == io.EOF && last { - offset := in.InputOffset() + int64(len(in.UnreadBuffer())) - return &jsontext.SyntacticError{ByteOffset: offset, Err: io.ErrUnexpectedEOF} - } - return err - } - } - - // Lookup and call the unmarshal function for this type. - unmarshal := lookupArshaler(t).unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, t) - } - if err := unmarshal(in, va, uo); err != nil { - if !uo.Flags.Get(jsonflags.AllowDuplicateNames) { - export.Decoder(in).Tokens.InvalidateDisabledNamespaces() - } - if err == io.EOF && last { - offset := in.InputOffset() + int64(len(in.UnreadBuffer())) - return &jsontext.SyntacticError{ByteOffset: offset, Err: io.ErrUnexpectedEOF} - } - return err - } - if last { - return export.Decoder(in).CheckEOF() - } - return nil -} - -// addressableValue is a reflect.Value that is guaranteed to be addressable -// such that calling the Addr and Set methods do not panic. -// -// There is no compile magic that enforces this property, -// but rather the need to construct this type makes it easier to examine each -// construction site to ensure that this property is upheld. -type addressableValue struct { - reflect.Value - - // forcedAddr reports whether this value is addressable - // only through the use of [newAddressableValue]. - // This is only used for [jsonflags.CallMethodsWithLegacySemantics]. - forcedAddr bool -} - -// newAddressableValue constructs a new addressable value of type t. -func newAddressableValue(t reflect.Type) addressableValue { - return addressableValue{reflect.New(t).Elem(), true} -} - -// TODO: Remove *jsonopts.Struct argument from [marshaler] and [unmarshaler]. -// This can be directly accessed on the encoder or decoder. - -// All marshal and unmarshal behavior is implemented using these signatures. -// The *jsonopts.Struct argument is guaranteed to identical to or at least -// a strict super-set of the options in Encoder.Struct or Decoder.Struct. -// It is identical for Marshal, Unmarshal, MarshalWrite, and UnmarshalRead. -// It is a super-set for MarshalEncode and UnmarshalDecode. -type ( - marshaler = func(*jsontext.Encoder, addressableValue, *jsonopts.Struct) error - unmarshaler = func(*jsontext.Decoder, addressableValue, *jsonopts.Struct) error -) - -type arshaler struct { - marshal marshaler - unmarshal unmarshaler - nonDefault bool -} - -var lookupArshalerCache sync.Map // map[reflect.Type]*arshaler - -func lookupArshaler(t reflect.Type) *arshaler { - if v, ok := lookupArshalerCache.Load(t); ok { - return v.(*arshaler) - } - - fncs := makeDefaultArshaler(t) - fncs = makeMethodArshaler(fncs, t) - fncs = makeTimeArshaler(fncs, t) - - // Use the last stored so that duplicate arshalers can be garbage collected. - v, _ := lookupArshalerCache.LoadOrStore(t, fncs) - return v.(*arshaler) -} - -var stringsPools = &sync.Pool{New: func() any { return new(stringSlice) }} - -type stringSlice []string - -// getStrings returns a non-nil pointer to a slice with length n. -func getStrings(n int) *stringSlice { - s := stringsPools.Get().(*stringSlice) - if cap(*s) < n { - *s = make([]string, n) - } - *s = (*s)[:n] - return s -} - -func putStrings(s *stringSlice) { - if cap(*s) > 1<<10 { - *s = nil // avoid pinning arbitrarily large amounts of memory - } - stringsPools.Put(s) -} - -func (ss *stringSlice) Sort() { - slices.SortFunc(*ss, func(x, y string) int { return strings.Compare(x, y) }) -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go deleted file mode 100644 index fd034c1a1..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "cmp" - "math" - "reflect" - "strconv" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -// This file contains an optimized marshal and unmarshal implementation -// for the any type. This type is often used when the Go program has -// no knowledge of the JSON schema. This is a common enough occurrence -// to justify the complexity of adding logic for this. - -// marshalValueAny marshals a Go any as a JSON value. -// This assumes that there are no special formatting directives -// for any possible nested value. -func marshalValueAny(enc *jsontext.Encoder, val any, mo *jsonopts.Struct) error { - switch val := val.(type) { - case nil: - return enc.WriteToken(jsontext.Null) - case bool: - return enc.WriteToken(jsontext.Bool(val)) - case string: - return enc.WriteToken(jsontext.String(val)) - case float64: - if math.IsNaN(val) || math.IsInf(val, 0) { - break // use default logic below - } - return enc.WriteToken(jsontext.Float(val)) - case map[string]any: - return marshalObjectAny(enc, val, mo) - case []any: - return marshalArrayAny(enc, val, mo) - } - - v := newAddressableValue(reflect.TypeOf(val)) - v.Set(reflect.ValueOf(val)) - marshal := lookupArshaler(v.Type()).marshal - if mo.Marshalers != nil { - marshal, _ = mo.Marshalers.(*Marshalers).lookup(marshal, v.Type()) - } - return marshal(enc, v, mo) -} - -// unmarshalValueAny unmarshals a JSON value as a Go any. -// This assumes that there are no special formatting directives -// for any possible nested value. -// Duplicate names must be rejected since this does not implement merging. -func unmarshalValueAny(dec *jsontext.Decoder, uo *jsonopts.Struct) (any, error) { - switch k := dec.PeekKind(); k { - case '{': - return unmarshalObjectAny(dec, uo) - case '[': - return unmarshalArrayAny(dec, uo) - default: - xd := export.Decoder(dec) - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return nil, err - } - switch val.Kind() { - case 'n': - return nil, nil - case 'f': - return false, nil - case 't': - return true, nil - case '"': - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if xd.StringCache == nil { - xd.StringCache = new(stringCache) - } - return makeString(xd.StringCache, val), nil - case '0': - if uo.Flags.Get(jsonflags.UnmarshalAnyWithRawNumber) { - return internal.RawNumberOf(val), nil - } - fv, ok := jsonwire.ParseFloat(val, 64) - if !ok { - return fv, newUnmarshalErrorAfterWithValue(dec, float64Type, strconv.ErrRange) - } - return fv, nil - default: - panic("BUG: invalid kind: " + k.String()) - } - } -} - -// marshalObjectAny marshals a Go map[string]any as a JSON object -// (or as a JSON null if nil and [jsonflags.FormatNilMapAsNull]). -func marshalObjectAny(enc *jsontext.Encoder, obj map[string]any, mo *jsonopts.Struct) error { - // Check for cycles. - xe := export.Encoder(enc) - if xe.Tokens.Depth() > startDetectingCyclesAfter { - v := reflect.ValueOf(obj) - if err := visitPointer(&xe.SeenPointers, v); err != nil { - return newMarshalErrorBefore(enc, mapStringAnyType, err) - } - defer leavePointer(&xe.SeenPointers, v) - } - - // Handle empty maps. - if len(obj) == 0 { - if mo.Flags.Get(jsonflags.FormatNilMapAsNull) && obj == nil { - return enc.WriteToken(jsontext.Null) - } - // Optimize for marshaling an empty map without any preceding whitespace. - if !mo.Flags.Get(jsonflags.AnyWhitespace) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = append(xe.Tokens.MayAppendDelim(xe.Buf, '{'), "{}"...) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - } - - if err := enc.WriteToken(jsontext.BeginObject); err != nil { - return err - } - // A Go map guarantees that each entry has a unique key - // The only possibility of duplicates is due to invalid UTF-8. - if !mo.Flags.Get(jsonflags.AllowInvalidUTF8) { - xe.Tokens.Last.DisableNamespace() - } - if !mo.Flags.Get(jsonflags.Deterministic) || len(obj) <= 1 { - for name, val := range obj { - if err := enc.WriteToken(jsontext.String(name)); err != nil { - return err - } - if err := marshalValueAny(enc, val, mo); err != nil { - return err - } - } - } else { - names := getStrings(len(obj)) - var i int - for name := range obj { - (*names)[i] = name - i++ - } - names.Sort() - for _, name := range *names { - if err := enc.WriteToken(jsontext.String(name)); err != nil { - return err - } - if err := marshalValueAny(enc, obj[name], mo); err != nil { - return err - } - } - putStrings(names) - } - if err := enc.WriteToken(jsontext.EndObject); err != nil { - return err - } - return nil -} - -// unmarshalObjectAny unmarshals a JSON object as a Go map[string]any. -// It panics if not decoding a JSON object. -func unmarshalObjectAny(dec *jsontext.Decoder, uo *jsonopts.Struct) (map[string]any, error) { - switch tok, err := dec.ReadToken(); { - case err != nil: - return nil, err - case tok.Kind() != '{': - panic("BUG: invalid kind: " + tok.Kind().String()) - } - obj := make(map[string]any) - // A Go map guarantees that each entry has a unique key - // The only possibility of duplicates is due to invalid UTF-8. - if !uo.Flags.Get(jsonflags.AllowInvalidUTF8) { - export.Decoder(dec).Tokens.Last.DisableNamespace() - } - var errUnmarshal error - for dec.PeekKind() != '}' { - tok, err := dec.ReadToken() - if err != nil { - return obj, err - } - name := tok.String() - - // Manually check for duplicate names. - if _, ok := obj[name]; ok { - // TODO: Unread the object name. - name := export.Decoder(dec).PreviousTokenOrValue() - err := newDuplicateNameError(dec.StackPointer(), nil, dec.InputOffset()-len64(name)) - return obj, err - } - - val, err := unmarshalValueAny(dec, uo) - obj[name] = val - if err != nil { - if isFatalError(err, uo.Flags) { - return obj, err - } - errUnmarshal = cmp.Or(err, errUnmarshal) - } - } - if _, err := dec.ReadToken(); err != nil { - return obj, err - } - return obj, errUnmarshal -} - -// marshalArrayAny marshals a Go []any as a JSON array -// (or as a JSON null if nil and [jsonflags.FormatNilSliceAsNull]). -func marshalArrayAny(enc *jsontext.Encoder, arr []any, mo *jsonopts.Struct) error { - // Check for cycles. - xe := export.Encoder(enc) - if xe.Tokens.Depth() > startDetectingCyclesAfter { - v := reflect.ValueOf(arr) - if err := visitPointer(&xe.SeenPointers, v); err != nil { - return newMarshalErrorBefore(enc, sliceAnyType, err) - } - defer leavePointer(&xe.SeenPointers, v) - } - - // Handle empty slices. - if len(arr) == 0 { - if mo.Flags.Get(jsonflags.FormatNilSliceAsNull) && arr == nil { - return enc.WriteToken(jsontext.Null) - } - // Optimize for marshaling an empty slice without any preceding whitespace. - if !mo.Flags.Get(jsonflags.AnyWhitespace) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = append(xe.Tokens.MayAppendDelim(xe.Buf, '['), "[]"...) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - } - - if err := enc.WriteToken(jsontext.BeginArray); err != nil { - return err - } - for _, val := range arr { - if err := marshalValueAny(enc, val, mo); err != nil { - return err - } - } - if err := enc.WriteToken(jsontext.EndArray); err != nil { - return err - } - return nil -} - -// unmarshalArrayAny unmarshals a JSON array as a Go []any. -// It panics if not decoding a JSON array. -func unmarshalArrayAny(dec *jsontext.Decoder, uo *jsonopts.Struct) ([]any, error) { - switch tok, err := dec.ReadToken(); { - case err != nil: - return nil, err - case tok.Kind() != '[': - panic("BUG: invalid kind: " + tok.Kind().String()) - } - arr := []any{} - var errUnmarshal error - for dec.PeekKind() != ']' { - val, err := unmarshalValueAny(dec, uo) - arr = append(arr, val) - if err != nil { - if isFatalError(err, uo.Flags) { - return arr, err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - } - if _, err := dec.ReadToken(); err != nil { - return arr, err - } - return arr, errUnmarshal -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go deleted file mode 100644 index 3f21c8d35..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go +++ /dev/null @@ -1,1908 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "bytes" - "cmp" - "encoding" - "encoding/base32" - "encoding/base64" - "encoding/hex" - "errors" - "fmt" - "math" - "reflect" - "slices" - "strconv" - "strings" - "sync" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -// optimizeCommon specifies whether to use optimizations targeted for certain -// common patterns, rather than using the slower, but more general logic. -// All tests should pass regardless of whether this is true or not. -const optimizeCommon = true - -var ( - // Most natural Go type that correspond with each JSON type. - anyType = reflect.TypeFor[any]() // JSON value - boolType = reflect.TypeFor[bool]() // JSON bool - stringType = reflect.TypeFor[string]() // JSON string - float64Type = reflect.TypeFor[float64]() // JSON number - mapStringAnyType = reflect.TypeFor[map[string]any]() // JSON object - sliceAnyType = reflect.TypeFor[[]any]() // JSON array - - bytesType = reflect.TypeFor[[]byte]() - emptyStructType = reflect.TypeFor[struct{}]() -) - -const startDetectingCyclesAfter = 1000 - -type seenPointers = map[any]struct{} - -type typedPointer struct { - typ reflect.Type - ptr any // always stores unsafe.Pointer, but avoids depending on unsafe - len int // remember slice length to avoid false positives -} - -// visitPointer visits pointer p of type t, reporting an error if seen before. -// If successfully visited, then the caller must eventually call leave. -func visitPointer(m *seenPointers, v reflect.Value) error { - p := typedPointer{v.Type(), v.UnsafePointer(), sliceLen(v)} - if _, ok := (*m)[p]; ok { - return internal.ErrCycle - } - if *m == nil { - *m = make(seenPointers) - } - (*m)[p] = struct{}{} - return nil -} -func leavePointer(m *seenPointers, v reflect.Value) { - p := typedPointer{v.Type(), v.UnsafePointer(), sliceLen(v)} - delete(*m, p) -} - -func sliceLen(v reflect.Value) int { - if v.Kind() == reflect.Slice { - return v.Len() - } - return 0 -} - -func len64[Bytes ~[]byte | ~string](in Bytes) int64 { - return int64(len(in)) -} - -func makeDefaultArshaler(t reflect.Type) *arshaler { - switch t.Kind() { - case reflect.Bool: - return makeBoolArshaler(t) - case reflect.String: - return makeStringArshaler(t) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return makeIntArshaler(t) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return makeUintArshaler(t) - case reflect.Float32, reflect.Float64: - return makeFloatArshaler(t) - case reflect.Map: - return makeMapArshaler(t) - case reflect.Struct: - return makeStructArshaler(t) - case reflect.Slice: - fncs := makeSliceArshaler(t) - if t.Elem().Kind() == reflect.Uint8 { - return makeBytesArshaler(t, fncs) - } - return fncs - case reflect.Array: - fncs := makeArrayArshaler(t) - if t.Elem().Kind() == reflect.Uint8 { - return makeBytesArshaler(t, fncs) - } - return fncs - case reflect.Pointer: - return makePointerArshaler(t) - case reflect.Interface: - return makeInterfaceArshaler(t) - default: - return makeInvalidArshaler(t) - } -} - -func makeBoolArshaler(t reflect.Type) *arshaler { - var fncs arshaler - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - - // Optimize for marshaling without preceding whitespace. - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace|jsonflags.StringifyBoolsAndStrings) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = strconv.AppendBool(xe.Tokens.MayAppendDelim(xe.Buf, 't'), va.Bool()) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - - if mo.Flags.Get(jsonflags.StringifyBoolsAndStrings) { - if va.Bool() { - return enc.WriteToken(jsontext.String("true")) - } else { - return enc.WriteToken(jsontext.String("false")) - } - } - return enc.WriteToken(jsontext.Bool(va.Bool())) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - tok, err := dec.ReadToken() - if err != nil { - return err - } - k := tok.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetBool(false) - } - return nil - case 't', 'f': - if !uo.Flags.Get(jsonflags.StringifyBoolsAndStrings) { - va.SetBool(tok.Bool()) - return nil - } - case '"': - if uo.Flags.Get(jsonflags.StringifyBoolsAndStrings) { - switch tok.String() { - case "true": - va.SetBool(true) - case "false": - va.SetBool(false) - default: - if uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) && tok.String() == "null" { - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetBool(false) - } - return nil - } - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrSyntax) - } - return nil - } - } - return newUnmarshalErrorAfterWithSkipping(dec, t, nil) - } - return &fncs -} - -func makeStringArshaler(t reflect.Type) *arshaler { - var fncs arshaler - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - - // Optimize for marshaling without preceding whitespace. - s := va.String() - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace|jsonflags.StringifyBoolsAndStrings) && !xe.Tokens.Last.NeedObjectName() { - b := xe.Buf - b = xe.Tokens.MayAppendDelim(b, '"') - b, err := jsonwire.AppendQuote(b, s, &mo.Flags) - if err == nil { - xe.Buf = b - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - // Otherwise, the string contains invalid UTF-8, - // so let the logic below construct the proper error. - } - - if mo.Flags.Get(jsonflags.StringifyBoolsAndStrings) { - b, err := jsonwire.AppendQuote(nil, s, &mo.Flags) - if err != nil { - return newMarshalErrorBefore(enc, t, &jsontext.SyntacticError{Err: err}) - } - q, err := jsontext.AppendQuote(nil, b) - if err != nil { - panic("BUG: second AppendQuote should never fail: " + err.Error()) - } - return enc.WriteValue(q) - } - return enc.WriteToken(jsontext.String(s)) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - k := val.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetString("") - } - return nil - case '"': - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if uo.Flags.Get(jsonflags.StringifyBoolsAndStrings) { - val, err = jsontext.AppendUnquote(nil, val) - if err != nil { - return newUnmarshalErrorAfter(dec, t, err) - } - if uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) && string(val) == "null" { - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetString("") - } - return nil - } - } - if xd.StringCache == nil { - xd.StringCache = new(stringCache) - } - str := makeString(xd.StringCache, val) - va.SetString(str) - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - return &fncs -} - -var ( - appendEncodeBase16 = hex.AppendEncode - appendEncodeBase32 = base32.StdEncoding.AppendEncode - appendEncodeBase32Hex = base32.HexEncoding.AppendEncode - appendEncodeBase64 = base64.StdEncoding.AppendEncode - appendEncodeBase64URL = base64.URLEncoding.AppendEncode - encodedLenBase16 = hex.EncodedLen - encodedLenBase32 = base32.StdEncoding.EncodedLen - encodedLenBase32Hex = base32.HexEncoding.EncodedLen - encodedLenBase64 = base64.StdEncoding.EncodedLen - encodedLenBase64URL = base64.URLEncoding.EncodedLen - appendDecodeBase16 = hex.AppendDecode - appendDecodeBase32 = base32.StdEncoding.AppendDecode - appendDecodeBase32Hex = base32.HexEncoding.AppendDecode - appendDecodeBase64 = base64.StdEncoding.AppendDecode - appendDecodeBase64URL = base64.URLEncoding.AppendDecode -) - -func makeBytesArshaler(t reflect.Type, fncs *arshaler) *arshaler { - // NOTE: This handles both []~byte and [N]~byte. - // The v2 default is to treat a []namedByte as equivalent to []T - // since being able to convert []namedByte to []byte relies on - // dubious Go reflection behavior (see https://go.dev/issue/24746). - // For v1 emulation, we use jsonflags.FormatBytesWithLegacySemantics - // to forcibly treat []namedByte as a []byte. - marshalArray := fncs.marshal - isNamedByte := t.Elem().PkgPath() != "" - hasMarshaler := implementsAny(t.Elem(), allMarshalerTypes...) - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - if !mo.Flags.Get(jsonflags.FormatBytesWithLegacySemantics) && isNamedByte { - return marshalArray(enc, va, mo) // treat as []T or [N]T - } - xe := export.Encoder(enc) - appendEncode := appendEncodeBase64 - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - switch mo.Format { - case "base64": - appendEncode = appendEncodeBase64 - case "base64url": - appendEncode = appendEncodeBase64URL - case "base32": - appendEncode = appendEncodeBase32 - case "base32hex": - appendEncode = appendEncodeBase32Hex - case "base16", "hex": - appendEncode = appendEncodeBase16 - case "array": - mo.Format = "" - return marshalArray(enc, va, mo) - default: - return newInvalidFormatError(enc, t) - } - } else if mo.Flags.Get(jsonflags.FormatByteArrayAsArray) && va.Kind() == reflect.Array { - return marshalArray(enc, va, mo) - } else if mo.Flags.Get(jsonflags.FormatBytesWithLegacySemantics) && hasMarshaler { - return marshalArray(enc, va, mo) - } - if mo.Flags.Get(jsonflags.FormatNilSliceAsNull) && va.Kind() == reflect.Slice && va.IsNil() { - // TODO: Provide a "emitempty" format override? - return enc.WriteToken(jsontext.Null) - } - return xe.AppendRaw('"', true, func(b []byte) ([]byte, error) { - return appendEncode(b, va.Bytes()), nil - }) - } - unmarshalArray := fncs.unmarshal - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - if !uo.Flags.Get(jsonflags.FormatBytesWithLegacySemantics) && isNamedByte { - return unmarshalArray(dec, va, uo) // treat as []T or [N]T - } - xd := export.Decoder(dec) - appendDecode, encodedLen := appendDecodeBase64, encodedLenBase64 - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - switch uo.Format { - case "base64": - appendDecode, encodedLen = appendDecodeBase64, encodedLenBase64 - case "base64url": - appendDecode, encodedLen = appendDecodeBase64URL, encodedLenBase64URL - case "base32": - appendDecode, encodedLen = appendDecodeBase32, encodedLenBase32 - case "base32hex": - appendDecode, encodedLen = appendDecodeBase32Hex, encodedLenBase32Hex - case "base16", "hex": - appendDecode, encodedLen = appendDecodeBase16, encodedLenBase16 - case "array": - uo.Format = "" - return unmarshalArray(dec, va, uo) - default: - return newInvalidFormatError(dec, t) - } - } else if uo.Flags.Get(jsonflags.FormatByteArrayAsArray) && va.Kind() == reflect.Array { - return unmarshalArray(dec, va, uo) - } else if uo.Flags.Get(jsonflags.FormatBytesWithLegacySemantics) && dec.PeekKind() == '[' { - return unmarshalArray(dec, va, uo) - } - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - k := val.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) || va.Kind() != reflect.Array { - va.SetZero() - } - return nil - case '"': - // NOTE: The v2 default is to strictly comply with RFC 4648. - // Section 3.2 specifies that padding is required. - // Section 3.3 specifies that non-alphabet characters - // (e.g., '\r' or '\n') must be rejected. - // Section 3.5 specifies that unnecessary non-zero bits in - // the last quantum may be rejected. Since this is optional, - // we do not reject such inputs. - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - b, err := appendDecode(va.Bytes()[:0], val) - if err != nil { - return newUnmarshalErrorAfter(dec, t, err) - } - if len(val) != encodedLen(len(b)) && !uo.Flags.Get(jsonflags.ParseBytesWithLooseRFC4648) { - // TODO(https://go.dev/issue/53845): RFC 4648, section 3.3, - // specifies that non-alphabet characters must be rejected. - // Unfortunately, the "base32" and "base64" packages allow - // '\r' and '\n' characters by default. - i := bytes.IndexAny(val, "\r\n") - err := fmt.Errorf("illegal character %s at offset %d", jsonwire.QuoteRune(val[i:]), i) - return newUnmarshalErrorAfter(dec, t, err) - } - - if va.Kind() == reflect.Array { - dst := va.Bytes() - clear(dst[copy(dst, b):]) // noop if len(b) <= len(dst) - if len(b) != len(dst) && !uo.Flags.Get(jsonflags.UnmarshalArrayFromAnyLength) { - err := fmt.Errorf("decoded length of %d mismatches array length of %d", len(b), len(dst)) - return newUnmarshalErrorAfter(dec, t, err) - } - } else { - if b == nil { - b = []byte{} - } - va.SetBytes(b) - } - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - return fncs -} - -func makeIntArshaler(t reflect.Type) *arshaler { - var fncs arshaler - bits := t.Bits() - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - - // Optimize for marshaling without preceding whitespace or string escaping. - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace|jsonflags.StringifyNumbers) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = strconv.AppendInt(xe.Tokens.MayAppendDelim(xe.Buf, '0'), va.Int(), 10) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - - k := stringOrNumberKind(xe.Tokens.Last.NeedObjectName() || mo.Flags.Get(jsonflags.StringifyNumbers)) - return xe.AppendRaw(k, true, func(b []byte) ([]byte, error) { - return strconv.AppendInt(b, va.Int(), 10), nil - }) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - stringify := xd.Tokens.Last.NeedObjectName() || uo.Flags.Get(jsonflags.StringifyNumbers) - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - k := val.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetInt(0) - } - return nil - case '"': - if !stringify { - break - } - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) && string(val) == "null" { - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetInt(0) - } - return nil - } - fallthrough - case '0': - if stringify && k == '0' { - break - } - var negOffset int - neg := len(val) > 0 && val[0] == '-' - if neg { - negOffset = 1 - } - n, ok := jsonwire.ParseUint(val[negOffset:]) - maxInt := uint64(1) << (bits - 1) - overflow := (neg && n > maxInt) || (!neg && n > maxInt-1) - if !ok { - if n != math.MaxUint64 { - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrSyntax) - } - overflow = true - } - if overflow { - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrRange) - } - if neg { - va.SetInt(int64(-n)) - } else { - va.SetInt(int64(+n)) - } - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - return &fncs -} - -func makeUintArshaler(t reflect.Type) *arshaler { - var fncs arshaler - bits := t.Bits() - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - - // Optimize for marshaling without preceding whitespace or string escaping. - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace|jsonflags.StringifyNumbers) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = strconv.AppendUint(xe.Tokens.MayAppendDelim(xe.Buf, '0'), va.Uint(), 10) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - - k := stringOrNumberKind(xe.Tokens.Last.NeedObjectName() || mo.Flags.Get(jsonflags.StringifyNumbers)) - return xe.AppendRaw(k, true, func(b []byte) ([]byte, error) { - return strconv.AppendUint(b, va.Uint(), 10), nil - }) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - stringify := xd.Tokens.Last.NeedObjectName() || uo.Flags.Get(jsonflags.StringifyNumbers) - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - k := val.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetUint(0) - } - return nil - case '"': - if !stringify { - break - } - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) && string(val) == "null" { - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetUint(0) - } - return nil - } - fallthrough - case '0': - if stringify && k == '0' { - break - } - n, ok := jsonwire.ParseUint(val) - maxUint := uint64(1) << bits - overflow := n > maxUint-1 - if !ok { - if n != math.MaxUint64 { - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrSyntax) - } - overflow = true - } - if overflow { - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrRange) - } - va.SetUint(n) - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - return &fncs -} - -func makeFloatArshaler(t reflect.Type) *arshaler { - var fncs arshaler - bits := t.Bits() - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - var allowNonFinite bool - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - if mo.Format == "nonfinite" { - allowNonFinite = true - } else { - return newInvalidFormatError(enc, t) - } - } - - fv := va.Float() - if math.IsNaN(fv) || math.IsInf(fv, 0) { - if !allowNonFinite { - err := fmt.Errorf("unsupported value: %v", fv) - return newMarshalErrorBefore(enc, t, err) - } - return enc.WriteToken(jsontext.Float(fv)) - } - - // Optimize for marshaling without preceding whitespace or string escaping. - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace|jsonflags.StringifyNumbers) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = jsonwire.AppendFloat(xe.Tokens.MayAppendDelim(xe.Buf, '0'), fv, bits) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - - k := stringOrNumberKind(xe.Tokens.Last.NeedObjectName() || mo.Flags.Get(jsonflags.StringifyNumbers)) - return xe.AppendRaw(k, true, func(b []byte) ([]byte, error) { - return jsonwire.AppendFloat(b, va.Float(), bits), nil - }) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - var allowNonFinite bool - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - if uo.Format == "nonfinite" { - allowNonFinite = true - } else { - return newInvalidFormatError(dec, t) - } - } - stringify := xd.Tokens.Last.NeedObjectName() || uo.Flags.Get(jsonflags.StringifyNumbers) - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - k := val.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetFloat(0) - } - return nil - case '"': - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if allowNonFinite { - switch string(val) { - case "NaN": - va.SetFloat(math.NaN()) - return nil - case "Infinity": - va.SetFloat(math.Inf(+1)) - return nil - case "-Infinity": - va.SetFloat(math.Inf(-1)) - return nil - } - } - if !stringify { - break - } - if uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) && string(val) == "null" { - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetFloat(0) - } - return nil - } - if n, err := jsonwire.ConsumeNumber(val); n != len(val) || err != nil { - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrSyntax) - } - fallthrough - case '0': - if stringify && k == '0' { - break - } - fv, ok := jsonwire.ParseFloat(val, bits) - va.SetFloat(fv) - if !ok { - return newUnmarshalErrorAfterWithValue(dec, t, strconv.ErrRange) - } - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - return &fncs -} - -func makeMapArshaler(t reflect.Type) *arshaler { - // NOTE: The logic below disables namespaces for tracking duplicate names - // when handling map keys with a unique representation. - - // NOTE: Values retrieved from a map are not addressable, - // so we shallow copy the values to make them addressable and - // store them back into the map afterwards. - - var fncs arshaler - var ( - once sync.Once - keyFncs *arshaler - valFncs *arshaler - ) - init := func() { - keyFncs = lookupArshaler(t.Key()) - valFncs = lookupArshaler(t.Elem()) - } - nillableLegacyKey := t.Key().Kind() == reflect.Pointer && - implementsAny(t.Key(), textMarshalerType, textAppenderType) - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - // Check for cycles. - xe := export.Encoder(enc) - if xe.Tokens.Depth() > startDetectingCyclesAfter { - if err := visitPointer(&xe.SeenPointers, va.Value); err != nil { - return newMarshalErrorBefore(enc, t, err) - } - defer leavePointer(&xe.SeenPointers, va.Value) - } - - emitNull := mo.Flags.Get(jsonflags.FormatNilMapAsNull) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - switch mo.Format { - case "emitnull": - emitNull = true - mo.Format = "" - case "emitempty": - emitNull = false - mo.Format = "" - default: - return newInvalidFormatError(enc, t) - } - } - - // Handle empty maps. - n := va.Len() - if n == 0 { - if emitNull && va.IsNil() { - return enc.WriteToken(jsontext.Null) - } - // Optimize for marshaling an empty map without any preceding whitespace. - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = append(xe.Tokens.MayAppendDelim(xe.Buf, '{'), "{}"...) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - } - - once.Do(init) - if err := enc.WriteToken(jsontext.BeginObject); err != nil { - return err - } - if n > 0 { - nonDefaultKey := keyFncs.nonDefault - marshalKey := keyFncs.marshal - marshalVal := valFncs.marshal - if mo.Marshalers != nil { - var ok bool - marshalKey, ok = mo.Marshalers.(*Marshalers).lookup(marshalKey, t.Key()) - marshalVal, _ = mo.Marshalers.(*Marshalers).lookup(marshalVal, t.Elem()) - nonDefaultKey = nonDefaultKey || ok - } - k := newAddressableValue(t.Key()) - v := newAddressableValue(t.Elem()) - - // A Go map guarantees that each entry has a unique key. - // As such, disable the expensive duplicate name check if we know - // that every Go key will serialize as a unique JSON string. - if !nonDefaultKey && mapKeyWithUniqueRepresentation(k.Kind(), mo.Flags.Get(jsonflags.AllowInvalidUTF8)) { - xe.Tokens.Last.DisableNamespace() - } - - switch { - case !mo.Flags.Get(jsonflags.Deterministic) || n <= 1: - for iter := va.Value.MapRange(); iter.Next(); { - k.SetIterKey(iter) - err := marshalKey(enc, k, mo) - if err != nil { - if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - errors.Is(err, jsontext.ErrNonStringName) && nillableLegacyKey && k.IsNil() { - err = enc.WriteToken(jsontext.String("")) - } - if err != nil { - if serr, ok := err.(*jsontext.SyntacticError); ok && serr.Err == jsontext.ErrNonStringName { - err = newMarshalErrorBefore(enc, k.Type(), err) - } - return err - } - } - v.SetIterValue(iter) - if err := marshalVal(enc, v, mo); err != nil { - return err - } - } - case !nonDefaultKey && t.Key().Kind() == reflect.String: - names := getStrings(n) - for i, iter := 0, va.Value.MapRange(); i < n && iter.Next(); i++ { - k.SetIterKey(iter) - (*names)[i] = k.String() - } - names.Sort() - for _, name := range *names { - if err := enc.WriteToken(jsontext.String(name)); err != nil { - return err - } - // TODO(https://go.dev/issue/57061): Use v.SetMapIndexOf. - k.SetString(name) - v.Set(va.MapIndex(k.Value)) - if err := marshalVal(enc, v, mo); err != nil { - return err - } - } - putStrings(names) - default: - type member struct { - name string // unquoted name - key addressableValue - val addressableValue - } - members := make([]member, n) - keys := reflect.MakeSlice(reflect.SliceOf(t.Key()), n, n) - vals := reflect.MakeSlice(reflect.SliceOf(t.Elem()), n, n) - for i, iter := 0, va.Value.MapRange(); i < n && iter.Next(); i++ { - // Marshal the member name. - k := addressableValue{keys.Index(i), true} // indexed slice element is always addressable - k.SetIterKey(iter) - v := addressableValue{vals.Index(i), true} // indexed slice element is always addressable - v.SetIterValue(iter) - err := marshalKey(enc, k, mo) - if err != nil { - if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - errors.Is(err, jsontext.ErrNonStringName) && nillableLegacyKey && k.IsNil() { - err = enc.WriteToken(jsontext.String("")) - } - if err != nil { - if serr, ok := err.(*jsontext.SyntacticError); ok && serr.Err == jsontext.ErrNonStringName { - err = newMarshalErrorBefore(enc, k.Type(), err) - } - return err - } - } - name := xe.UnwriteOnlyObjectMemberName() - members[i] = member{name, k, v} - } - // TODO: If AllowDuplicateNames is enabled, then sort according - // to reflect.Value as well if the names are equal. - // See internal/fmtsort. - slices.SortFunc(members, func(x, y member) int { - return strings.Compare(x.name, y.name) - }) - for _, member := range members { - if err := enc.WriteToken(jsontext.String(member.name)); err != nil { - return err - } - if err := marshalVal(enc, member.val, mo); err != nil { - return err - } - } - } - } - if err := enc.WriteToken(jsontext.EndObject); err != nil { - return err - } - return nil - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - switch uo.Format { - case "emitnull", "emitempty": - uo.Format = "" // only relevant for marshaling - default: - return newInvalidFormatError(dec, t) - } - } - tok, err := dec.ReadToken() - if err != nil { - return err - } - k := tok.Kind() - switch k { - case 'n': - va.SetZero() - return nil - case '{': - once.Do(init) - if va.IsNil() { - va.Set(reflect.MakeMap(t)) - } - - nonDefaultKey := keyFncs.nonDefault - unmarshalKey := keyFncs.unmarshal - unmarshalVal := valFncs.unmarshal - if uo.Unmarshalers != nil { - var ok bool - unmarshalKey, ok = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshalKey, t.Key()) - unmarshalVal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshalVal, t.Elem()) - nonDefaultKey = nonDefaultKey || ok - } - k := newAddressableValue(t.Key()) - v := newAddressableValue(t.Elem()) - - // Manually check for duplicate entries by virtue of whether the - // unmarshaled key already exists in the destination Go map. - // Consequently, syntactically different names (e.g., "0" and "-0") - // will be rejected as duplicates since they semantically refer - // to the same Go value. This is an unusual interaction - // between syntax and semantics, but is more correct. - if !nonDefaultKey && mapKeyWithUniqueRepresentation(k.Kind(), uo.Flags.Get(jsonflags.AllowInvalidUTF8)) { - xd.Tokens.Last.DisableNamespace() - } - - // In the rare case where the map is not already empty, - // then we need to manually track which keys we already saw - // since existing presence alone is insufficient to indicate - // whether the input had a duplicate name. - var seen reflect.Value - if !uo.Flags.Get(jsonflags.AllowDuplicateNames) && va.Len() > 0 { - seen = reflect.MakeMap(reflect.MapOf(k.Type(), emptyStructType)) - } - - var errUnmarshal error - for dec.PeekKind() != '}' { - // Unmarshal the map entry key. - k.SetZero() - err := unmarshalKey(dec, k, uo) - if err != nil { - if isFatalError(err, uo.Flags) { - return err - } - if err := dec.SkipValue(); err != nil { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - continue - } - if k.Kind() == reflect.Interface && !k.IsNil() && !k.Elem().Type().Comparable() { - err := newUnmarshalErrorAfter(dec, t, fmt.Errorf("invalid incomparable key type %v", k.Elem().Type())) - if !uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err - } - if err2 := dec.SkipValue(); err2 != nil { - return err2 - } - errUnmarshal = cmp.Or(errUnmarshal, err) - continue - } - - // Check if a pre-existing map entry value exists for this key. - if v2 := va.MapIndex(k.Value); v2.IsValid() { - if !uo.Flags.Get(jsonflags.AllowDuplicateNames) && (!seen.IsValid() || seen.MapIndex(k.Value).IsValid()) { - // TODO: Unread the object name. - name := xd.PreviousTokenOrValue() - return newDuplicateNameError(dec.StackPointer(), nil, dec.InputOffset()-len64(name)) - } - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - v.Set(v2) - } else { - v.SetZero() - } - } else { - v.SetZero() - } - - // Unmarshal the map entry value. - err = unmarshalVal(dec, v, uo) - va.SetMapIndex(k.Value, v.Value) - if seen.IsValid() { - seen.SetMapIndex(k.Value, reflect.Zero(emptyStructType)) - } - if err != nil { - if isFatalError(err, uo.Flags) { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - } - if _, err := dec.ReadToken(); err != nil { - return err - } - return errUnmarshal - } - return newUnmarshalErrorAfterWithSkipping(dec, t, nil) - } - return &fncs -} - -// mapKeyWithUniqueRepresentation reports whether all possible values of k -// marshal to a different JSON value, and whether all possible JSON values -// that can unmarshal into k unmarshal to different Go values. -// In other words, the representation must be a bijective. -func mapKeyWithUniqueRepresentation(k reflect.Kind, allowInvalidUTF8 bool) bool { - switch k { - case reflect.Bool, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return true - case reflect.String: - // For strings, we have to be careful since names with invalid UTF-8 - // maybe unescape to the same Go string value. - return !allowInvalidUTF8 - default: - // Floating-point kinds are not listed above since NaNs - // can appear multiple times and all serialize as "NaN". - return false - } -} - -var errNilField = errors.New("cannot set embedded pointer to unexported struct type") - -func makeStructArshaler(t reflect.Type) *arshaler { - // NOTE: The logic below disables namespaces for tracking duplicate names - // and does the tracking locally with an efficient bit-set based on which - // Go struct fields were seen. - - var fncs arshaler - var ( - once sync.Once - fields structFields - errInit *SemanticError - ) - init := func() { - fields, errInit = makeStructFields(t) - } - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - once.Do(init) - if errInit != nil && !mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return newMarshalErrorBefore(enc, errInit.GoType, errInit.Err) - } - if err := enc.WriteToken(jsontext.BeginObject); err != nil { - return err - } - var seenIdxs uintSet - prevIdx := -1 - xe.Tokens.Last.DisableNamespace() // we manually ensure unique names below - for i := range fields.flattened { - f := &fields.flattened[i] - v := addressableValue{va.Field(f.index0), va.forcedAddr} // addressable if struct value is addressable - if len(f.index) > 0 { - v = v.fieldByIndex(f.index, false) - if !v.IsValid() { - continue // implies a nil inlined field - } - } - - // OmitZero skips the field if the Go value is zero, - // which we can determine up front without calling the marshaler. - if (f.omitzero || mo.Flags.Get(jsonflags.OmitZeroStructFields)) && - ((f.isZero == nil && v.IsZero()) || (f.isZero != nil && f.isZero(v))) { - continue - } - - // Check for the legacy definition of omitempty. - if f.omitempty && mo.Flags.Get(jsonflags.OmitEmptyWithLegacySemantics) && isLegacyEmpty(v) { - continue - } - - marshal := f.fncs.marshal - nonDefault := f.fncs.nonDefault - if mo.Marshalers != nil { - var ok bool - marshal, ok = mo.Marshalers.(*Marshalers).lookup(marshal, f.typ) - nonDefault = nonDefault || ok - } - - // OmitEmpty skips the field if the marshaled JSON value is empty, - // which we can know up front if there are no custom marshalers, - // otherwise we must marshal the value and unwrite it if empty. - if f.omitempty && !mo.Flags.Get(jsonflags.OmitEmptyWithLegacySemantics) && - !nonDefault && f.isEmpty != nil && f.isEmpty(v) { - continue // fast path for omitempty - } - - // Write the object member name. - // - // The logic below is semantically equivalent to: - // enc.WriteToken(String(f.name)) - // but specialized and simplified because: - // 1. The Encoder must be expecting an object name. - // 2. The object namespace is guaranteed to be disabled. - // 3. The object name is guaranteed to be valid and pre-escaped. - // 4. There is no need to flush the buffer (for unwrite purposes). - // 5. There is no possibility of an error occurring. - if optimizeCommon { - // Append any delimiters or optional whitespace. - b := xe.Buf - if xe.Tokens.Last.Length() > 0 { - b = append(b, ',') - if mo.Flags.Get(jsonflags.SpaceAfterComma) { - b = append(b, ' ') - } - } - if mo.Flags.Get(jsonflags.Multiline) { - b = xe.AppendIndent(b, xe.Tokens.NeedIndent('"')) - } - - // Append the token to the output and to the state machine. - n0 := len(b) // offset before calling AppendQuote - if !f.nameNeedEscape { - b = append(b, f.quotedName...) - } else { - b, _ = jsonwire.AppendQuote(b, f.name, &mo.Flags) - } - xe.Buf = b - xe.Names.ReplaceLastQuotedOffset(n0) - xe.Tokens.Last.Increment() - } else { - if err := enc.WriteToken(jsontext.String(f.name)); err != nil { - return err - } - } - - // Write the object member value. - flagsOriginal := mo.Flags - if f.string { - if !mo.Flags.Get(jsonflags.StringifyWithLegacySemantics) { - mo.Flags.Set(jsonflags.StringifyNumbers | 1) - } else if canLegacyStringify(f.typ) { - mo.Flags.Set(jsonflags.StringifyNumbers | jsonflags.StringifyBoolsAndStrings | 1) - } - } - if f.format != "" { - mo.FormatDepth = xe.Tokens.Depth() - mo.Format = f.format - } - err := marshal(enc, v, mo) - mo.Flags = flagsOriginal - mo.Format = "" - if err != nil { - return err - } - - // Try unwriting the member if empty (slow path for omitempty). - if f.omitempty && !mo.Flags.Get(jsonflags.OmitEmptyWithLegacySemantics) { - var prevName *string - if prevIdx >= 0 { - prevName = &fields.flattened[prevIdx].name - } - if xe.UnwriteEmptyObjectMember(prevName) { - continue - } - } - - // Remember the previous written object member. - // The set of seen fields only needs to be updated to detect - // duplicate names with those from the inlined fallback. - if !mo.Flags.Get(jsonflags.AllowDuplicateNames) && fields.inlinedFallback != nil { - seenIdxs.insert(uint(f.id)) - } - prevIdx = f.id - } - if fields.inlinedFallback != nil && !(mo.Flags.Get(jsonflags.DiscardUnknownMembers) && fields.inlinedFallback.unknown) { - var insertUnquotedName func([]byte) bool - if !mo.Flags.Get(jsonflags.AllowDuplicateNames) { - insertUnquotedName = func(name []byte) bool { - // Check that the name from inlined fallback does not match - // one of the previously marshaled names from known fields. - if foldedFields := fields.lookupByFoldedName(name); len(foldedFields) > 0 { - if f := fields.byActualName[string(name)]; f != nil { - return seenIdxs.insert(uint(f.id)) - } - for _, f := range foldedFields { - if f.matchFoldedName(name, &mo.Flags) { - return seenIdxs.insert(uint(f.id)) - } - } - } - - // Check that the name does not match any other name - // previously marshaled from the inlined fallback. - return xe.Namespaces.Last().InsertUnquoted(name) - } - } - if err := marshalInlinedFallbackAll(enc, va, mo, fields.inlinedFallback, insertUnquotedName); err != nil { - return err - } - } - if err := enc.WriteToken(jsontext.EndObject); err != nil { - return err - } - return nil - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - tok, err := dec.ReadToken() - if err != nil { - return err - } - k := tok.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetZero() - } - return nil - case '{': - once.Do(init) - if errInit != nil && !uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return newUnmarshalErrorAfter(dec, errInit.GoType, errInit.Err) - } - var seenIdxs uintSet - xd.Tokens.Last.DisableNamespace() - var errUnmarshal error - for dec.PeekKind() != '}' { - // Process the object member name. - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - name := jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - f := fields.byActualName[string(name)] - if f == nil { - for _, f2 := range fields.lookupByFoldedName(name) { - if f2.matchFoldedName(name, &uo.Flags) { - f = f2 - break - } - } - if f == nil { - if uo.Flags.Get(jsonflags.RejectUnknownMembers) && (fields.inlinedFallback == nil || fields.inlinedFallback.unknown) { - err := newUnmarshalErrorAfter(dec, t, ErrUnknownName) - if !uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - if !uo.Flags.Get(jsonflags.AllowDuplicateNames) && !xd.Namespaces.Last().InsertUnquoted(name) { - // TODO: Unread the object name. - return newDuplicateNameError(dec.StackPointer(), nil, dec.InputOffset()-len64(val)) - } - - if fields.inlinedFallback == nil { - // Skip unknown value since we have no place to store it. - if err := dec.SkipValue(); err != nil { - return err - } - } else { - // Marshal into value capable of storing arbitrary object members. - if err := unmarshalInlinedFallbackNext(dec, va, uo, fields.inlinedFallback, val, name); err != nil { - if isFatalError(err, uo.Flags) { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - } - continue - } - } - if !uo.Flags.Get(jsonflags.AllowDuplicateNames) && !seenIdxs.insert(uint(f.id)) { - // TODO: Unread the object name. - return newDuplicateNameError(dec.StackPointer(), nil, dec.InputOffset()-len64(val)) - } - - // Process the object member value. - unmarshal := f.fncs.unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, f.typ) - } - flagsOriginal := uo.Flags - if f.string { - if !uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) { - uo.Flags.Set(jsonflags.StringifyNumbers | 1) - } else if canLegacyStringify(f.typ) { - uo.Flags.Set(jsonflags.StringifyNumbers | jsonflags.StringifyBoolsAndStrings | 1) - } - } - if f.format != "" { - uo.FormatDepth = xd.Tokens.Depth() - uo.Format = f.format - } - v := addressableValue{va.Field(f.index0), va.forcedAddr} // addressable if struct value is addressable - if len(f.index) > 0 { - v = v.fieldByIndex(f.index, true) - if !v.IsValid() { - err := newUnmarshalErrorBefore(dec, t, errNilField) - if !uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - unmarshal = func(dec *jsontext.Decoder, _ addressableValue, _ *jsonopts.Struct) error { - return dec.SkipValue() - } - } - } - err = unmarshal(dec, v, uo) - uo.Flags = flagsOriginal - uo.Format = "" - if err != nil { - if isFatalError(err, uo.Flags) { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - } - if _, err := dec.ReadToken(); err != nil { - return err - } - return errUnmarshal - } - return newUnmarshalErrorAfterWithSkipping(dec, t, nil) - } - return &fncs -} - -func (va addressableValue) fieldByIndex(index []int, mayAlloc bool) addressableValue { - for _, i := range index { - va = va.indirect(mayAlloc) - if !va.IsValid() { - return va - } - va = addressableValue{va.Field(i), va.forcedAddr} // addressable if struct value is addressable - } - return va -} - -func (va addressableValue) indirect(mayAlloc bool) addressableValue { - if va.Kind() == reflect.Pointer { - if va.IsNil() { - if !mayAlloc || !va.CanSet() { - return addressableValue{} - } - va.Set(reflect.New(va.Type().Elem())) - } - va = addressableValue{va.Elem(), false} // dereferenced pointer is always addressable - } - return va -} - -// isLegacyEmpty reports whether a value is empty according to the v1 definition. -func isLegacyEmpty(v addressableValue) bool { - // Equivalent to encoding/json.isEmptyValue@v1.21.0. - switch v.Kind() { - case reflect.Bool: - return v.Bool() == false - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.String, reflect.Map, reflect.Slice, reflect.Array: - return v.Len() == 0 - case reflect.Pointer, reflect.Interface: - return v.IsNil() - } - return false -} - -// canLegacyStringify reports whether t can be stringified according to v1, -// where t is a bool, string, or number (or unnamed pointer to such). -// In v1, the `string` option does not apply recursively to nested types within -// a composite Go type (e.g., an array, slice, struct, map, or interface). -func canLegacyStringify(t reflect.Type) bool { - // Based on encoding/json.typeFields#L1126-L1143@v1.23.0 - if t.Name() == "" && t.Kind() == reflect.Ptr { - t = t.Elem() - } - switch t.Kind() { - case reflect.Bool, reflect.String, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, - reflect.Float32, reflect.Float64: - return true - } - return false -} - -func makeSliceArshaler(t reflect.Type) *arshaler { - var fncs arshaler - var ( - once sync.Once - valFncs *arshaler - ) - init := func() { - valFncs = lookupArshaler(t.Elem()) - } - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - // Check for cycles. - xe := export.Encoder(enc) - if xe.Tokens.Depth() > startDetectingCyclesAfter { - if err := visitPointer(&xe.SeenPointers, va.Value); err != nil { - return newMarshalErrorBefore(enc, t, err) - } - defer leavePointer(&xe.SeenPointers, va.Value) - } - - emitNull := mo.Flags.Get(jsonflags.FormatNilSliceAsNull) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - switch mo.Format { - case "emitnull": - emitNull = true - mo.Format = "" - case "emitempty": - emitNull = false - mo.Format = "" - default: - return newInvalidFormatError(enc, t) - } - } - - // Handle empty slices. - n := va.Len() - if n == 0 { - if emitNull && va.IsNil() { - return enc.WriteToken(jsontext.Null) - } - // Optimize for marshaling an empty slice without any preceding whitespace. - if optimizeCommon && !mo.Flags.Get(jsonflags.AnyWhitespace) && !xe.Tokens.Last.NeedObjectName() { - xe.Buf = append(xe.Tokens.MayAppendDelim(xe.Buf, '['), "[]"...) - xe.Tokens.Last.Increment() - if xe.NeedFlush() { - return xe.Flush() - } - return nil - } - } - - once.Do(init) - if err := enc.WriteToken(jsontext.BeginArray); err != nil { - return err - } - marshal := valFncs.marshal - if mo.Marshalers != nil { - marshal, _ = mo.Marshalers.(*Marshalers).lookup(marshal, t.Elem()) - } - for i := range n { - v := addressableValue{va.Index(i), false} // indexed slice element is always addressable - if err := marshal(enc, v, mo); err != nil { - return err - } - } - if err := enc.WriteToken(jsontext.EndArray); err != nil { - return err - } - return nil - } - emptySlice := reflect.MakeSlice(t, 0, 0) - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - switch uo.Format { - case "emitnull", "emitempty": - uo.Format = "" // only relevant for marshaling - default: - return newInvalidFormatError(dec, t) - } - } - - tok, err := dec.ReadToken() - if err != nil { - return err - } - k := tok.Kind() - switch k { - case 'n': - va.SetZero() - return nil - case '[': - once.Do(init) - unmarshal := valFncs.unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, t.Elem()) - } - mustZero := true // we do not know the cleanliness of unused capacity - cap := va.Cap() - if cap > 0 { - va.SetLen(cap) - } - var i int - var errUnmarshal error - for dec.PeekKind() != ']' { - if i == cap { - va.Value.Grow(1) - cap = va.Cap() - va.SetLen(cap) - mustZero = false // reflect.Value.Grow ensures new capacity is zero-initialized - } - v := addressableValue{va.Index(i), false} // indexed slice element is always addressable - i++ - if mustZero && !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - v.SetZero() - } - if err := unmarshal(dec, v, uo); err != nil { - if isFatalError(err, uo.Flags) { - va.SetLen(i) - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - } - if i == 0 { - va.Set(emptySlice) - } else { - va.SetLen(i) - } - if _, err := dec.ReadToken(); err != nil { - return err - } - return errUnmarshal - } - return newUnmarshalErrorAfterWithSkipping(dec, t, nil) - } - return &fncs -} - -var errArrayUnderflow = errors.New("too few array elements") -var errArrayOverflow = errors.New("too many array elements") - -func makeArrayArshaler(t reflect.Type) *arshaler { - var fncs arshaler - var ( - once sync.Once - valFncs *arshaler - ) - init := func() { - valFncs = lookupArshaler(t.Elem()) - } - n := t.Len() - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - once.Do(init) - if err := enc.WriteToken(jsontext.BeginArray); err != nil { - return err - } - marshal := valFncs.marshal - if mo.Marshalers != nil { - marshal, _ = mo.Marshalers.(*Marshalers).lookup(marshal, t.Elem()) - } - for i := range n { - v := addressableValue{va.Index(i), va.forcedAddr} // indexed array element is addressable if array is addressable - if err := marshal(enc, v, mo); err != nil { - return err - } - } - if err := enc.WriteToken(jsontext.EndArray); err != nil { - return err - } - return nil - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - tok, err := dec.ReadToken() - if err != nil { - return err - } - k := tok.Kind() - switch k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetZero() - } - return nil - case '[': - once.Do(init) - unmarshal := valFncs.unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, t.Elem()) - } - var i int - var errUnmarshal error - for dec.PeekKind() != ']' { - if i >= n { - if err := dec.SkipValue(); err != nil { - return err - } - err = errArrayOverflow - continue - } - v := addressableValue{va.Index(i), va.forcedAddr} // indexed array element is addressable if array is addressable - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - v.SetZero() - } - if err := unmarshal(dec, v, uo); err != nil { - if isFatalError(err, uo.Flags) { - return err - } - errUnmarshal = cmp.Or(errUnmarshal, err) - } - i++ - } - for ; i < n; i++ { - va.Index(i).SetZero() - err = errArrayUnderflow - } - if _, err := dec.ReadToken(); err != nil { - return err - } - if err != nil && !uo.Flags.Get(jsonflags.UnmarshalArrayFromAnyLength) { - return newUnmarshalErrorAfter(dec, t, err) - } - return errUnmarshal - } - return newUnmarshalErrorAfterWithSkipping(dec, t, nil) - } - return &fncs -} - -func makePointerArshaler(t reflect.Type) *arshaler { - var fncs arshaler - var ( - once sync.Once - valFncs *arshaler - ) - init := func() { - valFncs = lookupArshaler(t.Elem()) - } - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - // Check for cycles. - xe := export.Encoder(enc) - if xe.Tokens.Depth() > startDetectingCyclesAfter { - if err := visitPointer(&xe.SeenPointers, va.Value); err != nil { - return newMarshalErrorBefore(enc, t, err) - } - defer leavePointer(&xe.SeenPointers, va.Value) - } - - // NOTE: Struct.Format is forwarded to underlying marshal. - if va.IsNil() { - return enc.WriteToken(jsontext.Null) - } - once.Do(init) - marshal := valFncs.marshal - if mo.Marshalers != nil { - marshal, _ = mo.Marshalers.(*Marshalers).lookup(marshal, t.Elem()) - } - v := addressableValue{va.Elem(), false} // dereferenced pointer is always addressable - return marshal(enc, v, mo) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - // NOTE: Struct.Format is forwarded to underlying unmarshal. - if dec.PeekKind() == 'n' { - if _, err := dec.ReadToken(); err != nil { - return err - } - va.SetZero() - return nil - } - once.Do(init) - unmarshal := valFncs.unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, t.Elem()) - } - if va.IsNil() { - va.Set(reflect.New(t.Elem())) - } - v := addressableValue{va.Elem(), false} // dereferenced pointer is always addressable - if err := unmarshal(dec, v, uo); err != nil { - return err - } - if uo.Flags.Get(jsonflags.StringifyWithLegacySemantics) && - uo.Flags.Get(jsonflags.StringifyNumbers|jsonflags.StringifyBoolsAndStrings) { - // A JSON null quoted within a JSON string should take effect - // within the pointer value, rather than the indirect value. - // - // TODO: This does not correctly handle escaped nulls - // (e.g., "\u006e\u0075\u006c\u006c"), but is good enough - // for such an esoteric use case of the `string` option. - if string(export.Decoder(dec).PreviousTokenOrValue()) == `"null"` { - va.SetZero() - } - } - return nil - } - return &fncs -} - -func makeInterfaceArshaler(t reflect.Type) *arshaler { - // NOTE: Values retrieved from an interface are not addressable, - // so we shallow copy the values to make them addressable and - // store them back into the interface afterwards. - - var fncs arshaler - var whichMarshaler reflect.Type - for _, iface := range allMarshalerTypes { - if t.Implements(iface) { - whichMarshaler = t - break - } - } - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - return newInvalidFormatError(enc, t) - } - if va.IsNil() { - return enc.WriteToken(jsontext.Null) - } else if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && whichMarshaler != nil { - // The marshaler for a pointer never calls the method on a nil receiver. - // Wrap the nil pointer within a struct type so that marshal - // instead appears on a value receiver and may be called. - if va.Elem().Kind() == reflect.Pointer && va.Elem().IsNil() { - v2 := newAddressableValue(whichMarshaler) - switch whichMarshaler { - case jsonMarshalerToType: - v2.Set(reflect.ValueOf(struct{ MarshalerTo }{va.Elem().Interface().(MarshalerTo)})) - case jsonMarshalerType: - v2.Set(reflect.ValueOf(struct{ Marshaler }{va.Elem().Interface().(Marshaler)})) - case textAppenderType: - v2.Set(reflect.ValueOf(struct{ encoding.TextAppender }{va.Elem().Interface().(encoding.TextAppender)})) - case textMarshalerType: - v2.Set(reflect.ValueOf(struct{ encoding.TextMarshaler }{va.Elem().Interface().(encoding.TextMarshaler)})) - } - va = v2 - } - } - v := newAddressableValue(va.Elem().Type()) - v.Set(va.Elem()) - marshal := lookupArshaler(v.Type()).marshal - if mo.Marshalers != nil { - marshal, _ = mo.Marshalers.(*Marshalers).lookup(marshal, v.Type()) - } - // Optimize for the any type if there are no special options. - if optimizeCommon && - t == anyType && !mo.Flags.Get(jsonflags.StringifyNumbers|jsonflags.StringifyBoolsAndStrings) && mo.Format == "" && - (mo.Marshalers == nil || !mo.Marshalers.(*Marshalers).fromAny) { - return marshalValueAny(enc, va.Elem().Interface(), mo) - } - return marshal(enc, v, mo) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - return newInvalidFormatError(dec, t) - } - if uo.Flags.Get(jsonflags.MergeWithLegacySemantics) && !va.IsNil() { - // Legacy merge behavior is difficult to explain. - // In general, it only merges for non-nil pointer kinds. - // As a special case, unmarshaling a JSON null into a pointer - // sets a concrete nil pointer of the underlying type - // (rather than setting the interface value itself to nil). - e := va.Elem() - if e.Kind() == reflect.Pointer && !e.IsNil() { - if dec.PeekKind() == 'n' && e.Elem().Kind() == reflect.Pointer { - if _, err := dec.ReadToken(); err != nil { - return err - } - va.Elem().Elem().SetZero() - return nil - } - } else { - va.SetZero() - } - } - if dec.PeekKind() == 'n' { - if _, err := dec.ReadToken(); err != nil { - return err - } - va.SetZero() - return nil - } - var v addressableValue - if va.IsNil() { - // Optimize for the any type if there are no special options. - // We do not care about stringified numbers since JSON strings - // are always unmarshaled into an any value as Go strings. - // Duplicate name check must be enforced since unmarshalValueAny - // does not implement merge semantics. - if optimizeCommon && - t == anyType && !uo.Flags.Get(jsonflags.AllowDuplicateNames) && uo.Format == "" && - (uo.Unmarshalers == nil || !uo.Unmarshalers.(*Unmarshalers).fromAny) { - v, err := unmarshalValueAny(dec, uo) - // We must check for nil interface values up front. - // See https://go.dev/issue/52310. - if v != nil { - va.Set(reflect.ValueOf(v)) - } - return err - } - - k := dec.PeekKind() - if !isAnyType(t) { - return newUnmarshalErrorBeforeWithSkipping(dec, t, internal.ErrNilInterface) - } - switch k { - case 'f', 't': - v = newAddressableValue(boolType) - case '"': - v = newAddressableValue(stringType) - case '0': - if uo.Flags.Get(jsonflags.UnmarshalAnyWithRawNumber) { - v = addressableValue{reflect.ValueOf(internal.NewRawNumber()).Elem(), true} - } else { - v = newAddressableValue(float64Type) - } - case '{': - v = newAddressableValue(mapStringAnyType) - case '[': - v = newAddressableValue(sliceAnyType) - default: - // If k is invalid (e.g., due to an I/O or syntax error), then - // that will be cached by PeekKind and returned by ReadValue. - // If k is '}' or ']', then ReadValue must error since - // those are invalid kinds at the start of a JSON value. - _, err := dec.ReadValue() - return err - } - } else { - // Shallow copy the existing value to keep it addressable. - // Any mutations at the top-level of the value will be observable - // since we always store this value back into the interface value. - v = newAddressableValue(va.Elem().Type()) - v.Set(va.Elem()) - } - unmarshal := lookupArshaler(v.Type()).unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, v.Type()) - } - err := unmarshal(dec, v, uo) - va.Set(v.Value) - return err - } - return &fncs -} - -// isAnyType reports wether t is equivalent to the any interface type. -func isAnyType(t reflect.Type) bool { - // This is forward compatible if the Go language permits type sets within - // ordinary interfaces where an interface with zero methods does not - // necessarily mean it can hold every possible Go type. - // See https://go.dev/issue/45346. - return t == anyType || anyType.Implements(t) -} - -func makeInvalidArshaler(t reflect.Type) *arshaler { - var fncs arshaler - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - return newMarshalErrorBefore(enc, t, nil) - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - return newUnmarshalErrorBefore(dec, t, nil) - } - return &fncs -} - -func stringOrNumberKind(isString bool) jsontext.Kind { - if isString { - return '"' - } else { - return '0' - } -} - -type uintSet64 uint64 - -func (s uintSet64) has(i uint) bool { return s&(1< 0 } -func (s *uintSet64) set(i uint) { *s |= 1 << i } - -// uintSet is a set of unsigned integers. -// It is optimized for most integers being close to zero. -type uintSet struct { - lo uintSet64 - hi []uintSet64 -} - -// has reports whether i is in the set. -func (s *uintSet) has(i uint) bool { - if i < 64 { - return s.lo.has(i) - } else { - i -= 64 - iHi, iLo := int(i/64), i%64 - return iHi < len(s.hi) && s.hi[iHi].has(iLo) - } -} - -// insert inserts i into the set and reports whether it was the first insertion. -func (s *uintSet) insert(i uint) bool { - // TODO: Make this inlinable at least for the lower 64-bit case. - if i < 64 { - has := s.lo.has(i) - s.lo.set(i) - return !has - } else { - i -= 64 - iHi, iLo := int(i/64), i%64 - if iHi >= len(s.hi) { - s.hi = append(s.hi, make([]uintSet64, iHi+1-len(s.hi))...) - s.hi = s.hi[:cap(s.hi)] - } - has := s.hi[iHi].has(iLo) - s.hi[iHi].set(iLo) - return !has - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_funcs.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_funcs.go deleted file mode 100644 index 50dca26b8..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_funcs.go +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "errors" - "fmt" - "reflect" - "sync" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -// SkipFunc may be returned by [MarshalToFunc] and [UnmarshalFromFunc] functions. -// -// Any function that returns SkipFunc must not cause observable side effects -// on the provided [jsontext.Encoder] or [jsontext.Decoder]. -// For example, it is permissible to call [jsontext.Decoder.PeekKind], -// but not permissible to call [jsontext.Decoder.ReadToken] or -// [jsontext.Encoder.WriteToken] since such methods mutate the state. -var SkipFunc = errors.New("json: skip function") - -var errSkipMutation = errors.New("must not read or write any tokens when skipping") -var errNonSingularValue = errors.New("must read or write exactly one value") - -// Marshalers is a list of functions that may override the marshal behavior -// of specific types. Populate [WithMarshalers] to use it with -// [Marshal], [MarshalWrite], or [MarshalEncode]. -// A nil *Marshalers is equivalent to an empty list. -// There are no exported fields or methods on Marshalers. -type Marshalers = typedMarshalers - -// JoinMarshalers constructs a flattened list of marshal functions. -// If multiple functions in the list are applicable for a value of a given type, -// then those earlier in the list take precedence over those that come later. -// If a function returns [SkipFunc], then the next applicable function is called, -// otherwise the default marshaling behavior is used. -// -// For example: -// -// m1 := JoinMarshalers(f1, f2) -// m2 := JoinMarshalers(f0, m1, f3) // equivalent to m3 -// m3 := JoinMarshalers(f0, f1, f2, f3) // equivalent to m2 -func JoinMarshalers(ms ...*Marshalers) *Marshalers { - return newMarshalers(ms...) -} - -// Unmarshalers is a list of functions that may override the unmarshal behavior -// of specific types. Populate [WithUnmarshalers] to use it with -// [Unmarshal], [UnmarshalRead], or [UnmarshalDecode]. -// A nil *Unmarshalers is equivalent to an empty list. -// There are no exported fields or methods on Unmarshalers. -type Unmarshalers = typedUnmarshalers - -// JoinUnmarshalers constructs a flattened list of unmarshal functions. -// If multiple functions in the list are applicable for a value of a given type, -// then those earlier in the list take precedence over those that come later. -// If a function returns [SkipFunc], then the next applicable function is called, -// otherwise the default unmarshaling behavior is used. -// -// For example: -// -// u1 := JoinUnmarshalers(f1, f2) -// u2 := JoinUnmarshalers(f0, u1, f3) // equivalent to u3 -// u3 := JoinUnmarshalers(f0, f1, f2, f3) // equivalent to u2 -func JoinUnmarshalers(us ...*Unmarshalers) *Unmarshalers { - return newUnmarshalers(us...) -} - -type typedMarshalers = typedArshalers[jsontext.Encoder] -type typedUnmarshalers = typedArshalers[jsontext.Decoder] -type typedArshalers[Coder any] struct { - nonComparable - - fncVals []typedArshaler[Coder] - fncCache sync.Map // map[reflect.Type]arshaler - - // fromAny reports whether any of Go types used to represent arbitrary JSON - // (i.e., any, bool, string, float64, map[string]any, or []any) matches - // any of the provided type-specific arshalers. - // - // This bit of information is needed in arshal_default.go to determine - // whether to use the specialized logic in arshal_any.go to handle - // the any interface type. The logic in arshal_any.go does not support - // type-specific arshal functions, so we must avoid using that logic - // if this is true. - fromAny bool -} -type typedMarshaler = typedArshaler[jsontext.Encoder] -type typedUnmarshaler = typedArshaler[jsontext.Decoder] -type typedArshaler[Coder any] struct { - typ reflect.Type - fnc func(*Coder, addressableValue, *jsonopts.Struct) error - maySkip bool -} - -func newMarshalers(ms ...*Marshalers) *Marshalers { return newTypedArshalers(ms...) } -func newUnmarshalers(us ...*Unmarshalers) *Unmarshalers { return newTypedArshalers(us...) } -func newTypedArshalers[Coder any](as ...*typedArshalers[Coder]) *typedArshalers[Coder] { - var a typedArshalers[Coder] - for _, a2 := range as { - if a2 != nil { - a.fncVals = append(a.fncVals, a2.fncVals...) - a.fromAny = a.fromAny || a2.fromAny - } - } - if len(a.fncVals) == 0 { - return nil - } - return &a -} - -func (a *typedArshalers[Coder]) lookup(fnc func(*Coder, addressableValue, *jsonopts.Struct) error, t reflect.Type) (func(*Coder, addressableValue, *jsonopts.Struct) error, bool) { - if a == nil { - return fnc, false - } - if v, ok := a.fncCache.Load(t); ok { - if v == nil { - return fnc, false - } - return v.(func(*Coder, addressableValue, *jsonopts.Struct) error), true - } - - // Collect a list of arshalers that can be called for this type. - // This list may be longer than 1 since some arshalers can be skipped. - var fncs []func(*Coder, addressableValue, *jsonopts.Struct) error - for _, fncVal := range a.fncVals { - if !castableTo(t, fncVal.typ) { - continue - } - fncs = append(fncs, fncVal.fnc) - if !fncVal.maySkip { - break // subsequent arshalers will never be called - } - } - - if len(fncs) == 0 { - a.fncCache.Store(t, nil) // nil to indicate that no funcs found - return fnc, false - } - - // Construct an arshaler that may call every applicable arshaler. - fncDefault := fnc - fnc = func(c *Coder, v addressableValue, o *jsonopts.Struct) error { - for _, fnc := range fncs { - if err := fnc(c, v, o); err != SkipFunc { - return err // may be nil or non-nil - } - } - return fncDefault(c, v, o) - } - - // Use the first stored so duplicate work can be garbage collected. - v, _ := a.fncCache.LoadOrStore(t, fnc) - return v.(func(*Coder, addressableValue, *jsonopts.Struct) error), true -} - -// MarshalFunc constructs a type-specific marshaler that -// specifies how to marshal values of type T. -// T can be any type except a named pointer. -// The function is always provided with a non-nil pointer value -// if T is an interface or pointer type. -// -// The function must marshal exactly one JSON value. -// The value of T must not be retained outside the function call. -// It may not return [SkipFunc]. -func MarshalFunc[T any](fn func(T) ([]byte, error)) *Marshalers { - t := reflect.TypeFor[T]() - assertCastableTo(t, true) - typFnc := typedMarshaler{ - typ: t, - fnc: func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - val, err := fn(va.castTo(t).Interface().(T)) - if err != nil { - err = wrapSkipFunc(err, "marshal function of type func(T) ([]byte, error)") - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalFunc") // unlike unmarshal, always wrapped - } - err = newMarshalErrorBefore(enc, t, err) - return collapseSemanticErrors(err) - } - if err := enc.WriteValue(val); err != nil { - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalFunc") // unlike unmarshal, always wrapped - } - if isSyntacticError(err) { - err = newMarshalErrorBefore(enc, t, err) - } - return err - } - return nil - }, - } - return &Marshalers{fncVals: []typedMarshaler{typFnc}, fromAny: castableToFromAny(t)} -} - -// MarshalToFunc constructs a type-specific marshaler that -// specifies how to marshal values of type T. -// T can be any type except a named pointer. -// The function is always provided with a non-nil pointer value -// if T is an interface or pointer type. -// -// The function must marshal exactly one JSON value by calling write methods -// on the provided encoder. It may return [SkipFunc] such that marshaling can -// move on to the next marshal function. However, no mutable method calls may -// be called on the encoder if [SkipFunc] is returned. -// The pointer to [jsontext.Encoder] and the value of T -// must not be retained outside the function call. -func MarshalToFunc[T any](fn func(*jsontext.Encoder, T) error) *Marshalers { - t := reflect.TypeFor[T]() - assertCastableTo(t, true) - typFnc := typedMarshaler{ - typ: t, - fnc: func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - prevDepth, prevLength := xe.Tokens.DepthLength() - xe.Flags.Set(jsonflags.WithinArshalCall | 1) - err := fn(enc, va.castTo(t).Interface().(T)) - xe.Flags.Set(jsonflags.WithinArshalCall | 0) - currDepth, currLength := xe.Tokens.DepthLength() - if err == nil && (prevDepth != currDepth || prevLength+1 != currLength) { - err = errNonSingularValue - } - if err != nil { - if err == SkipFunc { - if prevDepth == currDepth && prevLength == currLength { - return SkipFunc - } - err = errSkipMutation - } - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalToFunc") // unlike unmarshal, always wrapped - } - if !export.IsIOError(err) { - err = newSemanticErrorWithPosition(enc, t, prevDepth, prevLength, err) - } - return err - } - return nil - }, - maySkip: true, - } - return &Marshalers{fncVals: []typedMarshaler{typFnc}, fromAny: castableToFromAny(t)} -} - -// UnmarshalFunc constructs a type-specific unmarshaler that -// specifies how to unmarshal values of type T. -// T must be an unnamed pointer or an interface type. -// The function is always provided with a non-nil pointer value. -// -// The function must unmarshal exactly one JSON value. -// The input []byte must not be mutated. -// The input []byte and value T must not be retained outside the function call. -// It may not return [SkipFunc]. -func UnmarshalFunc[T any](fn func([]byte, T) error) *Unmarshalers { - t := reflect.TypeFor[T]() - assertCastableTo(t, false) - typFnc := typedUnmarshaler{ - typ: t, - fnc: func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - val, err := dec.ReadValue() - if err != nil { - return err // must be a syntactic or I/O error - } - err = fn(val, va.castTo(t).Interface().(T)) - if err != nil { - err = wrapSkipFunc(err, "unmarshal function of type func([]byte, T) error") - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err // unlike marshal, never wrapped - } - err = newUnmarshalErrorAfter(dec, t, err) - return collapseSemanticErrors(err) - } - return nil - }, - } - return &Unmarshalers{fncVals: []typedUnmarshaler{typFnc}, fromAny: castableToFromAny(t)} -} - -// UnmarshalFromFunc constructs a type-specific unmarshaler that -// specifies how to unmarshal values of type T. -// T must be an unnamed pointer or an interface type. -// The function is always provided with a non-nil pointer value. -// -// The function must unmarshal exactly one JSON value by calling read methods -// on the provided decoder. It may return [SkipFunc] such that unmarshaling can -// move on to the next unmarshal function. However, no mutable method calls may -// be called on the decoder if [SkipFunc] is returned. -// The pointer to [jsontext.Decoder] and the value of T -// must not be retained outside the function call. -func UnmarshalFromFunc[T any](fn func(*jsontext.Decoder, T) error) *Unmarshalers { - t := reflect.TypeFor[T]() - assertCastableTo(t, false) - typFnc := typedUnmarshaler{ - typ: t, - fnc: func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - prevDepth, prevLength := xd.Tokens.DepthLength() - xd.Flags.Set(jsonflags.WithinArshalCall | 1) - err := fn(dec, va.castTo(t).Interface().(T)) - xd.Flags.Set(jsonflags.WithinArshalCall | 0) - currDepth, currLength := xd.Tokens.DepthLength() - if err == nil && (prevDepth != currDepth || prevLength+1 != currLength) { - err = errNonSingularValue - } - if err != nil { - if err == SkipFunc { - if prevDepth == currDepth && prevLength == currLength { - return SkipFunc - } - err = errSkipMutation - } - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - if err2 := xd.SkipUntil(prevDepth, prevLength+1); err2 != nil { - return err2 - } - return err // unlike marshal, never wrapped - } - if !isSyntacticError(err) && !export.IsIOError(err) { - err = newSemanticErrorWithPosition(dec, t, prevDepth, prevLength, err) - } - return err - } - return nil - }, - maySkip: true, - } - return &Unmarshalers{fncVals: []typedUnmarshaler{typFnc}, fromAny: castableToFromAny(t)} -} - -// assertCastableTo asserts that "to" is a valid type to be casted to. -// These are the Go types that type-specific arshalers may operate upon. -// -// Let AllTypes be the universal set of all possible Go types. -// This function generally asserts that: -// -// len([from for from in AllTypes if castableTo(from, to)]) > 0 -// -// otherwise it panics. -// -// As a special-case if marshal is false, then we forbid any non-pointer or -// non-interface type since it is almost always a bug trying to unmarshal -// into something where the end-user caller did not pass in an addressable value -// since they will not observe the mutations. -func assertCastableTo(to reflect.Type, marshal bool) { - switch to.Kind() { - case reflect.Interface: - return - case reflect.Pointer: - // Only allow unnamed pointers to be consistent with the fact that - // taking the address of a value produces an unnamed pointer type. - if to.Name() == "" { - return - } - default: - // Technically, non-pointer types are permissible for unmarshal. - // However, they are often a bug since the receiver would be immutable. - // Thus, only allow them for marshaling. - if marshal { - return - } - } - if marshal { - panic(fmt.Sprintf("input type %v must be an interface type, an unnamed pointer type, or a non-pointer type", to)) - } else { - panic(fmt.Sprintf("input type %v must be an interface type or an unnamed pointer type", to)) - } -} - -// castableTo checks whether values of type "from" can be casted to type "to". -// Nil pointer or interface "from" values are never considered castable. -// -// This function must be kept in sync with addressableValue.castTo. -func castableTo(from, to reflect.Type) bool { - switch to.Kind() { - case reflect.Interface: - // TODO: This breaks when ordinary interfaces can have type sets - // since interfaces now exist where only the value form of a type (T) - // implements the interface, but not the pointer variant (*T). - // See https://go.dev/issue/45346. - return reflect.PointerTo(from).Implements(to) - case reflect.Pointer: - // Common case for unmarshaling. - // From must be a concrete or interface type. - return reflect.PointerTo(from) == to - default: - // Common case for marshaling. - // From must be a concrete type. - return from == to - } -} - -// castTo casts va to the specified type. -// If the type is an interface, then the underlying type will always -// be a non-nil pointer to a concrete type. -// -// Requirement: castableTo(va.Type(), to) must hold. -func (va addressableValue) castTo(to reflect.Type) reflect.Value { - switch to.Kind() { - case reflect.Interface: - return va.Addr().Convert(to) - case reflect.Pointer: - return va.Addr() - default: - return va.Value - } -} - -// castableToFromAny reports whether "to" can be casted to from any -// of the dynamic types used to represent arbitrary JSON. -func castableToFromAny(to reflect.Type) bool { - for _, from := range []reflect.Type{anyType, boolType, stringType, float64Type, mapStringAnyType, sliceAnyType} { - if castableTo(from, to) { - return true - } - } - return false -} - -func wrapSkipFunc(err error, what string) error { - if err == SkipFunc { - return errors.New(what + " cannot be skipped") - } - return err -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go deleted file mode 100644 index 4509b87e4..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "bytes" - "errors" - "io" - "reflect" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -// This package supports "inlining" a Go struct field, where the contents -// of the serialized field (which must be a JSON object) are treated as if -// they are part of the parent Go struct (which represents a JSON object). -// -// Generally, inlined fields are of a Go struct type, where the fields of the -// nested struct are virtually hoisted up to the parent struct using rules -// similar to how Go embedding works (but operating within the JSON namespace). -// -// However, inlined fields may also be of a Go map type with a string key or -// a jsontext.Value. Such inlined fields are called "fallback" fields since they -// represent any arbitrary JSON object member. Explicitly named fields take -// precedence over the inlined fallback. Only one inlined fallback is allowed. - -var errRawInlinedNotObject = errors.New("inlined raw value must be a JSON object") - -var jsontextValueType = reflect.TypeFor[jsontext.Value]() - -// marshalInlinedFallbackAll marshals all the members in an inlined fallback. -func marshalInlinedFallbackAll(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct, f *structField, insertUnquotedName func([]byte) bool) error { - v := addressableValue{va.Field(f.index0), va.forcedAddr} // addressable if struct value is addressable - if len(f.index) > 0 { - v = v.fieldByIndex(f.index, false) - if !v.IsValid() { - return nil // implies a nil inlined field - } - } - v = v.indirect(false) - if !v.IsValid() { - return nil - } - - if v.Type() == jsontextValueType { - // TODO(https://go.dev/issue/62121): Use reflect.Value.AssertTo. - b := *v.Addr().Interface().(*jsontext.Value) - if len(b) == 0 { // TODO: Should this be nil? What if it were all whitespace? - return nil - } - - dec := export.GetBufferedDecoder(b) - defer export.PutBufferedDecoder(dec) - xd := export.Decoder(dec) - xd.Flags.Set(jsonflags.AllowDuplicateNames | jsonflags.AllowInvalidUTF8 | 1) - - tok, err := dec.ReadToken() - if err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return newMarshalErrorBefore(enc, v.Type(), err) - } - if tok.Kind() != '{' { - return newMarshalErrorBefore(enc, v.Type(), errRawInlinedNotObject) - } - for dec.PeekKind() != '}' { - // Parse the JSON object name. - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return newMarshalErrorBefore(enc, v.Type(), err) - } - if insertUnquotedName != nil { - name := jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if !insertUnquotedName(name) { - return newDuplicateNameError(enc.StackPointer().Parent(), val, enc.OutputOffset()) - } - } - if err := enc.WriteValue(val); err != nil { - return err - } - - // Parse the JSON object value. - val, err = xd.ReadValue(&flags) - if err != nil { - return newMarshalErrorBefore(enc, v.Type(), err) - } - if err := enc.WriteValue(val); err != nil { - return err - } - } - if _, err := dec.ReadToken(); err != nil { - return newMarshalErrorBefore(enc, v.Type(), err) - } - if err := xd.CheckEOF(); err != nil { - return newMarshalErrorBefore(enc, v.Type(), err) - } - return nil - } else { - m := v // must be a map[~string]V - n := m.Len() - if n == 0 { - return nil - } - mk := newAddressableValue(m.Type().Key()) - mv := newAddressableValue(m.Type().Elem()) - marshalKey := func(mk addressableValue) error { - b, err := jsonwire.AppendQuote(enc.AvailableBuffer(), mk.String(), &mo.Flags) - if err != nil { - return newMarshalErrorBefore(enc, m.Type().Key(), err) - } - if insertUnquotedName != nil { - isVerbatim := bytes.IndexByte(b, '\\') < 0 - name := jsonwire.UnquoteMayCopy(b, isVerbatim) - if !insertUnquotedName(name) { - return newDuplicateNameError(enc.StackPointer().Parent(), b, enc.OutputOffset()) - } - } - return enc.WriteValue(b) - } - marshalVal := f.fncs.marshal - if mo.Marshalers != nil { - marshalVal, _ = mo.Marshalers.(*Marshalers).lookup(marshalVal, mv.Type()) - } - if !mo.Flags.Get(jsonflags.Deterministic) || n <= 1 { - for iter := m.MapRange(); iter.Next(); { - mk.SetIterKey(iter) - if err := marshalKey(mk); err != nil { - return err - } - mv.Set(iter.Value()) - if err := marshalVal(enc, mv, mo); err != nil { - return err - } - } - } else { - names := getStrings(n) - for i, iter := 0, m.Value.MapRange(); i < n && iter.Next(); i++ { - mk.SetIterKey(iter) - (*names)[i] = mk.String() - } - names.Sort() - for _, name := range *names { - mk.SetString(name) - if err := marshalKey(mk); err != nil { - return err - } - // TODO(https://go.dev/issue/57061): Use mv.SetMapIndexOf. - mv.Set(m.MapIndex(mk.Value)) - if err := marshalVal(enc, mv, mo); err != nil { - return err - } - } - putStrings(names) - } - return nil - } -} - -// unmarshalInlinedFallbackNext unmarshals only the next member in an inlined fallback. -func unmarshalInlinedFallbackNext(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct, f *structField, quotedName, unquotedName []byte) error { - v := addressableValue{va.Field(f.index0), va.forcedAddr} // addressable if struct value is addressable - if len(f.index) > 0 { - v = v.fieldByIndex(f.index, true) - } - v = v.indirect(true) - - if v.Type() == jsontextValueType { - b := v.Addr().Interface().(*jsontext.Value) - if len(*b) == 0 { // TODO: Should this be nil? What if it were all whitespace? - *b = append(*b, '{') - } else { - *b = jsonwire.TrimSuffixWhitespace(*b) - if jsonwire.HasSuffixByte(*b, '}') { - // TODO: When merging into an object for the first time, - // should we verify that it is valid? - *b = jsonwire.TrimSuffixByte(*b, '}') - *b = jsonwire.TrimSuffixWhitespace(*b) - if !jsonwire.HasSuffixByte(*b, ',') && !jsonwire.HasSuffixByte(*b, '{') { - *b = append(*b, ',') - } - } else { - return newUnmarshalErrorAfterWithSkipping(dec, v.Type(), errRawInlinedNotObject) - } - } - *b = append(*b, quotedName...) - *b = append(*b, ':') - val, err := dec.ReadValue() - if err != nil { - return err - } - *b = append(*b, val...) - *b = append(*b, '}') - return nil - } else { - name := string(unquotedName) // TODO: Intern this? - - m := v // must be a map[~string]V - if m.IsNil() { - m.Set(reflect.MakeMap(m.Type())) - } - mk := reflect.ValueOf(name) - if mkt := m.Type().Key(); mkt != stringType { - mk = mk.Convert(mkt) - } - mv := newAddressableValue(m.Type().Elem()) // TODO: Cache across calls? - if v2 := m.MapIndex(mk); v2.IsValid() { - mv.Set(v2) - } - - unmarshal := f.fncs.unmarshal - if uo.Unmarshalers != nil { - unmarshal, _ = uo.Unmarshalers.(*Unmarshalers).lookup(unmarshal, mv.Type()) - } - err := unmarshal(dec, mv, uo) - m.SetMapIndex(mk, mv.Value) - if err != nil { - return err - } - return nil - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go deleted file mode 100644 index 42d6ee876..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "encoding" - "errors" - "reflect" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -var errNonStringValue = errors.New("JSON value must be string type") - -// Interfaces for custom serialization. -var ( - jsonMarshalerType = reflect.TypeFor[Marshaler]() - jsonMarshalerToType = reflect.TypeFor[MarshalerTo]() - jsonUnmarshalerType = reflect.TypeFor[Unmarshaler]() - jsonUnmarshalerFromType = reflect.TypeFor[UnmarshalerFrom]() - textAppenderType = reflect.TypeFor[encoding.TextAppender]() - textMarshalerType = reflect.TypeFor[encoding.TextMarshaler]() - textUnmarshalerType = reflect.TypeFor[encoding.TextUnmarshaler]() - - allMarshalerTypes = []reflect.Type{jsonMarshalerToType, jsonMarshalerType, textAppenderType, textMarshalerType} - allUnmarshalerTypes = []reflect.Type{jsonUnmarshalerFromType, jsonUnmarshalerType, textUnmarshalerType} - allMethodTypes = append(allMarshalerTypes, allUnmarshalerTypes...) -) - -// Marshaler is implemented by types that can marshal themselves. -// It is recommended that types implement [MarshalerTo] unless the implementation -// is trying to avoid a hard dependency on the "jsontext" package. -// -// It is recommended that implementations return a buffer that is safe -// for the caller to retain and potentially mutate. -type Marshaler interface { - MarshalJSON() ([]byte, error) -} - -// MarshalerTo is implemented by types that can marshal themselves. -// It is recommended that types implement MarshalerTo instead of [Marshaler] -// since this is both more performant and flexible. -// If a type implements both Marshaler and MarshalerTo, -// then MarshalerTo takes precedence. In such a case, both implementations -// should aim to have equivalent behavior for the default marshal options. -// -// The implementation must write only one JSON value to the Encoder and -// must not retain the pointer to [jsontext.Encoder]. -type MarshalerTo interface { - MarshalJSONTo(*jsontext.Encoder) error - - // TODO: Should users call the MarshalEncode function or - // should/can they call this method directly? Does it matter? -} - -// Unmarshaler is implemented by types that can unmarshal themselves. -// It is recommended that types implement [UnmarshalerFrom] unless the implementation -// is trying to avoid a hard dependency on the "jsontext" package. -// -// The input can be assumed to be a valid encoding of a JSON value -// if called from unmarshal functionality in this package. -// UnmarshalJSON must copy the JSON data if it is retained after returning. -// It is recommended that UnmarshalJSON implement merge semantics when -// unmarshaling into a pre-populated value. -// -// Implementations must not retain or mutate the input []byte. -type Unmarshaler interface { - UnmarshalJSON([]byte) error -} - -// UnmarshalerFrom is implemented by types that can unmarshal themselves. -// It is recommended that types implement UnmarshalerFrom instead of [Unmarshaler] -// since this is both more performant and flexible. -// If a type implements both Unmarshaler and UnmarshalerFrom, -// then UnmarshalerFrom takes precedence. In such a case, both implementations -// should aim to have equivalent behavior for the default unmarshal options. -// -// The implementation must read only one JSON value from the Decoder. -// It is recommended that UnmarshalJSONFrom implement merge semantics when -// unmarshaling into a pre-populated value. -// -// Implementations must not retain the pointer to [jsontext.Decoder]. -type UnmarshalerFrom interface { - UnmarshalJSONFrom(*jsontext.Decoder) error - - // TODO: Should users call the UnmarshalDecode function or - // should/can they call this method directly? Does it matter? -} - -func makeMethodArshaler(fncs *arshaler, t reflect.Type) *arshaler { - // Avoid injecting method arshaler on the pointer or interface version - // to avoid ever calling the method on a nil pointer or interface receiver. - // Let it be injected on the value receiver (which is always addressable). - if t.Kind() == reflect.Pointer || t.Kind() == reflect.Interface { - return fncs - } - - if needAddr, ok := implements(t, textMarshalerType); ok { - fncs.nonDefault = true - prevMarshal := fncs.marshal - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - (needAddr && va.forcedAddr) { - return prevMarshal(enc, va, mo) - } - marshaler := va.Addr().Interface().(encoding.TextMarshaler) - if err := export.Encoder(enc).AppendRaw('"', false, func(b []byte) ([]byte, error) { - b2, err := marshaler.MarshalText() - return append(b, b2...), err - }); err != nil { - err = wrapSkipFunc(err, "marshal method") - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalText") // unlike unmarshal, always wrapped - } - if !isSemanticError(err) && !export.IsIOError(err) { - err = newMarshalErrorBefore(enc, t, err) - } - return err - } - return nil - } - } - - if needAddr, ok := implements(t, textAppenderType); ok { - fncs.nonDefault = true - prevMarshal := fncs.marshal - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) (err error) { - if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - (needAddr && va.forcedAddr) { - return prevMarshal(enc, va, mo) - } - appender := va.Addr().Interface().(encoding.TextAppender) - if err := export.Encoder(enc).AppendRaw('"', false, appender.AppendText); err != nil { - err = wrapSkipFunc(err, "append method") - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "AppendText") // unlike unmarshal, always wrapped - } - if !isSemanticError(err) && !export.IsIOError(err) { - err = newMarshalErrorBefore(enc, t, err) - } - return err - } - return nil - } - } - - if needAddr, ok := implements(t, jsonMarshalerType); ok { - fncs.nonDefault = true - prevMarshal := fncs.marshal - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - ((needAddr && va.forcedAddr) || export.Encoder(enc).Tokens.Last.NeedObjectName()) { - return prevMarshal(enc, va, mo) - } - marshaler := va.Addr().Interface().(Marshaler) - val, err := marshaler.MarshalJSON() - if err != nil { - err = wrapSkipFunc(err, "marshal method") - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalJSON") // unlike unmarshal, always wrapped - } - err = newMarshalErrorBefore(enc, t, err) - return collapseSemanticErrors(err) - } - if err := enc.WriteValue(val); err != nil { - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalJSON") // unlike unmarshal, always wrapped - } - if isSyntacticError(err) { - err = newMarshalErrorBefore(enc, t, err) - } - return err - } - return nil - } - } - - if needAddr, ok := implements(t, jsonMarshalerToType); ok { - fncs.nonDefault = true - prevMarshal := fncs.marshal - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - if mo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - ((needAddr && va.forcedAddr) || export.Encoder(enc).Tokens.Last.NeedObjectName()) { - return prevMarshal(enc, va, mo) - } - xe := export.Encoder(enc) - prevDepth, prevLength := xe.Tokens.DepthLength() - xe.Flags.Set(jsonflags.WithinArshalCall | 1) - err := va.Addr().Interface().(MarshalerTo).MarshalJSONTo(enc) - xe.Flags.Set(jsonflags.WithinArshalCall | 0) - currDepth, currLength := xe.Tokens.DepthLength() - if (prevDepth != currDepth || prevLength+1 != currLength) && err == nil { - err = errNonSingularValue - } - if err != nil { - err = wrapSkipFunc(err, "marshal method") - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalJSONTo") // unlike unmarshal, always wrapped - } - if !export.IsIOError(err) { - err = newSemanticErrorWithPosition(enc, t, prevDepth, prevLength, err) - } - return err - } - return nil - } - } - - if _, ok := implements(t, textUnmarshalerType); ok { - fncs.nonDefault = true - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - var flags jsonwire.ValueFlags - val, err := xd.ReadValue(&flags) - if err != nil { - return err // must be a syntactic or I/O error - } - if val.Kind() == 'n' { - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - va.SetZero() - } - return nil - } - if val.Kind() != '"' { - return newUnmarshalErrorAfter(dec, t, errNonStringValue) - } - s := jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - unmarshaler := va.Addr().Interface().(encoding.TextUnmarshaler) - if err := unmarshaler.UnmarshalText(s); err != nil { - err = wrapSkipFunc(err, "unmarshal method") - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err // unlike marshal, never wrapped - } - if !isSemanticError(err) && !isSyntacticError(err) && !export.IsIOError(err) { - err = newUnmarshalErrorAfter(dec, t, err) - } - return err - } - return nil - } - } - - if _, ok := implements(t, jsonUnmarshalerType); ok { - fncs.nonDefault = true - prevUnmarshal := fncs.unmarshal - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - if uo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - export.Decoder(dec).Tokens.Last.NeedObjectName() { - return prevUnmarshal(dec, va, uo) - } - val, err := dec.ReadValue() - if err != nil { - return err // must be a syntactic or I/O error - } - unmarshaler := va.Addr().Interface().(Unmarshaler) - if err := unmarshaler.UnmarshalJSON(val); err != nil { - err = wrapSkipFunc(err, "unmarshal method") - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err // unlike marshal, never wrapped - } - err = newUnmarshalErrorAfter(dec, t, err) - return collapseSemanticErrors(err) - } - return nil - } - } - - if _, ok := implements(t, jsonUnmarshalerFromType); ok { - fncs.nonDefault = true - prevUnmarshal := fncs.unmarshal - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - if uo.Flags.Get(jsonflags.CallMethodsWithLegacySemantics) && - export.Decoder(dec).Tokens.Last.NeedObjectName() { - return prevUnmarshal(dec, va, uo) - } - xd := export.Decoder(dec) - prevDepth, prevLength := xd.Tokens.DepthLength() - xd.Flags.Set(jsonflags.WithinArshalCall | 1) - err := va.Addr().Interface().(UnmarshalerFrom).UnmarshalJSONFrom(dec) - xd.Flags.Set(jsonflags.WithinArshalCall | 0) - currDepth, currLength := xd.Tokens.DepthLength() - if (prevDepth != currDepth || prevLength+1 != currLength) && err == nil { - err = errNonSingularValue - } - if err != nil { - err = wrapSkipFunc(err, "unmarshal method") - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - if err2 := xd.SkipUntil(prevDepth, prevLength+1); err2 != nil { - return err2 - } - return err // unlike marshal, never wrapped - } - if !isSyntacticError(err) && !export.IsIOError(err) { - err = newSemanticErrorWithPosition(dec, t, prevDepth, prevLength, err) - } - return err - } - return nil - } - } - - return fncs -} - -// implementsAny is like t.Implements(ifaceType) for a list of interfaces, -// but checks whether either t or reflect.PointerTo(t) implements the interface. -func implementsAny(t reflect.Type, ifaceTypes ...reflect.Type) bool { - for _, ifaceType := range ifaceTypes { - if _, ok := implements(t, ifaceType); ok { - return true - } - } - return false -} - -// implements is like t.Implements(ifaceType) but checks whether -// either t or reflect.PointerTo(t) implements the interface. -// It also reports whether the value needs to be addressed -// in order to satisfy the interface. -func implements(t, ifaceType reflect.Type) (needAddr, ok bool) { - switch { - case t.Implements(ifaceType): - return false, true - case reflect.PointerTo(t).Implements(ifaceType): - return true, true - default: - return false, false - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go deleted file mode 100644 index 30dd584d1..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go +++ /dev/null @@ -1,775 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "bytes" - "cmp" - "errors" - "fmt" - "math" - "math/bits" - "reflect" - "strconv" - "strings" - "time" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -var ( - timeDurationType = reflect.TypeFor[time.Duration]() - timeTimeType = reflect.TypeFor[time.Time]() -) - -func makeTimeArshaler(fncs *arshaler, t reflect.Type) *arshaler { - // Ideally, time types would implement MarshalerTo and UnmarshalerFrom, - // but that would incur a dependency on package json from package time. - // Given how widely used time is, it is more acceptable that we incur a - // dependency on time from json. - // - // Injecting the arshaling functionality like this will not be identical - // to actually declaring methods on the time types since embedding of the - // time types will not be able to forward this functionality. - switch t { - case timeDurationType: - fncs.nonDefault = true - marshalNano := fncs.marshal - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) error { - xe := export.Encoder(enc) - var m durationArshaler - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - if !m.initFormat(mo.Format) { - return newInvalidFormatError(enc, t) - } - } else if mo.Flags.Get(jsonflags.FormatDurationAsNano) { - return marshalNano(enc, va, mo) - } else { - // TODO(https://go.dev/issue/71631): Decide on default duration representation. - return newMarshalErrorBefore(enc, t, errors.New("no default representation (see https://go.dev/issue/71631); specify an explicit format")) - } - - // TODO(https://go.dev/issue/62121): Use reflect.Value.AssertTo. - m.td = *va.Addr().Interface().(*time.Duration) - k := stringOrNumberKind(!m.isNumeric() || xe.Tokens.Last.NeedObjectName() || mo.Flags.Get(jsonflags.StringifyNumbers)) - if err := xe.AppendRaw(k, true, m.appendMarshal); err != nil { - if !isSyntacticError(err) && !export.IsIOError(err) { - err = newMarshalErrorBefore(enc, t, err) - } - return err - } - return nil - } - unmarshalNano := fncs.unmarshal - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) error { - xd := export.Decoder(dec) - var u durationArshaler - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - if !u.initFormat(uo.Format) { - return newInvalidFormatError(dec, t) - } - } else if uo.Flags.Get(jsonflags.FormatDurationAsNano) { - return unmarshalNano(dec, va, uo) - } else { - // TODO(https://go.dev/issue/71631): Decide on default duration representation. - return newUnmarshalErrorBeforeWithSkipping(dec, t, errors.New("no default representation (see https://go.dev/issue/71631); specify an explicit format")) - } - - stringify := !u.isNumeric() || xd.Tokens.Last.NeedObjectName() || uo.Flags.Get(jsonflags.StringifyNumbers) - var flags jsonwire.ValueFlags - td := va.Addr().Interface().(*time.Duration) - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - switch k := val.Kind(); k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - *td = time.Duration(0) - } - return nil - case '"': - if !stringify { - break - } - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if err := u.unmarshal(val); err != nil { - return newUnmarshalErrorAfter(dec, t, err) - } - *td = u.td - return nil - case '0': - if stringify { - break - } - if err := u.unmarshal(val); err != nil { - return newUnmarshalErrorAfter(dec, t, err) - } - *td = u.td - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - case timeTimeType: - fncs.nonDefault = true - fncs.marshal = func(enc *jsontext.Encoder, va addressableValue, mo *jsonopts.Struct) (err error) { - xe := export.Encoder(enc) - var m timeArshaler - if mo.Format != "" && mo.FormatDepth == xe.Tokens.Depth() { - if !m.initFormat(mo.Format) { - return newInvalidFormatError(enc, t) - } - } - - // TODO(https://go.dev/issue/62121): Use reflect.Value.AssertTo. - m.tt = *va.Addr().Interface().(*time.Time) - k := stringOrNumberKind(!m.isNumeric() || xe.Tokens.Last.NeedObjectName() || mo.Flags.Get(jsonflags.StringifyNumbers)) - if err := xe.AppendRaw(k, !m.hasCustomFormat(), m.appendMarshal); err != nil { - if mo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return internal.NewMarshalerError(va.Addr().Interface(), err, "MarshalJSON") // unlike unmarshal, always wrapped - } - if !isSyntacticError(err) && !export.IsIOError(err) { - err = newMarshalErrorBefore(enc, t, err) - } - return err - } - return nil - } - fncs.unmarshal = func(dec *jsontext.Decoder, va addressableValue, uo *jsonopts.Struct) (err error) { - xd := export.Decoder(dec) - var u timeArshaler - if uo.Format != "" && uo.FormatDepth == xd.Tokens.Depth() { - if !u.initFormat(uo.Format) { - return newInvalidFormatError(dec, t) - } - } else if uo.Flags.Get(jsonflags.ParseTimeWithLooseRFC3339) { - u.looseRFC3339 = true - } - - stringify := !u.isNumeric() || xd.Tokens.Last.NeedObjectName() || uo.Flags.Get(jsonflags.StringifyNumbers) - var flags jsonwire.ValueFlags - tt := va.Addr().Interface().(*time.Time) - val, err := xd.ReadValue(&flags) - if err != nil { - return err - } - switch k := val.Kind(); k { - case 'n': - if !uo.Flags.Get(jsonflags.MergeWithLegacySemantics) { - *tt = time.Time{} - } - return nil - case '"': - if !stringify { - break - } - val = jsonwire.UnquoteMayCopy(val, flags.IsVerbatim()) - if err := u.unmarshal(val); err != nil { - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err // unlike marshal, never wrapped - } - return newUnmarshalErrorAfter(dec, t, err) - } - *tt = u.tt - return nil - case '0': - if stringify { - break - } - if err := u.unmarshal(val); err != nil { - if uo.Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - return err // unlike marshal, never wrapped - } - return newUnmarshalErrorAfter(dec, t, err) - } - *tt = u.tt - return nil - } - return newUnmarshalErrorAfter(dec, t, nil) - } - } - return fncs -} - -type durationArshaler struct { - td time.Duration - - // base records the representation where: - // - 0 uses time.Duration.String - // - 1e0, 1e3, 1e6, or 1e9 use a decimal encoding of the duration as - // nanoseconds, microseconds, milliseconds, or seconds. - // - 8601 uses ISO 8601 - base uint64 -} - -func (a *durationArshaler) initFormat(format string) (ok bool) { - switch format { - case "units": - a.base = 0 - case "sec": - a.base = 1e9 - case "milli": - a.base = 1e6 - case "micro": - a.base = 1e3 - case "nano": - a.base = 1e0 - case "iso8601": - a.base = 8601 - default: - return false - } - return true -} - -func (a *durationArshaler) isNumeric() bool { - return a.base != 0 && a.base != 8601 -} - -func (a *durationArshaler) appendMarshal(b []byte) ([]byte, error) { - switch a.base { - case 0: - return append(b, a.td.String()...), nil - case 8601: - return appendDurationISO8601(b, a.td), nil - default: - return appendDurationBase10(b, a.td, a.base), nil - } -} - -func (a *durationArshaler) unmarshal(b []byte) (err error) { - switch a.base { - case 0: - a.td, err = time.ParseDuration(string(b)) - case 8601: - a.td, err = parseDurationISO8601(b) - default: - a.td, err = parseDurationBase10(b, a.base) - } - return err -} - -type timeArshaler struct { - tt time.Time - - // base records the representation where: - // - 0 uses RFC 3339 encoding of the timestamp - // - 1e0, 1e3, 1e6, or 1e9 use a decimal encoding of the timestamp as - // seconds, milliseconds, microseconds, or nanoseconds since Unix epoch. - // - math.MaxUint uses time.Time.Format to encode the timestamp - base uint64 - format string // time format passed to time.Parse - - looseRFC3339 bool -} - -func (a *timeArshaler) initFormat(format string) bool { - // We assume that an exported constant in the time package will - // always start with an uppercase ASCII letter. - if len(format) == 0 { - return false - } - a.base = math.MaxUint // implies custom format - if c := format[0]; !('a' <= c && c <= 'z') && !('A' <= c && c <= 'Z') { - a.format = format - return true - } - switch format { - case "ANSIC": - a.format = time.ANSIC - case "UnixDate": - a.format = time.UnixDate - case "RubyDate": - a.format = time.RubyDate - case "RFC822": - a.format = time.RFC822 - case "RFC822Z": - a.format = time.RFC822Z - case "RFC850": - a.format = time.RFC850 - case "RFC1123": - a.format = time.RFC1123 - case "RFC1123Z": - a.format = time.RFC1123Z - case "RFC3339": - a.base = 0 - a.format = time.RFC3339 - case "RFC3339Nano": - a.base = 0 - a.format = time.RFC3339Nano - case "Kitchen": - a.format = time.Kitchen - case "Stamp": - a.format = time.Stamp - case "StampMilli": - a.format = time.StampMilli - case "StampMicro": - a.format = time.StampMicro - case "StampNano": - a.format = time.StampNano - case "DateTime": - a.format = time.DateTime - case "DateOnly": - a.format = time.DateOnly - case "TimeOnly": - a.format = time.TimeOnly - case "unix": - a.base = 1e0 - case "unixmilli": - a.base = 1e3 - case "unixmicro": - a.base = 1e6 - case "unixnano": - a.base = 1e9 - default: - // Reject any Go identifier in case new constants are supported. - if strings.TrimFunc(format, isLetterOrDigit) == "" { - return false - } - a.format = format - } - return true -} - -func (a *timeArshaler) isNumeric() bool { - return int(a.base) > 0 -} - -func (a *timeArshaler) hasCustomFormat() bool { - return a.base == math.MaxUint -} - -func (a *timeArshaler) appendMarshal(b []byte) ([]byte, error) { - switch a.base { - case 0: - format := cmp.Or(a.format, time.RFC3339Nano) - n0 := len(b) - b = a.tt.AppendFormat(b, format) - // Not all Go timestamps can be represented as valid RFC 3339. - // Explicitly check for these edge cases. - // See https://go.dev/issue/4556 and https://go.dev/issue/54580. - switch b := b[n0:]; { - case b[len("9999")] != '-': // year must be exactly 4 digits wide - return b, errors.New("year outside of range [0,9999]") - case b[len(b)-1] != 'Z': - c := b[len(b)-len("Z07:00")] - if ('0' <= c && c <= '9') || parseDec2(b[len(b)-len("07:00"):]) >= 24 { - return b, errors.New("timezone hour outside of range [0,23]") - } - } - return b, nil - case math.MaxUint: - return a.tt.AppendFormat(b, a.format), nil - default: - return appendTimeUnix(b, a.tt, a.base), nil - } -} - -func (a *timeArshaler) unmarshal(b []byte) (err error) { - switch a.base { - case 0: - // Use time.Time.UnmarshalText to avoid possible string allocation. - if err := a.tt.UnmarshalText(b); err != nil { - return err - } - // TODO(https://go.dev/issue/57912): - // RFC 3339 specifies the grammar for a valid timestamp. - // However, the parsing functionality in "time" is too loose and - // incorrectly accepts invalid timestamps as valid. - // Remove these manual checks when "time" checks it for us. - newParseError := func(layout, value, layoutElem, valueElem, message string) error { - return &time.ParseError{Layout: layout, Value: value, LayoutElem: layoutElem, ValueElem: valueElem, Message: message} - } - switch { - case a.looseRFC3339: - return nil - case b[len("2006-01-02T")+1] == ':': // hour must be two digits - return newParseError(time.RFC3339, string(b), "15", string(b[len("2006-01-02T"):][:1]), "") - case b[len("2006-01-02T15:04:05")] == ',': // sub-second separator must be a period - return newParseError(time.RFC3339, string(b), ".", ",", "") - case b[len(b)-1] != 'Z': - switch { - case parseDec2(b[len(b)-len("07:00"):]) >= 24: // timezone hour must be in range - return newParseError(time.RFC3339, string(b), "Z07:00", string(b[len(b)-len("Z07:00"):]), ": timezone hour out of range") - case parseDec2(b[len(b)-len("00"):]) >= 60: // timezone minute must be in range - return newParseError(time.RFC3339, string(b), "Z07:00", string(b[len(b)-len("Z07:00"):]), ": timezone minute out of range") - } - } - return nil - case math.MaxUint: - a.tt, err = time.Parse(a.format, string(b)) - return err - default: - a.tt, err = parseTimeUnix(b, a.base) - return err - } -} - -// appendDurationBase10 appends d formatted as a decimal fractional number, -// where pow10 is a power-of-10 used to scale down the number. -func appendDurationBase10(b []byte, d time.Duration, pow10 uint64) []byte { - b, n := mayAppendDurationSign(b, d) // append sign - whole, frac := bits.Div64(0, n, uint64(pow10)) // compute whole and frac fields - b = strconv.AppendUint(b, whole, 10) // append whole field - return appendFracBase10(b, frac, pow10) // append frac field -} - -// parseDurationBase10 parses d from a decimal fractional number, -// where pow10 is a power-of-10 used to scale up the number. -func parseDurationBase10(b []byte, pow10 uint64) (time.Duration, error) { - suffix, neg := consumeSign(b, false) // consume sign - wholeBytes, fracBytes := bytesCutByte(suffix, '.', true) // consume whole and frac fields - whole, okWhole := jsonwire.ParseUint(wholeBytes) // parse whole field; may overflow - frac, okFrac := parseFracBase10(fracBytes, pow10) // parse frac field - hi, lo := bits.Mul64(whole, uint64(pow10)) // overflow if hi > 0 - sum, co := bits.Add64(lo, uint64(frac), 0) // overflow if co > 0 - switch d := mayApplyDurationSign(sum, neg); { // overflow if neg != (d < 0) - case (!okWhole && whole != math.MaxUint64) || !okFrac: - return 0, fmt.Errorf("invalid duration %q: %w", b, strconv.ErrSyntax) - case !okWhole || hi > 0 || co > 0 || neg != (d < 0): - return 0, fmt.Errorf("invalid duration %q: %w", b, strconv.ErrRange) - default: - return d, nil - } -} - -// appendDurationISO8601 appends an ISO 8601 duration with a restricted grammar, -// where leading and trailing zeroes and zero-value designators are omitted. -// It only uses hour, minute, and second designators since ISO 8601 defines -// those as being "accurate", while year, month, week, and day are "nominal". -func appendDurationISO8601(b []byte, d time.Duration) []byte { - if d == 0 { - return append(b, "PT0S"...) - } - b, n := mayAppendDurationSign(b, d) - b = append(b, "PT"...) - n, nsec := bits.Div64(0, n, 1e9) // compute nsec field - n, sec := bits.Div64(0, n, 60) // compute sec field - hour, min := bits.Div64(0, n, 60) // compute hour and min fields - if hour > 0 { - b = append(strconv.AppendUint(b, hour, 10), 'H') - } - if min > 0 { - b = append(strconv.AppendUint(b, min, 10), 'M') - } - if sec > 0 || nsec > 0 { - b = append(appendFracBase10(strconv.AppendUint(b, sec, 10), nsec, 1e9), 'S') - } - return b -} - -// daysPerYear is the exact average number of days in a year according to -// the Gregorian calender, which has an extra day each year that is -// a multiple of 4, unless it is evenly divisible by 100 but not by 400. -// This does not take into account leap seconds, which are not deterministic. -const daysPerYear = 365.2425 - -var errInaccurateDateUnits = errors.New("inaccurate year, month, week, or day units") - -// parseDurationISO8601 parses a duration according to ISO 8601-1:2019, -// section 5.5.2.2 and 5.5.2.3 with the following restrictions or extensions: -// -// - A leading minus sign is permitted for negative duration according -// to ISO 8601-2:2019, section 4.4.1.9. We do not permit negative values -// for each "time scale component", which is permitted by section 4.4.1.1, -// but rarely supported by parsers. -// -// - A leading plus sign is permitted (and ignored). -// This is not required by ISO 8601, but not forbidden either. -// There is some precedent for this as it is supported by the principle of -// duration arithmetic as specified in ISO 8601-2-2019, section 14.1. -// Of note, the JavaScript grammar for ISO 8601 permits a leading plus sign. -// -// - A fractional value is only permitted for accurate units -// (i.e., hour, minute, and seconds) in the last time component, -// which is permissible by ISO 8601-1:2019, section 5.5.2.3. -// -// - Both periods ('.') and commas (',') are supported as the separator -// between the integer part and fraction part of a number, -// as specified in ISO 8601-1:2019, section 3.2.6. -// While ISO 8601 recommends comma as the default separator, -// most formatters uses a period. -// -// - Leading zeros are ignored. This is not required by ISO 8601, -// but also not forbidden by the standard. Many parsers support this. -// -// - Lowercase designators are supported. This is not required by ISO 8601, -// but also not forbidden by the standard. Many parsers support this. -// -// If the nominal units of year, month, week, or day are present, -// this produces a best-effort value and also reports [errInaccurateDateUnits]. -// -// The accepted grammar is identical to JavaScript's Duration: -// -// https://tc39.es/proposal-temporal/#prod-Duration -// -// We follow JavaScript's grammar as JSON itself is derived from JavaScript. -// The Temporal.Duration.toJSON method is guaranteed to produce an output -// that can be parsed by this function so long as arithmetic in JavaScript -// do not use a largestUnit value higher than "hours" (which is the default). -// Even if it does, this will do a best-effort parsing with inaccurate units, -// but report [errInaccurateDateUnits]. -func parseDurationISO8601(b []byte) (time.Duration, error) { - var invalid, overflow, inaccurate, sawFrac bool - var sumNanos, n, co uint64 - - // cutBytes is like [bytes.Cut], but uses either c0 or c1 as the separator. - cutBytes := func(b []byte, c0, c1 byte) (prefix, suffix []byte, ok bool) { - for i, c := range b { - if c == c0 || c == c1 { - return b[:i], b[i+1:], true - } - } - return b, nil, false - } - - // mayParseUnit attempts to parse another date or time number - // identified by the desHi and desLo unit characters. - // If the part is absent for current unit, it returns b as is. - mayParseUnit := func(b []byte, desHi, desLo byte, unit time.Duration) []byte { - number, suffix, ok := cutBytes(b, desHi, desLo) - if !ok || sawFrac { - return b // designator is not present or already saw fraction, which can only be in the last component - } - - // Parse the number. - // A fraction allowed for the accurate units in the last part. - whole, frac, ok := cutBytes(number, '.', ',') - if ok { - sawFrac = true - invalid = invalid || len(frac) == len("") || unit > time.Hour - if unit == time.Second { - n, ok = parsePaddedBase10(frac, uint64(time.Second)) - invalid = invalid || !ok - } else { - f, err := strconv.ParseFloat("0."+string(frac), 64) - invalid = invalid || err != nil || len(bytes.Trim(frac[len("."):], "0123456789")) > 0 - n = uint64(math.Round(f * float64(unit))) // never overflows since f is within [0..1] - } - sumNanos, co = bits.Add64(sumNanos, n, 0) // overflow if co > 0 - overflow = overflow || co > 0 - } - for len(whole) > 1 && whole[0] == '0' { - whole = whole[len("0"):] // trim leading zeros - } - n, ok := jsonwire.ParseUint(whole) // overflow if !ok && MaxUint64 - hi, lo := bits.Mul64(n, uint64(unit)) // overflow if hi > 0 - sumNanos, co = bits.Add64(sumNanos, lo, 0) // overflow if co > 0 - invalid = invalid || (!ok && n != math.MaxUint64) - overflow = overflow || (!ok && n == math.MaxUint64) || hi > 0 || co > 0 - inaccurate = inaccurate || unit > time.Hour - return suffix - } - - suffix, neg := consumeSign(b, true) - prefix, suffix, okP := cutBytes(suffix, 'P', 'p') - durDate, durTime, okT := cutBytes(suffix, 'T', 't') - invalid = invalid || len(prefix) > 0 || !okP || (okT && len(durTime) == 0) || len(durDate)+len(durTime) == 0 - if len(durDate) > 0 { // nominal portion of the duration - durDate = mayParseUnit(durDate, 'Y', 'y', time.Duration(daysPerYear*24*60*60*1e9)) - durDate = mayParseUnit(durDate, 'M', 'm', time.Duration(daysPerYear/12*24*60*60*1e9)) - durDate = mayParseUnit(durDate, 'W', 'w', time.Duration(7*24*60*60*1e9)) - durDate = mayParseUnit(durDate, 'D', 'd', time.Duration(24*60*60*1e9)) - invalid = invalid || len(durDate) > 0 // unknown elements - } - if len(durTime) > 0 { // accurate portion of the duration - durTime = mayParseUnit(durTime, 'H', 'h', time.Duration(60*60*1e9)) - durTime = mayParseUnit(durTime, 'M', 'm', time.Duration(60*1e9)) - durTime = mayParseUnit(durTime, 'S', 's', time.Duration(1e9)) - invalid = invalid || len(durTime) > 0 // unknown elements - } - d := mayApplyDurationSign(sumNanos, neg) - overflow = overflow || (neg != (d < 0) && d != 0) // overflows signed duration - - switch { - case invalid: - return 0, fmt.Errorf("invalid ISO 8601 duration %q: %w", b, strconv.ErrSyntax) - case overflow: - return 0, fmt.Errorf("invalid ISO 8601 duration %q: %w", b, strconv.ErrRange) - case inaccurate: - return d, fmt.Errorf("invalid ISO 8601 duration %q: %w", b, errInaccurateDateUnits) - default: - return d, nil - } -} - -// mayAppendDurationSign appends a negative sign if n is negative. -func mayAppendDurationSign(b []byte, d time.Duration) ([]byte, uint64) { - if d < 0 { - b = append(b, '-') - d *= -1 - } - return b, uint64(d) -} - -// mayApplyDurationSign inverts n if neg is specified. -func mayApplyDurationSign(n uint64, neg bool) time.Duration { - if neg { - return -1 * time.Duration(n) - } else { - return +1 * time.Duration(n) - } -} - -// appendTimeUnix appends t formatted as a decimal fractional number, -// where pow10 is a power-of-10 used to scale up the number. -func appendTimeUnix(b []byte, t time.Time, pow10 uint64) []byte { - sec, nsec := t.Unix(), int64(t.Nanosecond()) - if sec < 0 { - b = append(b, '-') - sec, nsec = negateSecNano(sec, nsec) - } - switch { - case pow10 == 1e0: // fast case where units is in seconds - b = strconv.AppendUint(b, uint64(sec), 10) - return appendFracBase10(b, uint64(nsec), 1e9) - case uint64(sec) < 1e9: // intermediate case where units is not seconds, but no overflow - b = strconv.AppendUint(b, uint64(sec)*uint64(pow10)+uint64(uint64(nsec)/(1e9/pow10)), 10) - return appendFracBase10(b, (uint64(nsec)*pow10)%1e9, 1e9) - default: // slow case where units is not seconds and overflow would occur - b = strconv.AppendUint(b, uint64(sec), 10) - b = appendPaddedBase10(b, uint64(nsec)/(1e9/pow10), pow10) - return appendFracBase10(b, (uint64(nsec)*pow10)%1e9, 1e9) - } -} - -// parseTimeUnix parses t formatted as a decimal fractional number, -// where pow10 is a power-of-10 used to scale down the number. -func parseTimeUnix(b []byte, pow10 uint64) (time.Time, error) { - suffix, neg := consumeSign(b, false) // consume sign - wholeBytes, fracBytes := bytesCutByte(suffix, '.', true) // consume whole and frac fields - whole, okWhole := jsonwire.ParseUint(wholeBytes) // parse whole field; may overflow - frac, okFrac := parseFracBase10(fracBytes, 1e9/pow10) // parse frac field - var sec, nsec int64 - switch { - case pow10 == 1e0: // fast case where units is in seconds - sec = int64(whole) // check overflow later after negation - nsec = int64(frac) // cannot overflow - case okWhole: // intermediate case where units is not seconds, but no overflow - sec = int64(whole / pow10) // check overflow later after negation - nsec = int64((whole%pow10)*(1e9/pow10) + frac) // cannot overflow - case !okWhole && whole == math.MaxUint64: // slow case where units is not seconds and overflow occurred - width := int(math.Log10(float64(pow10))) // compute len(strconv.Itoa(pow10-1)) - whole, okWhole = jsonwire.ParseUint(wholeBytes[:len(wholeBytes)-width]) // parse the upper whole field - mid, _ := parsePaddedBase10(wholeBytes[len(wholeBytes)-width:], pow10) // parse the lower whole field - sec = int64(whole) // check overflow later after negation - nsec = int64(mid*(1e9/pow10) + frac) // cannot overflow - } - if neg { - sec, nsec = negateSecNano(sec, nsec) - } - switch t := time.Unix(sec, nsec).UTC(); { - case (!okWhole && whole != math.MaxUint64) || !okFrac: - return time.Time{}, fmt.Errorf("invalid time %q: %w", b, strconv.ErrSyntax) - case !okWhole || neg != (t.Unix() < 0): - return time.Time{}, fmt.Errorf("invalid time %q: %w", b, strconv.ErrRange) - default: - return t, nil - } -} - -// negateSecNano negates a Unix timestamp, where nsec must be within [0, 1e9). -func negateSecNano(sec, nsec int64) (int64, int64) { - sec = ^sec // twos-complement negation (i.e., -1*sec + 1) - nsec = -nsec + 1e9 // negate nsec and add 1e9 (which is the extra +1 from sec negation) - sec += int64(nsec / 1e9) // handle possible overflow of nsec if it started as zero - nsec %= 1e9 // ensure nsec stays within [0, 1e9) - return sec, nsec -} - -// appendFracBase10 appends the fraction of n/max10, -// where max10 is a power-of-10 that is larger than n. -func appendFracBase10(b []byte, n, max10 uint64) []byte { - if n == 0 { - return b - } - return bytes.TrimRight(appendPaddedBase10(append(b, '.'), n, max10), "0") -} - -// parseFracBase10 parses the fraction of n/max10, -// where max10 is a power-of-10 that is larger than n. -func parseFracBase10(b []byte, max10 uint64) (n uint64, ok bool) { - switch { - case len(b) == 0: - return 0, true - case len(b) < len(".0") || b[0] != '.': - return 0, false - } - return parsePaddedBase10(b[len("."):], max10) -} - -// appendPaddedBase10 appends a zero-padded encoding of n, -// where max10 is a power-of-10 that is larger than n. -func appendPaddedBase10(b []byte, n, max10 uint64) []byte { - if n < max10/10 { - // Formatting of n is shorter than log10(max10), - // so add max10/10 to ensure the length is equal to log10(max10). - i := len(b) - b = strconv.AppendUint(b, n+max10/10, 10) - b[i]-- // subtract the addition of max10/10 - return b - } - return strconv.AppendUint(b, n, 10) -} - -// parsePaddedBase10 parses b as the zero-padded encoding of n, -// where max10 is a power-of-10 that is larger than n. -// Truncated suffix is treated as implicit zeros. -// Extended suffix is ignored, but verified to contain only digits. -func parsePaddedBase10(b []byte, max10 uint64) (n uint64, ok bool) { - pow10 := uint64(1) - for pow10 < max10 { - n *= 10 - if len(b) > 0 { - if b[0] < '0' || '9' < b[0] { - return n, false - } - n += uint64(b[0] - '0') - b = b[1:] - } - pow10 *= 10 - } - if len(b) > 0 && len(bytes.TrimRight(b, "0123456789")) > 0 { - return n, false // trailing characters are not digits - } - return n, true -} - -// consumeSign consumes an optional leading negative or positive sign. -func consumeSign(b []byte, allowPlus bool) ([]byte, bool) { - if len(b) > 0 { - if b[0] == '-' { - return b[len("-"):], true - } else if b[0] == '+' && allowPlus { - return b[len("+"):], false - } - } - return b, false -} - -// bytesCutByte is similar to bytes.Cut(b, []byte{c}), -// except c may optionally be included as part of the suffix. -func bytesCutByte(b []byte, c byte, include bool) ([]byte, []byte) { - if i := bytes.IndexByte(b, c); i >= 0 { - if include { - return b[:i], b[i:] - } - return b[:i], b[i+1:] - } - return b, nil -} - -// parseDec2 parses b as an unsigned, base-10, 2-digit number. -// The result is undefined if digits are not base-10. -func parseDec2(b []byte) byte { - if len(b) < 2 { - return 0 - } - return 10*(b[0]-'0') + (b[1] - '0') -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go deleted file mode 100644 index ff70951ab..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package json implements semantic processing of JSON as specified in RFC 8259. -// JSON is a simple data interchange format that can represent -// primitive data types such as booleans, strings, and numbers, -// in addition to structured data types such as objects and arrays. -// -// [Marshal] and [Unmarshal] encode and decode Go values -// to/from JSON text contained within a []byte. -// [MarshalWrite] and [UnmarshalRead] operate on JSON text -// by writing to or reading from an [io.Writer] or [io.Reader]. -// [MarshalEncode] and [UnmarshalDecode] operate on JSON text -// by encoding to or decoding from a [jsontext.Encoder] or [jsontext.Decoder]. -// [Options] may be passed to each of the marshal or unmarshal functions -// to configure the semantic behavior of marshaling and unmarshaling -// (i.e., alter how JSON data is understood as Go data and vice versa). -// [jsontext.Options] may also be passed to the marshal or unmarshal functions -// to configure the syntactic behavior of encoding or decoding. -// -// The data types of JSON are mapped to/from the data types of Go based on -// the closest logical equivalent between the two type systems. For example, -// a JSON boolean corresponds with a Go bool, -// a JSON string corresponds with a Go string, -// a JSON number corresponds with a Go int, uint or float, -// a JSON array corresponds with a Go slice or array, and -// a JSON object corresponds with a Go struct or map. -// See the documentation on [Marshal] and [Unmarshal] for a comprehensive list -// of how the JSON and Go type systems correspond. -// -// Arbitrary Go types can customize their JSON representation by implementing -// [Marshaler], [MarshalerTo], [Unmarshaler], or [UnmarshalerFrom]. -// This provides authors of Go types with control over how their types are -// serialized as JSON. Alternatively, users can implement functions that match -// [MarshalFunc], [MarshalToFunc], [UnmarshalFunc], or [UnmarshalFromFunc] -// to specify the JSON representation for arbitrary types. -// This provides callers of JSON functionality with control over -// how any arbitrary type is serialized as JSON. -// -// # JSON Representation of Go structs -// -// A Go struct is naturally represented as a JSON object, -// where each Go struct field corresponds with a JSON object member. -// When marshaling, all Go struct fields are recursively encoded in depth-first -// order as JSON object members except those that are ignored or omitted. -// When unmarshaling, JSON object members are recursively decoded -// into the corresponding Go struct fields. -// Object members that do not match any struct fields, -// also known as “unknown members”, are ignored by default or rejected -// if [RejectUnknownMembers] is specified. -// -// The representation of each struct field can be customized in the -// "json" struct field tag, where the tag is a comma separated list of options. -// As a special case, if the entire tag is `json:"-"`, -// then the field is ignored with regard to its JSON representation. -// Some options also have equivalent behavior controlled by a caller-specified [Options]. -// Field-specified options take precedence over caller-specified options. -// -// The first option is the JSON object name override for the Go struct field. -// If the name is not specified, then the Go struct field name -// is used as the JSON object name. JSON names containing commas or quotes, -// or names identical to "" or "-", can be specified using -// a single-quoted string literal, where the syntax is identical to -// the Go grammar for a double-quoted string literal, -// but instead uses single quotes as the delimiters. -// By default, unmarshaling uses case-sensitive matching to identify -// the Go struct field associated with a JSON object name. -// -// After the name, the following tag options are supported: -// -// - omitzero: When marshaling, the "omitzero" option specifies that -// the struct field should be omitted if the field value is zero -// as determined by the "IsZero() bool" method if present, -// otherwise based on whether the field is the zero Go value. -// This option has no effect when unmarshaling. -// -// - omitempty: When marshaling, the "omitempty" option specifies that -// the struct field should be omitted if the field value would have been -// encoded as a JSON null, empty string, empty object, or empty array. -// This option has no effect when unmarshaling. -// -// - string: The "string" option specifies that [StringifyNumbers] -// be set when marshaling or unmarshaling a struct field value. -// This causes numeric types to be encoded as a JSON number -// within a JSON string, and to be decoded from a JSON string -// containing the JSON number without any surrounding whitespace. -// This extra level of encoding is often necessary since -// many JSON parsers cannot precisely represent 64-bit integers. -// -// - case: When unmarshaling, the "case" option specifies how -// JSON object names are matched with the JSON name for Go struct fields. -// The option is a key-value pair specified as "case:value" where -// the value must either be 'ignore' or 'strict'. -// The 'ignore' value specifies that matching is case-insensitive -// where dashes and underscores are also ignored. If multiple fields match, -// the first declared field in breadth-first order takes precedence. -// The 'strict' value specifies that matching is case-sensitive. -// This takes precedence over the [MatchCaseInsensitiveNames] option. -// -// - inline: The "inline" option specifies that -// the JSON representable content of this field type is to be promoted -// as if they were specified in the parent struct. -// It is the JSON equivalent of Go struct embedding. -// A Go embedded field is implicitly inlined unless an explicit JSON name -// is specified. The inlined field must be a Go struct -// (that does not implement any JSON methods), [jsontext.Value], -// map[~string]T, or an unnamed pointer to such types. When marshaling, -// inlined fields from a pointer type are omitted if it is nil. -// Inlined fields of type [jsontext.Value] and map[~string]T are called -// “inlined fallbacks” as they can represent all possible -// JSON object members not directly handled by the parent struct. -// Only one inlined fallback field may be specified in a struct, -// while many non-fallback fields may be specified. This option -// must not be specified with any other option (including the JSON name). -// -// - unknown: The "unknown" option is a specialized variant -// of the inlined fallback to indicate that this Go struct field -// contains any number of unknown JSON object members. The field type must -// be a [jsontext.Value], map[~string]T, or an unnamed pointer to such types. -// If [DiscardUnknownMembers] is specified when marshaling, -// the contents of this field are ignored. -// If [RejectUnknownMembers] is specified when unmarshaling, -// any unknown object members are rejected regardless of whether -// an inlined fallback with the "unknown" option exists. This option -// must not be specified with any other option (including the JSON name). -// -// - format: The "format" option specifies a format flag -// used to specialize the formatting of the field value. -// The option is a key-value pair specified as "format:value" where -// the value must be either a literal consisting of letters and numbers -// (e.g., "format:RFC3339") or a single-quoted string literal -// (e.g., "format:'2006-01-02'"). The interpretation of the format flag -// is determined by the struct field type. -// -// The "omitzero" and "omitempty" options are mostly semantically identical. -// The former is defined in terms of the Go type system, -// while the latter in terms of the JSON type system. -// Consequently they behave differently in some circumstances. -// For example, only a nil slice or map is omitted under "omitzero", while -// an empty slice or map is omitted under "omitempty" regardless of nilness. -// The "omitzero" option is useful for types with a well-defined zero value -// (e.g., [net/netip.Addr]) or have an IsZero method (e.g., [time.Time.IsZero]). -// -// Every Go struct corresponds to a list of JSON representable fields -// which is constructed by performing a breadth-first search over -// all struct fields (excluding unexported or ignored fields), -// where the search recursively descends into inlined structs. -// The set of non-inlined fields in a struct must have unique JSON names. -// If multiple fields all have the same JSON name, then the one -// at shallowest depth takes precedence and the other fields at deeper depths -// are excluded from the list of JSON representable fields. -// If multiple fields at the shallowest depth have the same JSON name, -// but exactly one is explicitly tagged with a JSON name, -// then that field takes precedence and all others are excluded from the list. -// This is analogous to Go visibility rules for struct field selection -// with embedded struct types. -// -// Marshaling or unmarshaling a non-empty struct -// without any JSON representable fields results in a [SemanticError]. -// Unexported fields must not have any `json` tags except for `json:"-"`. -// -// # Security Considerations -// -// JSON is frequently used as a data interchange format to communicate -// between different systems, possibly implemented in different languages. -// For interoperability and security reasons, it is important that -// all implementations agree upon the semantic meaning of the data. -// -// [For example, suppose we have two micro-services.] -// The first service is responsible for authenticating a JSON request, -// while the second service is responsible for executing the request -// (having assumed that the prior service authenticated the request). -// If an attacker were able to maliciously craft a JSON request such that -// both services believe that the same request is from different users, -// it could bypass the authenticator with valid credentials for one user, -// but maliciously perform an action on behalf of a different user. -// -// According to RFC 8259, there unfortunately exist many JSON texts -// that are syntactically valid but semantically ambiguous. -// For example, the standard does not define how to interpret duplicate -// names within an object. -// -// The v1 [encoding/json] and [encoding/json/v2] packages -// interpret some inputs in different ways. In particular: -// -// - The standard specifies that JSON must be encoded using UTF-8. -// By default, v1 replaces invalid bytes of UTF-8 in JSON strings -// with the Unicode replacement character, -// while v2 rejects inputs with invalid UTF-8. -// To change the default, specify the [jsontext.AllowInvalidUTF8] option. -// The replacement of invalid UTF-8 is a form of data corruption -// that alters the precise meaning of strings. -// -// - The standard does not specify a particular behavior when -// duplicate names are encountered within a JSON object, -// which means that different implementations may behave differently. -// By default, v1 allows for the presence of duplicate names, -// while v2 rejects duplicate names. -// To change the default, specify the [jsontext.AllowDuplicateNames] option. -// If allowed, object members are processed in the order they are observed, -// meaning that later values will replace or be merged into prior values, -// depending on the Go value type. -// -// - The standard defines a JSON object as an unordered collection of name/value pairs. -// While ordering can be observed through the underlying [jsontext] API, -// both v1 and v2 generally avoid exposing the ordering. -// No application should semantically depend on the order of object members. -// Allowing duplicate names is a vector through which ordering of members -// can accidentally be observed and depended upon. -// -// - The standard suggests that JSON object names are typically compared -// based on equality of the sequence of Unicode code points, -// which implies that comparing names is often case-sensitive. -// When unmarshaling a JSON object into a Go struct, -// by default, v1 uses a (loose) case-insensitive match on the name, -// while v2 uses a (strict) case-sensitive match on the name. -// To change the default, specify the [MatchCaseInsensitiveNames] option. -// The use of case-insensitive matching provides another vector through -// which duplicate names can occur. Allowing case-insensitive matching -// means that v1 or v2 might interpret JSON objects differently from most -// other JSON implementations (which typically use a case-sensitive match). -// -// - The standard does not specify a particular behavior when -// an unknown name in a JSON object is encountered. -// When unmarshaling a JSON object into a Go struct, by default -// both v1 and v2 ignore unknown names and their corresponding values. -// To change the default, specify the [RejectUnknownMembers] option. -// -// - The standard suggests that implementations may use a float64 -// to represent a JSON number. Consequently, large JSON integers -// may lose precision when stored as a floating-point type. -// Both v1 and v2 correctly preserve precision when marshaling and -// unmarshaling a concrete integer type. However, even if v1 and v2 -// preserve precision for concrete types, other JSON implementations -// may not be able to preserve precision for outputs produced by v1 or v2. -// The `string` tag option can be used to specify that an integer type -// is to be quoted within a JSON string to avoid loss of precision. -// Furthermore, v1 and v2 may still lose precision when unmarshaling -// into an any interface value, where unmarshal uses a float64 -// by default to represent a JSON number. -// To change the default, specify the [WithUnmarshalers] option -// with a custom unmarshaler that pre-populates the interface value -// with a concrete Go type that can preserve precision. -// -// RFC 8785 specifies a canonical form for any JSON text, -// which explicitly defines specific behaviors that RFC 8259 leaves undefined. -// In theory, if a text can successfully [jsontext.Value.Canonicalize] -// without changing the semantic meaning of the data, then it provides a -// greater degree of confidence that the data is more secure and interoperable. -// -// The v2 API generally chooses more secure defaults than v1, -// but care should still be taken with large integers or unknown members. -// -// [For example, suppose we have two micro-services.]: https://www.youtube.com/watch?v=avilmOcHKHE&t=1057s -package json - -// requireKeyedLiterals can be embedded in a struct to require keyed literals. -type requireKeyedLiterals struct{} - -// nonComparable can be embedded in a struct to prevent comparability. -type nonComparable [0]func() diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/errors.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/errors.go deleted file mode 100644 index 1df765384..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/errors.go +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "cmp" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "sync" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" -) - -// ErrUnknownName indicates that a JSON object member could not be -// unmarshaled because the name is not known to the target Go struct. -// This error is directly wrapped within a [SemanticError] when produced. -// -// The name of an unknown JSON object member can be extracted as: -// -// err := ... -// var serr json.SemanticError -// if errors.As(err, &serr) && serr.Err == json.ErrUnknownName { -// ptr := serr.JSONPointer // JSON pointer to unknown name -// name := ptr.LastToken() // unknown name itself -// ... -// } -// -// This error is only returned if [RejectUnknownMembers] is true. -var ErrUnknownName = errors.New("unknown object member name") - -const errorPrefix = "json: " - -func isSemanticError(err error) bool { - _, ok := err.(*SemanticError) - return ok -} - -func isSyntacticError(err error) bool { - _, ok := err.(*jsontext.SyntacticError) - return ok -} - -// isFatalError reports whether this error must terminate asharling. -// All errors are considered fatal unless operating under -// [jsonflags.ReportErrorsWithLegacySemantics] in which case only -// syntactic errors and I/O errors are considered fatal. -func isFatalError(err error, flags jsonflags.Flags) bool { - return !flags.Get(jsonflags.ReportErrorsWithLegacySemantics) || - isSyntacticError(err) || export.IsIOError(err) -} - -// SemanticError describes an error determining the meaning -// of JSON data as Go data or vice-versa. -// -// The contents of this error as produced by this package may change over time. -type SemanticError struct { - requireKeyedLiterals - nonComparable - - action string // either "marshal" or "unmarshal" - - // ByteOffset indicates that an error occurred after this byte offset. - ByteOffset int64 - // JSONPointer indicates that an error occurred within this JSON value - // as indicated using the JSON Pointer notation (see RFC 6901). - JSONPointer jsontext.Pointer - - // JSONKind is the JSON kind that could not be handled. - JSONKind jsontext.Kind // may be zero if unknown - // JSONValue is the JSON number or string that could not be unmarshaled. - // It is not populated during marshaling. - JSONValue jsontext.Value // may be nil if irrelevant or unknown - // GoType is the Go type that could not be handled. - GoType reflect.Type // may be nil if unknown - - // Err is the underlying error. - Err error // may be nil -} - -// coder is implemented by [jsontext.Encoder] or [jsontext.Decoder]. -type coder interface { - StackPointer() jsontext.Pointer - Options() Options -} - -// newInvalidFormatError wraps err in a SemanticError because -// the current type t cannot handle the provided options format. -// This error must be called before producing or consuming the next value. -// -// If [jsonflags.ReportErrorsWithLegacySemantics] is specified, -// then this automatically skips the next value when unmarshaling -// to ensure that the value is fully consumed. -func newInvalidFormatError(c coder, t reflect.Type) error { - err := fmt.Errorf("invalid format flag %q", c.Options().(*jsonopts.Struct).Format) - switch c := c.(type) { - case *jsontext.Encoder: - err = newMarshalErrorBefore(c, t, err) - case *jsontext.Decoder: - err = newUnmarshalErrorBeforeWithSkipping(c, t, err) - } - return err -} - -// newMarshalErrorBefore wraps err in a SemanticError assuming that e -// is positioned right before the next token or value, which causes an error. -func newMarshalErrorBefore(e *jsontext.Encoder, t reflect.Type, err error) error { - return &SemanticError{action: "marshal", GoType: t, Err: err, - ByteOffset: e.OutputOffset() + int64(export.Encoder(e).CountNextDelimWhitespace()), - JSONPointer: jsontext.Pointer(export.Encoder(e).AppendStackPointer(nil, +1))} -} - -// newUnmarshalErrorBefore wraps err in a SemanticError assuming that d -// is positioned right before the next token or value, which causes an error. -// It does not record the next JSON kind as this error is used to indicate -// the receiving Go value is invalid to unmarshal into (and not a JSON error). -// However, if [jsonflags.ReportErrorsWithLegacySemantics] is specified, -// then it does record the next JSON kind for historical reporting reasons. -func newUnmarshalErrorBefore(d *jsontext.Decoder, t reflect.Type, err error) error { - var k jsontext.Kind - if export.Decoder(d).Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - k = d.PeekKind() - } - return &SemanticError{action: "unmarshal", GoType: t, Err: err, - ByteOffset: d.InputOffset() + int64(export.Decoder(d).CountNextDelimWhitespace()), - JSONPointer: jsontext.Pointer(export.Decoder(d).AppendStackPointer(nil, +1)), - JSONKind: k} -} - -// newUnmarshalErrorBeforeWithSkipping is like [newUnmarshalErrorBefore], -// but automatically skips the next value if -// [jsonflags.ReportErrorsWithLegacySemantics] is specified. -func newUnmarshalErrorBeforeWithSkipping(d *jsontext.Decoder, t reflect.Type, err error) error { - err = newUnmarshalErrorBefore(d, t, err) - if export.Decoder(d).Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - if err2 := export.Decoder(d).SkipValue(); err2 != nil { - return err2 - } - } - return err -} - -// newUnmarshalErrorAfter wraps err in a SemanticError assuming that d -// is positioned right after the previous token or value, which caused an error. -func newUnmarshalErrorAfter(d *jsontext.Decoder, t reflect.Type, err error) error { - tokOrVal := export.Decoder(d).PreviousTokenOrValue() - return &SemanticError{action: "unmarshal", GoType: t, Err: err, - ByteOffset: d.InputOffset() - int64(len(tokOrVal)), - JSONPointer: jsontext.Pointer(export.Decoder(d).AppendStackPointer(nil, -1)), - JSONKind: jsontext.Value(tokOrVal).Kind()} -} - -// newUnmarshalErrorAfter wraps err in a SemanticError assuming that d -// is positioned right after the previous token or value, which caused an error. -// It also stores a copy of the last JSON value if it is a string or number. -func newUnmarshalErrorAfterWithValue(d *jsontext.Decoder, t reflect.Type, err error) error { - serr := newUnmarshalErrorAfter(d, t, err).(*SemanticError) - if serr.JSONKind == '"' || serr.JSONKind == '0' { - serr.JSONValue = jsontext.Value(export.Decoder(d).PreviousTokenOrValue()).Clone() - } - return serr -} - -// newUnmarshalErrorAfterWithSkipping is like [newUnmarshalErrorAfter], -// but automatically skips the remainder of the current value if -// [jsonflags.ReportErrorsWithLegacySemantics] is specified. -func newUnmarshalErrorAfterWithSkipping(d *jsontext.Decoder, t reflect.Type, err error) error { - err = newUnmarshalErrorAfter(d, t, err) - if export.Decoder(d).Flags.Get(jsonflags.ReportErrorsWithLegacySemantics) { - if err2 := export.Decoder(d).SkipValueRemainder(); err2 != nil { - return err2 - } - } - return err -} - -// newSemanticErrorWithPosition wraps err in a SemanticError assuming that -// the error occurred at the provided depth, and length. -// If err is already a SemanticError, then position information is only -// injected if it is currently unpopulated. -// -// If the position is unpopulated, it is ambiguous where the error occurred -// in the user code, whether it was before or after the current position. -// For the byte offset, we assume that the error occurred before the last read -// token or value when decoding, or before the next value when encoding. -// For the JSON pointer, we point to the parent object or array unless -// we can be certain that it happened with an object member. -// -// This is used to annotate errors returned by user-provided -// v2 MarshalJSON or UnmarshalJSON methods or functions. -func newSemanticErrorWithPosition(c coder, t reflect.Type, prevDepth int, prevLength int64, err error) error { - serr, _ := err.(*SemanticError) - if serr == nil { - serr = &SemanticError{Err: err} - } - var currDepth int - var currLength int64 - var coderState interface{ AppendStackPointer([]byte, int) []byte } - var offset int64 - switch c := c.(type) { - case *jsontext.Encoder: - e := export.Encoder(c) - serr.action = cmp.Or(serr.action, "marshal") - currDepth, currLength = e.Tokens.DepthLength() - offset = c.OutputOffset() + int64(export.Encoder(c).CountNextDelimWhitespace()) - coderState = e - case *jsontext.Decoder: - d := export.Decoder(c) - serr.action = cmp.Or(serr.action, "unmarshal") - currDepth, currLength = d.Tokens.DepthLength() - tokOrVal := d.PreviousTokenOrValue() - offset = c.InputOffset() - int64(len(tokOrVal)) - if (prevDepth == currDepth && prevLength == currLength) || len(tokOrVal) == 0 { - // If no Read method was called in the user-defined method or - // if the Peek method was called, then use the offset of the next value. - offset = c.InputOffset() + int64(export.Decoder(c).CountNextDelimWhitespace()) - } - coderState = d - } - serr.ByteOffset = cmp.Or(serr.ByteOffset, offset) - if serr.JSONPointer == "" { - where := 0 // default to ambiguous positioning - switch { - case prevDepth == currDepth && prevLength+0 == currLength: - where = +1 - case prevDepth == currDepth && prevLength+1 == currLength: - where = -1 - } - serr.JSONPointer = jsontext.Pointer(coderState.AppendStackPointer(nil, where)) - } - serr.GoType = cmp.Or(serr.GoType, t) - return serr -} - -// collapseSemanticErrors collapses double SemanticErrors at the outer levels -// into a single SemanticError by preserving the inner error, -// but prepending the ByteOffset and JSONPointer with the outer error. -// -// For example: -// -// collapseSemanticErrors(&SemanticError{ -// ByteOffset: len64(`[0,{"alpha":[0,1,`), -// JSONPointer: "/1/alpha/2", -// GoType: reflect.TypeFor[outerType](), -// Err: &SemanticError{ -// ByteOffset: len64(`{"foo":"bar","fizz":[0,`), -// JSONPointer: "/fizz/1", -// GoType: reflect.TypeFor[innerType](), -// Err: ..., -// }, -// }) -// -// results in: -// -// &SemanticError{ -// ByteOffset: len64(`[0,{"alpha":[0,1,`) + len64(`{"foo":"bar","fizz":[0,`), -// JSONPointer: "/1/alpha/2" + "/fizz/1", -// GoType: reflect.TypeFor[innerType](), -// Err: ..., -// } -// -// This is used to annotate errors returned by user-provided -// v1 MarshalJSON or UnmarshalJSON methods with precise position information -// if they themselves happened to return a SemanticError. -// Since MarshalJSON and UnmarshalJSON are not operating on the root JSON value, -// their positioning must be relative to the nested JSON value -// returned by UnmarshalJSON or passed to MarshalJSON. -// Therefore, we can construct an absolute position by concatenating -// the outer with the inner positions. -// -// Note that we do not use collapseSemanticErrors with user-provided functions -// that take in an [jsontext.Encoder] or [jsontext.Decoder] since they contain -// methods to report position relative to the root JSON value. -// We assume user-constructed errors are correctly precise about position. -func collapseSemanticErrors(err error) error { - if serr1, ok := err.(*SemanticError); ok { - if serr2, ok := serr1.Err.(*SemanticError); ok { - serr2.ByteOffset = serr1.ByteOffset + serr2.ByteOffset - serr2.JSONPointer = serr1.JSONPointer + serr2.JSONPointer - *serr1 = *serr2 - } - } - return err -} - -// errorModalVerb is a modal verb like "cannot" or "unable to". -// -// Once per process, Hyrum-proof the error message by deliberately -// switching between equivalent renderings of the same error message. -// The randomization is tied to the Hyrum-proofing already applied -// on map iteration in Go. -var errorModalVerb = sync.OnceValue(func() string { - for phrase := range map[string]struct{}{"cannot": {}, "unable to": {}} { - return phrase // use whichever phrase we get in the first iteration - } - return "" -}) - -func (e *SemanticError) Error() string { - var sb strings.Builder - sb.WriteString(errorPrefix) - sb.WriteString(errorModalVerb()) - - // Format action. - var preposition string - switch e.action { - case "marshal": - sb.WriteString(" marshal") - preposition = " from" - case "unmarshal": - sb.WriteString(" unmarshal") - preposition = " into" - default: - sb.WriteString(" handle") - preposition = " with" - } - - // Format JSON kind. - switch e.JSONKind { - case 'n': - sb.WriteString(" JSON null") - case 'f', 't': - sb.WriteString(" JSON boolean") - case '"': - sb.WriteString(" JSON string") - case '0': - sb.WriteString(" JSON number") - case '{', '}': - sb.WriteString(" JSON object") - case '[', ']': - sb.WriteString(" JSON array") - default: - if e.action == "" { - preposition = "" - } - } - if len(e.JSONValue) > 0 && len(e.JSONValue) < 100 { - sb.WriteByte(' ') - sb.Write(e.JSONValue) - } - - // Format Go type. - if e.GoType != nil { - typeString := e.GoType.String() - if len(typeString) > 100 { - // An excessively long type string most likely occurs for - // an anonymous struct declaration with many fields. - // Reduce the noise by just printing the kind, - // and optionally prepending it with the package name - // if the struct happens to include an unexported field. - typeString = e.GoType.Kind().String() - if e.GoType.Kind() == reflect.Struct && e.GoType.Name() == "" { - for i := range e.GoType.NumField() { - if pkgPath := e.GoType.Field(i).PkgPath; pkgPath != "" { - typeString = pkgPath[strings.LastIndexByte(pkgPath, '/')+len("/"):] + ".struct" - break - } - } - } - } - sb.WriteString(preposition) - sb.WriteString(" Go ") - sb.WriteString(typeString) - } - - // Special handling for unknown names. - if e.Err == ErrUnknownName { - sb.WriteString(": ") - sb.WriteString(ErrUnknownName.Error()) - sb.WriteString(" ") - sb.WriteString(strconv.Quote(e.JSONPointer.LastToken())) - if parent := e.JSONPointer.Parent(); parent != "" { - sb.WriteString(" within ") - sb.WriteString(strconv.Quote(jsonwire.TruncatePointer(string(parent), 100))) - } - return sb.String() - } - - // Format where. - // Avoid printing if it overlaps with a wrapped SyntacticError. - switch serr, _ := e.Err.(*jsontext.SyntacticError); { - case e.JSONPointer != "": - if serr == nil || !e.JSONPointer.Contains(serr.JSONPointer) { - sb.WriteString(" within ") - sb.WriteString(strconv.Quote(jsonwire.TruncatePointer(string(e.JSONPointer), 100))) - } - case e.ByteOffset > 0: - if serr == nil || !(e.ByteOffset <= serr.ByteOffset) { - sb.WriteString(" after offset ") - sb.WriteString(strconv.FormatInt(e.ByteOffset, 10)) - } - } - - // Format underlying error. - if e.Err != nil { - errString := e.Err.Error() - if isSyntacticError(e.Err) { - errString = strings.TrimPrefix(errString, "jsontext: ") - } - sb.WriteString(": ") - sb.WriteString(errString) - } - - return sb.String() -} - -func (e *SemanticError) Unwrap() error { - return e.Err -} - -func newDuplicateNameError(ptr jsontext.Pointer, quotedName []byte, offset int64) error { - if quotedName != nil { - name, _ := jsonwire.AppendUnquote(nil, quotedName) - ptr = ptr.AppendToken(string(name)) - } - return &jsontext.SyntacticError{ - ByteOffset: offset, - JSONPointer: ptr, - Err: jsontext.ErrDuplicateName, - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fields.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fields.go deleted file mode 100644 index d539feedd..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fields.go +++ /dev/null @@ -1,652 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "cmp" - "errors" - "fmt" - "io" - "reflect" - "slices" - "strconv" - "strings" - "unicode" - "unicode/utf8" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -type isZeroer interface { - IsZero() bool -} - -var isZeroerType = reflect.TypeFor[isZeroer]() - -type structFields struct { - flattened []structField // listed in depth-first ordering - byActualName map[string]*structField - byFoldedName map[string][]*structField - inlinedFallback *structField -} - -// reindex recomputes index to avoid bounds check during runtime. -// -// During the construction of each [structField] in [makeStructFields], -// the index field is 0-indexed. However, before it returns, -// the 0th field is stored in index0 and index stores the remainder. -func (sf *structFields) reindex() { - reindex := func(f *structField) { - f.index0 = f.index[0] - f.index = f.index[1:] - if len(f.index) == 0 { - f.index = nil // avoid pinning the backing slice - } - } - for i := range sf.flattened { - reindex(&sf.flattened[i]) - } - if sf.inlinedFallback != nil { - reindex(sf.inlinedFallback) - } -} - -// lookupByFoldedName looks up name by a case-insensitive match -// that also ignores the presence of dashes and underscores. -func (fs *structFields) lookupByFoldedName(name []byte) []*structField { - return fs.byFoldedName[string(foldName(name))] -} - -type structField struct { - id int // unique numeric ID in breadth-first ordering - index0 int // 0th index into a struct according to [reflect.Type.FieldByIndex] - index []int // 1st index and remainder according to [reflect.Type.FieldByIndex] - typ reflect.Type - fncs *arshaler - isZero func(addressableValue) bool - isEmpty func(addressableValue) bool - fieldOptions -} - -var errNoExportedFields = errors.New("Go struct has no exported fields") - -func makeStructFields(root reflect.Type) (fs structFields, serr *SemanticError) { - orErrorf := func(serr *SemanticError, t reflect.Type, f string, a ...any) *SemanticError { - return cmp.Or(serr, &SemanticError{GoType: t, Err: fmt.Errorf(f, a...)}) - } - - // Setup a queue for a breath-first search. - var queueIndex int - type queueEntry struct { - typ reflect.Type - index []int - visitChildren bool // whether to recursively visit inlined field in this struct - } - queue := []queueEntry{{root, nil, true}} - seen := map[reflect.Type]bool{root: true} - - // Perform a breadth-first search over all reachable fields. - // This ensures that len(f.index) will be monotonically increasing. - var allFields, inlinedFallbacks []structField - for queueIndex < len(queue) { - qe := queue[queueIndex] - queueIndex++ - - t := qe.typ - inlinedFallbackIndex := -1 // index of last inlined fallback field in current struct - namesIndex := make(map[string]int) // index of each field with a given JSON object name in current struct - var hasAnyJSONTag bool // whether any Go struct field has a `json` tag - var hasAnyJSONField bool // whether any JSON serializable fields exist in current struct - for i := range t.NumField() { - sf := t.Field(i) - _, hasTag := sf.Tag.Lookup("json") - hasAnyJSONTag = hasAnyJSONTag || hasTag - options, ignored, err := parseFieldOptions(sf) - if err != nil { - serr = cmp.Or(serr, &SemanticError{GoType: t, Err: err}) - } - if ignored { - continue - } - hasAnyJSONField = true - f := structField{ - // Allocate a new slice (len=N+1) to hold both - // the parent index (len=N) and the current index (len=1). - // Do this to avoid clobbering the memory of the parent index. - index: append(append(make([]int, 0, len(qe.index)+1), qe.index...), i), - typ: sf.Type, - fieldOptions: options, - } - if sf.Anonymous && !f.hasName { - if indirectType(f.typ).Kind() != reflect.Struct { - serr = orErrorf(serr, t, "embedded Go struct field %s of non-struct type must be explicitly given a JSON name", sf.Name) - } else { - f.inline = true // implied by use of Go embedding without an explicit name - } - } - if f.inline || f.unknown { - // Handle an inlined field that serializes to/from - // zero or more JSON object members. - - switch f.fieldOptions { - case fieldOptions{name: f.name, quotedName: f.quotedName, inline: true}: - case fieldOptions{name: f.name, quotedName: f.quotedName, unknown: true}: - case fieldOptions{name: f.name, quotedName: f.quotedName, inline: true, unknown: true}: - serr = orErrorf(serr, t, "Go struct field %s cannot have both `inline` and `unknown` specified", sf.Name) - f.inline = false // let `unknown` take precedence - default: - serr = orErrorf(serr, t, "Go struct field %s cannot have any options other than `inline` or `unknown` specified", sf.Name) - if f.hasName { - continue // invalid inlined field; treat as ignored - } - f.fieldOptions = fieldOptions{name: f.name, quotedName: f.quotedName, inline: f.inline, unknown: f.unknown} - if f.inline && f.unknown { - f.inline = false // let `unknown` take precedence - } - } - - // Reject any types with custom serialization otherwise - // it becomes impossible to know what sub-fields to inline. - tf := indirectType(f.typ) - if implementsAny(tf, allMethodTypes...) && tf != jsontextValueType { - serr = orErrorf(serr, t, "inlined Go struct field %s of type %s must not implement marshal or unmarshal methods", sf.Name, tf) - } - - // Handle an inlined field that serializes to/from - // a finite number of JSON object members backed by a Go struct. - if tf.Kind() == reflect.Struct { - if f.unknown { - serr = orErrorf(serr, t, "inlined Go struct field %s of type %s with `unknown` tag must be a Go map of string key or a jsontext.Value", sf.Name, tf) - continue // invalid inlined field; treat as ignored - } - if qe.visitChildren { - queue = append(queue, queueEntry{tf, f.index, !seen[tf]}) - } - seen[tf] = true - continue - } else if !sf.IsExported() { - serr = orErrorf(serr, t, "inlined Go struct field %s is not exported", sf.Name) - continue // invalid inlined field; treat as ignored - } - - // Handle an inlined field that serializes to/from any number of - // JSON object members back by a Go map or jsontext.Value. - switch { - case tf == jsontextValueType: - f.fncs = nil // specially handled in arshal_inlined.go - case tf.Kind() == reflect.Map && tf.Key().Kind() == reflect.String: - if implementsAny(tf.Key(), allMethodTypes...) { - serr = orErrorf(serr, t, "inlined map field %s of type %s must have a string key that does not implement marshal or unmarshal methods", sf.Name, tf) - continue // invalid inlined field; treat as ignored - } - f.fncs = lookupArshaler(tf.Elem()) - default: - serr = orErrorf(serr, t, "inlined Go struct field %s of type %s must be a Go struct, Go map of string key, or jsontext.Value", sf.Name, tf) - continue // invalid inlined field; treat as ignored - } - - // Reject multiple inlined fallback fields within the same struct. - if inlinedFallbackIndex >= 0 { - serr = orErrorf(serr, t, "inlined Go struct fields %s and %s cannot both be a Go map or jsontext.Value", t.Field(inlinedFallbackIndex).Name, sf.Name) - // Still append f to inlinedFallbacks as there is still a - // check for a dominant inlined fallback before returning. - } - inlinedFallbackIndex = i - - inlinedFallbacks = append(inlinedFallbacks, f) - } else { - // Handle normal Go struct field that serializes to/from - // a single JSON object member. - - // Unexported fields cannot be serialized except for - // embedded fields of a struct type, - // which might promote exported fields of their own. - if !sf.IsExported() { - tf := indirectType(f.typ) - if !(sf.Anonymous && tf.Kind() == reflect.Struct) { - serr = orErrorf(serr, t, "Go struct field %s is not exported", sf.Name) - continue - } - // Unfortunately, methods on the unexported field - // still cannot be called. - if implementsAny(tf, allMethodTypes...) || - (f.omitzero && implementsAny(tf, isZeroerType)) { - serr = orErrorf(serr, t, "Go struct field %s is not exported for method calls", sf.Name) - continue - } - } - - // Provide a function that uses a type's IsZero method. - switch { - case sf.Type.Kind() == reflect.Interface && sf.Type.Implements(isZeroerType): - f.isZero = func(va addressableValue) bool { - // Avoid panics calling IsZero on a nil interface or - // non-nil interface with nil pointer. - return va.IsNil() || (va.Elem().Kind() == reflect.Pointer && va.Elem().IsNil()) || va.Interface().(isZeroer).IsZero() - } - case sf.Type.Kind() == reflect.Pointer && sf.Type.Implements(isZeroerType): - f.isZero = func(va addressableValue) bool { - // Avoid panics calling IsZero on nil pointer. - return va.IsNil() || va.Interface().(isZeroer).IsZero() - } - case sf.Type.Implements(isZeroerType): - f.isZero = func(va addressableValue) bool { return va.Interface().(isZeroer).IsZero() } - case reflect.PointerTo(sf.Type).Implements(isZeroerType): - f.isZero = func(va addressableValue) bool { return va.Addr().Interface().(isZeroer).IsZero() } - } - - // Provide a function that can determine whether the value would - // serialize as an empty JSON value. - switch sf.Type.Kind() { - case reflect.String, reflect.Map, reflect.Array, reflect.Slice: - f.isEmpty = func(va addressableValue) bool { return va.Len() == 0 } - case reflect.Pointer, reflect.Interface: - f.isEmpty = func(va addressableValue) bool { return va.IsNil() } - } - - // Reject multiple fields with same name within the same struct. - if j, ok := namesIndex[f.name]; ok { - serr = orErrorf(serr, t, "Go struct fields %s and %s conflict over JSON object name %q", t.Field(j).Name, sf.Name, f.name) - // Still append f to allFields as there is still a - // check for a dominant field before returning. - } - namesIndex[f.name] = i - - f.id = len(allFields) - f.fncs = lookupArshaler(sf.Type) - allFields = append(allFields, f) - } - } - - // NOTE: New users to the json package are occasionally surprised that - // unexported fields are ignored. This occurs by necessity due to our - // inability to directly introspect such fields with Go reflection - // without the use of unsafe. - // - // To reduce friction here, refuse to serialize any Go struct that - // has no JSON serializable fields, has at least one Go struct field, - // and does not have any `json` tags present. For example, - // errors returned by errors.New would fail to serialize. - isEmptyStruct := t.NumField() == 0 - if !isEmptyStruct && !hasAnyJSONTag && !hasAnyJSONField { - serr = cmp.Or(serr, &SemanticError{GoType: t, Err: errNoExportedFields}) - } - } - - // Sort the fields by exact name (breaking ties by depth and - // then by presence of an explicitly provided JSON name). - // Select the dominant field from each set of fields with the same name. - // If multiple fields have the same name, then the dominant field - // is the one that exists alone at the shallowest depth, - // or the one that is uniquely tagged with a JSON name. - // Otherwise, no dominant field exists for the set. - flattened := allFields[:0] - slices.SortStableFunc(allFields, func(x, y structField) int { - return cmp.Or( - strings.Compare(x.name, y.name), - cmp.Compare(len(x.index), len(y.index)), - boolsCompare(!x.hasName, !y.hasName)) - }) - for len(allFields) > 0 { - n := 1 // number of fields with the same exact name - for n < len(allFields) && allFields[n-1].name == allFields[n].name { - n++ - } - if n == 1 || len(allFields[0].index) != len(allFields[1].index) || allFields[0].hasName != allFields[1].hasName { - flattened = append(flattened, allFields[0]) // only keep field if there is a dominant field - } - allFields = allFields[n:] - } - - // Sort the fields according to a breadth-first ordering - // so that we can re-number IDs with the smallest possible values. - // This optimizes use of uintSet such that it fits in the 64-entry bit set. - slices.SortFunc(flattened, func(x, y structField) int { - return cmp.Compare(x.id, y.id) - }) - for i := range flattened { - flattened[i].id = i - } - - // Sort the fields according to a depth-first ordering - // as the typical order that fields are marshaled. - slices.SortFunc(flattened, func(x, y structField) int { - return slices.Compare(x.index, y.index) - }) - - // Compute the mapping of fields in the byActualName map. - // Pre-fold all names so that we can lookup folded names quickly. - fs = structFields{ - flattened: flattened, - byActualName: make(map[string]*structField, len(flattened)), - byFoldedName: make(map[string][]*structField, len(flattened)), - } - for i, f := range fs.flattened { - foldedName := string(foldName([]byte(f.name))) - fs.byActualName[f.name] = &fs.flattened[i] - fs.byFoldedName[foldedName] = append(fs.byFoldedName[foldedName], &fs.flattened[i]) - } - for foldedName, fields := range fs.byFoldedName { - if len(fields) > 1 { - // The precedence order for conflicting ignoreCase names - // is by breadth-first order, rather than depth-first order. - slices.SortFunc(fields, func(x, y *structField) int { - return cmp.Compare(x.id, y.id) - }) - fs.byFoldedName[foldedName] = fields - } - } - if n := len(inlinedFallbacks); n == 1 || (n > 1 && len(inlinedFallbacks[0].index) != len(inlinedFallbacks[1].index)) { - fs.inlinedFallback = &inlinedFallbacks[0] // dominant inlined fallback field - } - fs.reindex() - return fs, serr -} - -// indirectType unwraps one level of pointer indirection -// similar to how Go only allows embedding either T or *T, -// but not **T or P (which is a named pointer). -func indirectType(t reflect.Type) reflect.Type { - if t.Kind() == reflect.Pointer && t.Name() == "" { - t = t.Elem() - } - return t -} - -// matchFoldedName matches a case-insensitive name depending on the options. -// It assumes that foldName(f.name) == foldName(name). -// -// Case-insensitive matching is used if the `case:ignore` tag option is specified -// or the MatchCaseInsensitiveNames call option is specified -// (and the `case:strict` tag option is not specified). -// Functionally, the `case:ignore` and `case:strict` tag options take precedence. -// -// The v1 definition of case-insensitivity operated under strings.EqualFold -// and would strictly compare dashes and underscores, -// while the v2 definition would ignore the presence of dashes and underscores. -// Thus, if the MatchCaseSensitiveDelimiter call option is specified, -// the match is further restricted to using strings.EqualFold. -func (f *structField) matchFoldedName(name []byte, flags *jsonflags.Flags) bool { - if f.casing == caseIgnore || (flags.Get(jsonflags.MatchCaseInsensitiveNames) && f.casing != caseStrict) { - if !flags.Get(jsonflags.MatchCaseSensitiveDelimiter) || strings.EqualFold(string(name), f.name) { - return true - } - } - return false -} - -const ( - caseIgnore = 1 - caseStrict = 2 -) - -type fieldOptions struct { - name string - quotedName string // quoted name per RFC 8785, section 3.2.2.2. - hasName bool - nameNeedEscape bool - casing int8 // either 0, caseIgnore, or caseStrict - inline bool - unknown bool - omitzero bool - omitempty bool - string bool - format string -} - -// parseFieldOptions parses the `json` tag in a Go struct field as -// a structured set of options configuring parameters such as -// the JSON member name and other features. -func parseFieldOptions(sf reflect.StructField) (out fieldOptions, ignored bool, err error) { - tag, hasTag := sf.Tag.Lookup("json") - tagOrig := tag - - // Check whether this field is explicitly ignored. - if tag == "-" { - return fieldOptions{}, true, nil - } - - // Check whether this field is unexported and not embedded, - // which Go reflection cannot mutate for the sake of serialization. - // - // An embedded field of an unexported type is still capable of - // forwarding exported fields, which may be JSON serialized. - // This technically operates on the edge of what is permissible by - // the Go language, but the most recent decision is to permit this. - // - // See https://go.dev/issue/24153 and https://go.dev/issue/32772. - if !sf.IsExported() && !sf.Anonymous { - // Tag options specified on an unexported field suggests user error. - if hasTag { - err = cmp.Or(err, fmt.Errorf("unexported Go struct field %s cannot have non-ignored `json:%q` tag", sf.Name, tag)) - } - return fieldOptions{}, true, err - } - - // Determine the JSON member name for this Go field. A user-specified name - // may be provided as either an identifier or a single-quoted string. - // The single-quoted string allows arbitrary characters in the name. - // See https://go.dev/issue/2718 and https://go.dev/issue/3546. - out.name = sf.Name // always starts with an uppercase character - if len(tag) > 0 && !strings.HasPrefix(tag, ",") { - // For better compatibility with v1, accept almost any unescaped name. - n := len(tag) - len(strings.TrimLeftFunc(tag, func(r rune) bool { - return !strings.ContainsRune(",\\'\"`", r) // reserve comma, backslash, and quotes - })) - name := tag[:n] - - // If the next character is not a comma, then the name is either - // malformed (if n > 0) or a single-quoted name. - // In either case, call consumeTagOption to handle it further. - var err2 error - if !strings.HasPrefix(tag[n:], ",") && len(name) != len(tag) { - name, n, err2 = consumeTagOption(tag) - if err2 != nil { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed `json` tag: %v", sf.Name, err2)) - } - } - if !utf8.ValidString(name) { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has JSON object name %q with invalid UTF-8", sf.Name, name)) - name = string([]rune(name)) // replace invalid UTF-8 with utf8.RuneError - } - if name == "-" && tag[0] == '-' { - defer func() { // defer to let other errors take precedence - err = cmp.Or(err, fmt.Errorf("Go struct field %s has JSON object name %q; either "+ - "use `json:\"-\"` to ignore the field or "+ - "use `json:\"'-'%s` to specify %q as the name", sf.Name, out.name, strings.TrimPrefix(strconv.Quote(tagOrig), `"-`), name)) - }() - } - if err2 == nil { - out.hasName = true - out.name = name - } - tag = tag[n:] - } - b, _ := jsonwire.AppendQuote(nil, out.name, &jsonflags.Flags{}) - out.quotedName = string(b) - out.nameNeedEscape = jsonwire.NeedEscape(out.name) - - // Handle any additional tag options (if any). - var wasFormat bool - seenOpts := make(map[string]bool) - for len(tag) > 0 { - // Consume comma delimiter. - if tag[0] != ',' { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed `json` tag: invalid character %q before next option (expecting ',')", sf.Name, tag[0])) - } else { - tag = tag[len(","):] - if len(tag) == 0 { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed `json` tag: invalid trailing ',' character", sf.Name)) - break - } - } - - // Consume and process the tag option. - opt, n, err2 := consumeTagOption(tag) - if err2 != nil { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed `json` tag: %v", sf.Name, err2)) - } - rawOpt := tag[:n] - tag = tag[n:] - switch { - case wasFormat: - err = cmp.Or(err, fmt.Errorf("Go struct field %s has `format` tag option that was not specified last", sf.Name)) - case strings.HasPrefix(rawOpt, "'") && strings.TrimFunc(opt, isLetterOrDigit) == "": - err = cmp.Or(err, fmt.Errorf("Go struct field %s has unnecessarily quoted appearance of `%s` tag option; specify `%s` instead", sf.Name, rawOpt, opt)) - } - switch opt { - case "case": - if !strings.HasPrefix(tag, ":") { - err = cmp.Or(err, fmt.Errorf("Go struct field %s is missing value for `case` tag option; specify `case:ignore` or `case:strict` instead", sf.Name)) - break - } - tag = tag[len(":"):] - opt, n, err2 := consumeTagOption(tag) - if err2 != nil { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed value for `case` tag option: %v", sf.Name, err2)) - break - } - rawOpt := tag[:n] - tag = tag[n:] - if strings.HasPrefix(rawOpt, "'") { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has unnecessarily quoted appearance of `case:%s` tag option; specify `case:%s` instead", sf.Name, rawOpt, opt)) - } - switch opt { - case "ignore": - out.casing |= caseIgnore - case "strict": - out.casing |= caseStrict - default: - err = cmp.Or(err, fmt.Errorf("Go struct field %s has unknown `case:%s` tag value", sf.Name, rawOpt)) - } - case "inline": - out.inline = true - case "unknown": - out.unknown = true - case "omitzero": - out.omitzero = true - case "omitempty": - out.omitempty = true - case "string": - out.string = true - case "format": - if !strings.HasPrefix(tag, ":") { - err = cmp.Or(err, fmt.Errorf("Go struct field %s is missing value for `format` tag option", sf.Name)) - break - } - tag = tag[len(":"):] - opt, n, err2 := consumeTagOption(tag) - if err2 != nil { - err = cmp.Or(err, fmt.Errorf("Go struct field %s has malformed value for `format` tag option: %v", sf.Name, err2)) - break - } - tag = tag[n:] - out.format = opt - wasFormat = true - default: - // Reject keys that resemble one of the supported options. - // This catches invalid mutants such as "omitEmpty" or "omit_empty". - normOpt := strings.ReplaceAll(strings.ToLower(opt), "_", "") - switch normOpt { - case "case", "inline", "unknown", "omitzero", "omitempty", "string", "format": - err = cmp.Or(err, fmt.Errorf("Go struct field %s has invalid appearance of `%s` tag option; specify `%s` instead", sf.Name, opt, normOpt)) - } - - // NOTE: Everything else is ignored. This does not mean it is - // forward compatible to insert arbitrary tag options since - // a future version of this package may understand that tag. - } - - // Reject duplicates. - switch { - case out.casing == caseIgnore|caseStrict: - err = cmp.Or(err, fmt.Errorf("Go struct field %s cannot have both `case:ignore` and `case:strict` tag options", sf.Name)) - case seenOpts[opt]: - err = cmp.Or(err, fmt.Errorf("Go struct field %s has duplicate appearance of `%s` tag option", sf.Name, rawOpt)) - } - seenOpts[opt] = true - } - return out, false, err -} - -// consumeTagOption consumes the next option, -// which is either a Go identifier or a single-quoted string. -// If the next option is invalid, it returns all of in until the next comma, -// and reports an error. -func consumeTagOption(in string) (string, int, error) { - // For legacy compatibility with v1, assume options are comma-separated. - i := strings.IndexByte(in, ',') - if i < 0 { - i = len(in) - } - - switch r, _ := utf8.DecodeRuneInString(in); { - // Option as a Go identifier. - case r == '_' || unicode.IsLetter(r): - n := len(in) - len(strings.TrimLeftFunc(in, isLetterOrDigit)) - return in[:n], n, nil - // Option as a single-quoted string. - case r == '\'': - // The grammar is nearly identical to a double-quoted Go string literal, - // but uses single quotes as the terminators. The reason for a custom - // grammar is because both backtick and double quotes cannot be used - // verbatim in a struct tag. - // - // Convert a single-quoted string to a double-quote string and rely on - // strconv.Unquote to handle the rest. - var inEscape bool - b := []byte{'"'} - n := len(`'`) - for len(in) > n { - r, rn := utf8.DecodeRuneInString(in[n:]) - switch { - case inEscape: - if r == '\'' { - b = b[:len(b)-1] // remove escape character: `\'` => `'` - } - inEscape = false - case r == '\\': - inEscape = true - case r == '"': - b = append(b, '\\') // insert escape character: `"` => `\"` - case r == '\'': - b = append(b, '"') - n += len(`'`) - out, err := strconv.Unquote(string(b)) - if err != nil { - return in[:i], i, fmt.Errorf("invalid single-quoted string: %s", in[:n]) - } - return out, n, nil - } - b = append(b, in[n:][:rn]...) - n += rn - } - if n > 10 { - n = 10 // limit the amount of context printed in the error - } - return in[:i], i, fmt.Errorf("single-quoted string not terminated: %s...", in[:n]) - case len(in) == 0: - return in[:i], i, io.ErrUnexpectedEOF - default: - return in[:i], i, fmt.Errorf("invalid character %q at start of option (expecting Unicode letter or single quote)", r) - } -} - -func isLetterOrDigit(r rune) bool { - return r == '_' || unicode.IsLetter(r) || unicode.IsNumber(r) -} - -// boolsCompare compares x and y, ordering false before true. -func boolsCompare(x, y bool) int { - switch { - case !x && y: - return -1 - default: - return 0 - case x && !y: - return +1 - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fold.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fold.go deleted file mode 100644 index 9ab735814..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fold.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "unicode" - "unicode/utf8" -) - -// foldName returns a folded string such that foldName(x) == foldName(y) -// is similar to strings.EqualFold(x, y), but ignores underscore and dashes. -// This allows foldName to match common naming conventions. -func foldName(in []byte) []byte { - // This is inlinable to take advantage of "function outlining". - // See https://blog.filippo.io/efficient-go-apis-with-the-inliner/ - var arr [32]byte // large enough for most JSON names - return appendFoldedName(arr[:0], in) -} -func appendFoldedName(out, in []byte) []byte { - for i := 0; i < len(in); { - // Handle single-byte ASCII. - if c := in[i]; c < utf8.RuneSelf { - if c != '_' && c != '-' { - if 'a' <= c && c <= 'z' { - c -= 'a' - 'A' - } - out = append(out, c) - } - i++ - continue - } - // Handle multi-byte Unicode. - r, n := utf8.DecodeRune(in[i:]) - out = utf8.AppendRune(out, foldRune(r)) - i += n - } - return out -} - -// foldRune is a variation on unicode.SimpleFold that returns the same rune -// for all runes in the same fold set. -// -// Invariant: -// -// foldRune(x) == foldRune(y) ⇔ strings.EqualFold(string(x), string(y)) -func foldRune(r rune) rune { - for { - r2 := unicode.SimpleFold(r) - if r2 <= r { - return r2 // smallest character in the fold set - } - r = r2 - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/intern.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/intern.go deleted file mode 100644 index 42fc3d471..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/intern.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "encoding/binary" - "math/bits" -) - -// stringCache is a cache for strings converted from a []byte. -type stringCache = [256]string // 256*unsafe.Sizeof(string("")) => 4KiB - -// makeString returns the string form of b. -// It returns a pre-allocated string from c if present, otherwise -// it allocates a new string, inserts it into the cache, and returns it. -func makeString(c *stringCache, b []byte) string { - const ( - minCachedLen = 2 // single byte strings are already interned by the runtime - maxCachedLen = 256 // large enough for UUIDs, IPv6 addresses, SHA-256 checksums, etc. - ) - if c == nil || len(b) < minCachedLen || len(b) > maxCachedLen { - return string(b) - } - - // Compute a hash from the fixed-width prefix and suffix of the string. - // This ensures hashing a string is a constant time operation. - var h uint32 - switch { - case len(b) >= 8: - lo := binary.LittleEndian.Uint64(b[:8]) - hi := binary.LittleEndian.Uint64(b[len(b)-8:]) - h = hash64(uint32(lo), uint32(lo>>32)) ^ hash64(uint32(hi), uint32(hi>>32)) - case len(b) >= 4: - lo := binary.LittleEndian.Uint32(b[:4]) - hi := binary.LittleEndian.Uint32(b[len(b)-4:]) - h = hash64(lo, hi) - case len(b) >= 2: - lo := binary.LittleEndian.Uint16(b[:2]) - hi := binary.LittleEndian.Uint16(b[len(b)-2:]) - h = hash64(uint32(lo), uint32(hi)) - } - - // Check the cache for the string. - i := h % uint32(len(*c)) - if s := (*c)[i]; s == string(b) { - return s - } - s := string(b) - (*c)[i] = s - return s -} - -// hash64 returns the hash of two uint32s as a single uint32. -func hash64(lo, hi uint32) uint32 { - // If avalanche=true, this is identical to XXH32 hash on a 8B string: - // var b [8]byte - // binary.LittleEndian.PutUint32(b[:4], lo) - // binary.LittleEndian.PutUint32(b[4:], hi) - // return xxhash.Sum32(b[:]) - const ( - prime1 = 0x9e3779b1 - prime2 = 0x85ebca77 - prime3 = 0xc2b2ae3d - prime4 = 0x27d4eb2f - prime5 = 0x165667b1 - ) - h := prime5 + uint32(8) - h += lo * prime3 - h = bits.RotateLeft32(h, 17) * prime4 - h += hi * prime3 - h = bits.RotateLeft32(h, 17) * prime4 - // Skip final mix (avalanche) step of XXH32 for performance reasons. - // Empirical testing shows that the improvements in unbiased distribution - // does not outweigh the extra cost in computational complexity. - const avalanche = false - if avalanche { - h ^= h >> 15 - h *= prime2 - h ^= h >> 13 - h *= prime3 - h ^= h >> 16 - } - return h -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/internal.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/internal.go deleted file mode 100644 index 05801c6b2..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/internal.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -import "errors" - -// NotForPublicUse is a marker type that an API is for internal use only. -// It does not perfectly prevent usage of that API, but helps to restrict usage. -// Anything with this marker is not covered by the Go compatibility agreement. -type NotForPublicUse struct{} - -// AllowInternalUse is passed from "json" to "jsontext" to authenticate -// that the caller can have access to internal functionality. -var AllowInternalUse NotForPublicUse - -// Sentinel error values internally shared between jsonv1 and jsonv2. -var ( - ErrCycle = errors.New("encountered a cycle") - ErrNonNilReference = errors.New("value must be passed as a non-nil pointer reference") - ErrNilInterface = errors.New("cannot derive concrete type for nil interface with finite type set") -) - -var ( - // TransformMarshalError converts a v2 error into a v1 error. - // It is called only at the top-level of a Marshal function. - TransformMarshalError func(any, error) error - // NewMarshalerError constructs a jsonv1.MarshalerError. - // It is called after a user-defined Marshal method/function fails. - NewMarshalerError func(any, error, string) error - // TransformUnmarshalError converts a v2 error into a v1 error. - // It is called only at the top-level of a Unmarshal function. - TransformUnmarshalError func(any, error) error - - // NewRawNumber returns new(jsonv1.Number). - NewRawNumber func() any - // RawNumberOf returns jsonv1.Number(b). - RawNumberOf func(b []byte) any -) diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags/flags.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags/flags.go deleted file mode 100644 index 810128b51..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags/flags.go +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// jsonflags implements all the optional boolean flags. -// These flags are shared across both "json", "jsontext", and "jsonopts". -package jsonflags - -import "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - -// Bools represents zero or more boolean flags, all set to true or false. -// The least-significant bit is the boolean value of all flags in the set. -// The remaining bits identify which particular flags. -// -// In common usage, this is OR'd with 0 or 1. For example: -// - (AllowInvalidUTF8 | 0) means "AllowInvalidUTF8 is false" -// - (Multiline | Indent | 1) means "Multiline and Indent are true" -type Bools uint64 - -func (Bools) JSONOptions(internal.NotForPublicUse) {} - -const ( - // AllFlags is the set of all flags. - AllFlags = AllCoderFlags | AllArshalV2Flags | AllArshalV1Flags - - // AllCoderFlags is the set of all encoder/decoder flags. - AllCoderFlags = (maxCoderFlag - 1) - initFlag - - // AllArshalV2Flags is the set of all v2 marshal/unmarshal flags. - AllArshalV2Flags = (maxArshalV2Flag - 1) - (maxCoderFlag - 1) - - // AllArshalV1Flags is the set of all v1 marshal/unmarshal flags. - AllArshalV1Flags = (maxArshalV1Flag - 1) - (maxArshalV2Flag - 1) - - // NonBooleanFlags is the set of non-boolean flags, - // where the value is some other concrete Go type. - // The value of the flag is stored within jsonopts.Struct. - NonBooleanFlags = 0 | - Indent | - IndentPrefix | - ByteLimit | - DepthLimit | - Marshalers | - Unmarshalers - - // DefaultV1Flags is the set of booleans flags that default to true under - // v1 semantics. None of the non-boolean flags differ between v1 and v2. - DefaultV1Flags = 0 | - AllowDuplicateNames | - AllowInvalidUTF8 | - EscapeForHTML | - EscapeForJS | - PreserveRawStrings | - Deterministic | - FormatNilMapAsNull | - FormatNilSliceAsNull | - MatchCaseInsensitiveNames | - CallMethodsWithLegacySemantics | - FormatByteArrayAsArray | - FormatBytesWithLegacySemantics | - FormatDurationAsNano | - MatchCaseSensitiveDelimiter | - MergeWithLegacySemantics | - OmitEmptyWithLegacySemantics | - ParseBytesWithLooseRFC4648 | - ParseTimeWithLooseRFC3339 | - ReportErrorsWithLegacySemantics | - StringifyWithLegacySemantics | - UnmarshalArrayFromAnyLength - - // AnyWhitespace reports whether the encoded output might have any whitespace. - AnyWhitespace = Multiline | SpaceAfterColon | SpaceAfterComma - - // WhitespaceFlags is the set of flags related to whitespace formatting. - // In contrast to AnyWhitespace, this includes Indent and IndentPrefix - // as those settings take no effect if Multiline is false. - WhitespaceFlags = AnyWhitespace | Indent | IndentPrefix - - // AnyEscape is the set of flags related to escaping in a JSON string. - AnyEscape = EscapeForHTML | EscapeForJS - - // CanonicalizeNumbers is the set of flags related to raw number canonicalization. - CanonicalizeNumbers = CanonicalizeRawInts | CanonicalizeRawFloats -) - -// Encoder and decoder flags. -const ( - initFlag Bools = 1 << iota // reserved for the boolean value itself - - AllowDuplicateNames // encode or decode - AllowInvalidUTF8 // encode or decode - WithinArshalCall // encode or decode; for internal use by json.Marshal and json.Unmarshal - OmitTopLevelNewline // encode only; for internal use by json.Marshal and json.MarshalWrite - PreserveRawStrings // encode only - CanonicalizeRawInts // encode only - CanonicalizeRawFloats // encode only - ReorderRawObjects // encode only - EscapeForHTML // encode only - EscapeForJS // encode only - Multiline // encode only - SpaceAfterColon // encode only - SpaceAfterComma // encode only - Indent // encode only; non-boolean flag - IndentPrefix // encode only; non-boolean flag - ByteLimit // encode or decode; non-boolean flag - DepthLimit // encode or decode; non-boolean flag - - maxCoderFlag -) - -// Marshal and Unmarshal flags (for v2). -const ( - _ Bools = (maxCoderFlag >> 1) << iota - - StringifyNumbers // marshal or unmarshal - Deterministic // marshal only - FormatNilMapAsNull // marshal only - FormatNilSliceAsNull // marshal only - OmitZeroStructFields // marshal only - MatchCaseInsensitiveNames // marshal or unmarshal - DiscardUnknownMembers // marshal only - RejectUnknownMembers // unmarshal only - Marshalers // marshal only; non-boolean flag - Unmarshalers // unmarshal only; non-boolean flag - - maxArshalV2Flag -) - -// Marshal and Unmarshal flags (for v1). -const ( - _ Bools = (maxArshalV2Flag >> 1) << iota - - CallMethodsWithLegacySemantics // marshal or unmarshal - FormatByteArrayAsArray // marshal or unmarshal - FormatBytesWithLegacySemantics // marshal or unmarshal - FormatDurationAsNano // marshal or unmarshal - MatchCaseSensitiveDelimiter // marshal or unmarshal - MergeWithLegacySemantics // unmarshal - OmitEmptyWithLegacySemantics // marshal - ParseBytesWithLooseRFC4648 // unmarshal - ParseTimeWithLooseRFC3339 // unmarshal - ReportErrorsWithLegacySemantics // marshal or unmarshal - StringifyWithLegacySemantics // marshal or unmarshal - StringifyBoolsAndStrings // marshal or unmarshal; for internal use by jsonv2.makeStructArshaler - UnmarshalAnyWithRawNumber // unmarshal; for internal use by jsonv1.Decoder.UseNumber - UnmarshalArrayFromAnyLength // unmarshal - - maxArshalV1Flag -) - -// bitsUsed is the number of bits used in the 64-bit boolean flags -const bitsUsed = 42 - -// Static compile check that bitsUsed and maxArshalV1Flag are in sync. -const _ = uint64((1< 0b_110_11011 - dst.Values &= ^src.Presence // e.g., 0b_1000_0011 & 0b_1010_0101 -> 0b_100_00001 - dst.Values |= src.Values // e.g., 0b_1000_0001 | 0b_1001_0010 -> 0b_100_10011 -} - -// Set sets both the presence and value for the provided bool (or set of bools). -func (fs *Flags) Set(f Bools) { - // Select out the bits for the flag identifiers (everything except LSB), - // then set the presence for all the identifier bits (using OR), - // then invert the identifier bits to clear out the values (using AND-NOT), - // then copy over all the identifier bits to the value if LSB is 1. - // e.g., fs := Flags{Presence: 0b_0101_0010, Value: 0b_0001_0010} - // e.g., f := 0b_1001_0001 - id := uint64(f) &^ uint64(1) // e.g., 0b_1001_0001 & 0b_1111_1110 -> 0b_1001_0000 - fs.Presence |= id // e.g., 0b_0101_0010 | 0b_1001_0000 -> 0b_1101_0011 - fs.Values &= ^id // e.g., 0b_0001_0010 & 0b_0110_1111 -> 0b_0000_0010 - fs.Values |= uint64(f&1) * id // e.g., 0b_0000_0010 | 0b_1001_0000 -> 0b_1001_0010 -} - -// Get reports whether the bool (or any of the bools) is true. -// This is generally only used with a singular bool. -// The value bit of f (i.e., the LSB) is ignored. -func (fs Flags) Get(f Bools) bool { - return fs.Values&uint64(f) > 0 -} - -// Has reports whether the bool (or any of the bools) is set. -// The value bit of f (i.e., the LSB) is ignored. -func (fs Flags) Has(f Bools) bool { - return fs.Presence&uint64(f) > 0 -} - -// Clear clears both the presence and value for the provided bool or bools. -// The value bit of f (i.e., the LSB) is ignored. -func (fs *Flags) Clear(f Bools) { - // Invert f to produce a mask to clear all bits in f (using AND). - // e.g., fs := Flags{Presence: 0b_0101_0010, Value: 0b_0001_0010} - // e.g., f := 0b_0001_1000 - mask := uint64(^f) // e.g., 0b_0001_1000 -> 0b_1110_0111 - fs.Presence &= mask // e.g., 0b_0101_0010 & 0b_1110_0111 -> 0b_0100_0010 - fs.Values &= mask // e.g., 0b_0001_0010 & 0b_1110_0111 -> 0b_0000_0010 -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts/options.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts/options.go deleted file mode 100644 index 142653518..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts/options.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsonopts - -import ( - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" -) - -// Options is the common options type shared across json packages. -type Options interface { - // JSONOptions is exported so related json packages can implement Options. - JSONOptions(internal.NotForPublicUse) -} - -// Struct is the combination of all options in struct form. -// This is efficient to pass down the call stack and to query. -type Struct struct { - Flags jsonflags.Flags - - CoderValues - ArshalValues -} - -type CoderValues struct { - Indent string // jsonflags.Indent - IndentPrefix string // jsonflags.IndentPrefix - ByteLimit int64 // jsonflags.ByteLimit - DepthLimit int // jsonflags.DepthLimit -} - -type ArshalValues struct { - // The Marshalers and Unmarshalers fields use the any type to avoid a - // concrete dependency on *json.Marshalers and *json.Unmarshalers, - // which would in turn create a dependency on the "reflect" package. - - Marshalers any // jsonflags.Marshalers - Unmarshalers any // jsonflags.Unmarshalers - - Format string - FormatDepth int -} - -// DefaultOptionsV2 is the set of all options that define default v2 behavior. -var DefaultOptionsV2 = Struct{ - Flags: jsonflags.Flags{ - Presence: uint64(jsonflags.AllFlags & ^jsonflags.WhitespaceFlags), - Values: uint64(0), - }, -} - -// DefaultOptionsV1 is the set of all options that define default v1 behavior. -var DefaultOptionsV1 = Struct{ - Flags: jsonflags.Flags{ - Presence: uint64(jsonflags.AllFlags & ^jsonflags.WhitespaceFlags), - Values: uint64(jsonflags.DefaultV1Flags), - }, -} - -func (*Struct) JSONOptions(internal.NotForPublicUse) {} - -// GetUnknownOption is injected by the "json" package to handle Options -// declared in that package so that "jsonopts" can handle them. -var GetUnknownOption = func(Struct, Options) (any, bool) { panic("unknown option") } - -func GetOption[T any](opts Options, setter func(T) Options) (T, bool) { - // Collapse the options to *Struct to simplify lookup. - structOpts, ok := opts.(*Struct) - if !ok { - var structOpts2 Struct - structOpts2.Join(opts) - structOpts = &structOpts2 - } - - // Lookup the option based on the return value of the setter. - var zero T - switch opt := setter(zero).(type) { - case jsonflags.Bools: - v := structOpts.Flags.Get(opt) - ok := structOpts.Flags.Has(opt) - return any(v).(T), ok - case Indent: - if !structOpts.Flags.Has(jsonflags.Indent) { - return zero, false - } - return any(structOpts.Indent).(T), true - case IndentPrefix: - if !structOpts.Flags.Has(jsonflags.IndentPrefix) { - return zero, false - } - return any(structOpts.IndentPrefix).(T), true - case ByteLimit: - if !structOpts.Flags.Has(jsonflags.ByteLimit) { - return zero, false - } - return any(structOpts.ByteLimit).(T), true - case DepthLimit: - if !structOpts.Flags.Has(jsonflags.DepthLimit) { - return zero, false - } - return any(structOpts.DepthLimit).(T), true - default: - v, ok := GetUnknownOption(*structOpts, opt) - return v.(T), ok - } -} - -// JoinUnknownOption is injected by the "json" package to handle Options -// declared in that package so that "jsonopts" can handle them. -var JoinUnknownOption = func(Struct, Options) Struct { panic("unknown option") } - -func (dst *Struct) Join(srcs ...Options) { - dst.join(false, srcs...) -} - -func (dst *Struct) JoinWithoutCoderOptions(srcs ...Options) { - dst.join(true, srcs...) -} - -func (dst *Struct) join(excludeCoderOptions bool, srcs ...Options) { - for _, src := range srcs { - switch src := src.(type) { - case nil: - continue - case jsonflags.Bools: - if excludeCoderOptions { - src &= ^jsonflags.AllCoderFlags - } - dst.Flags.Set(src) - case Indent: - if excludeCoderOptions { - continue - } - dst.Flags.Set(jsonflags.Multiline | jsonflags.Indent | 1) - dst.Indent = string(src) - case IndentPrefix: - if excludeCoderOptions { - continue - } - dst.Flags.Set(jsonflags.Multiline | jsonflags.IndentPrefix | 1) - dst.IndentPrefix = string(src) - case ByteLimit: - if excludeCoderOptions { - continue - } - dst.Flags.Set(jsonflags.ByteLimit | 1) - dst.ByteLimit = int64(src) - case DepthLimit: - if excludeCoderOptions { - continue - } - dst.Flags.Set(jsonflags.DepthLimit | 1) - dst.DepthLimit = int(src) - case *Struct: - srcFlags := src.Flags // shallow copy the flags - if excludeCoderOptions { - srcFlags.Clear(jsonflags.AllCoderFlags) - } - dst.Flags.Join(srcFlags) - if srcFlags.Has(jsonflags.NonBooleanFlags) { - if srcFlags.Has(jsonflags.Indent) { - dst.Indent = src.Indent - } - if srcFlags.Has(jsonflags.IndentPrefix) { - dst.IndentPrefix = src.IndentPrefix - } - if srcFlags.Has(jsonflags.ByteLimit) { - dst.ByteLimit = src.ByteLimit - } - if srcFlags.Has(jsonflags.DepthLimit) { - dst.DepthLimit = src.DepthLimit - } - if srcFlags.Has(jsonflags.Marshalers) { - dst.Marshalers = src.Marshalers - } - if srcFlags.Has(jsonflags.Unmarshalers) { - dst.Unmarshalers = src.Unmarshalers - } - } - default: - *dst = JoinUnknownOption(*dst, src) - } - } -} - -type ( - Indent string // jsontext.WithIndent - IndentPrefix string // jsontext.WithIndentPrefix - ByteLimit int64 // jsontext.WithByteLimit - DepthLimit int // jsontext.WithDepthLimit - // type for jsonflags.Marshalers declared in "json" package - // type for jsonflags.Unmarshalers declared in "json" package -) - -func (Indent) JSONOptions(internal.NotForPublicUse) {} -func (IndentPrefix) JSONOptions(internal.NotForPublicUse) {} -func (ByteLimit) JSONOptions(internal.NotForPublicUse) {} -func (DepthLimit) JSONOptions(internal.NotForPublicUse) {} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/decode.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/decode.go deleted file mode 100644 index 02787719c..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/decode.go +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsonwire - -import ( - "io" - "math" - "slices" - "strconv" - "unicode/utf16" - "unicode/utf8" -) - -type ValueFlags uint - -const ( - _ ValueFlags = (1 << iota) / 2 // powers of two starting with zero - - stringNonVerbatim // string cannot be naively treated as valid UTF-8 - stringNonCanonical // string not formatted according to RFC 8785, section 3.2.2.2. - // TODO: Track whether a number is a non-integer? -) - -func (f *ValueFlags) Join(f2 ValueFlags) { *f |= f2 } -func (f ValueFlags) IsVerbatim() bool { return f&stringNonVerbatim == 0 } -func (f ValueFlags) IsCanonical() bool { return f&stringNonCanonical == 0 } - -// ConsumeWhitespace consumes leading JSON whitespace per RFC 7159, section 2. -func ConsumeWhitespace(b []byte) (n int) { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - for len(b) > n && (b[n] == ' ' || b[n] == '\t' || b[n] == '\r' || b[n] == '\n') { - n++ - } - return n -} - -// ConsumeNull consumes the next JSON null literal per RFC 7159, section 3. -// It returns 0 if it is invalid, in which case consumeLiteral should be used. -func ConsumeNull(b []byte) int { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - const literal = "null" - if len(b) >= len(literal) && string(b[:len(literal)]) == literal { - return len(literal) - } - return 0 -} - -// ConsumeFalse consumes the next JSON false literal per RFC 7159, section 3. -// It returns 0 if it is invalid, in which case consumeLiteral should be used. -func ConsumeFalse(b []byte) int { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - const literal = "false" - if len(b) >= len(literal) && string(b[:len(literal)]) == literal { - return len(literal) - } - return 0 -} - -// ConsumeTrue consumes the next JSON true literal per RFC 7159, section 3. -// It returns 0 if it is invalid, in which case consumeLiteral should be used. -func ConsumeTrue(b []byte) int { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - const literal = "true" - if len(b) >= len(literal) && string(b[:len(literal)]) == literal { - return len(literal) - } - return 0 -} - -// ConsumeLiteral consumes the next JSON literal per RFC 7159, section 3. -// If the input appears truncated, it returns io.ErrUnexpectedEOF. -func ConsumeLiteral(b []byte, lit string) (n int, err error) { - for i := 0; i < len(b) && i < len(lit); i++ { - if b[i] != lit[i] { - return i, NewInvalidCharacterError(b[i:], "in literal "+lit+" (expecting "+strconv.QuoteRune(rune(lit[i]))+")") - } - } - if len(b) < len(lit) { - return len(b), io.ErrUnexpectedEOF - } - return len(lit), nil -} - -// ConsumeSimpleString consumes the next JSON string per RFC 7159, section 7 -// but is limited to the grammar for an ASCII string without escape sequences. -// It returns 0 if it is invalid or more complicated than a simple string, -// in which case consumeString should be called. -// -// It rejects '<', '>', and '&' for compatibility reasons since these were -// always escaped in the v1 implementation. Thus, if this function reports -// non-zero then we know that the string would be encoded the same way -// under both v1 or v2 escape semantics. -func ConsumeSimpleString(b []byte) (n int) { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - if len(b) > 0 && b[0] == '"' { - n++ - for len(b) > n && b[n] < utf8.RuneSelf && escapeASCII[b[n]] == 0 { - n++ - } - if uint(len(b)) > uint(n) && b[n] == '"' { - n++ - return n - } - } - return 0 -} - -// ConsumeString consumes the next JSON string per RFC 7159, section 7. -// If validateUTF8 is false, then this allows the presence of invalid UTF-8 -// characters within the string itself. -// It reports the number of bytes consumed and whether an error was encountered. -// If the input appears truncated, it returns io.ErrUnexpectedEOF. -func ConsumeString(flags *ValueFlags, b []byte, validateUTF8 bool) (n int, err error) { - return ConsumeStringResumable(flags, b, 0, validateUTF8) -} - -// ConsumeStringResumable is identical to consumeString but supports resuming -// from a previous call that returned io.ErrUnexpectedEOF. -func ConsumeStringResumable(flags *ValueFlags, b []byte, resumeOffset int, validateUTF8 bool) (n int, err error) { - // Consume the leading double quote. - switch { - case resumeOffset > 0: - n = resumeOffset // already handled the leading quote - case uint(len(b)) == 0: - return n, io.ErrUnexpectedEOF - case b[0] == '"': - n++ - default: - return n, NewInvalidCharacterError(b[n:], `at start of string (expecting '"')`) - } - - // Consume every character in the string. - for uint(len(b)) > uint(n) { - // Optimize for long sequences of unescaped characters. - noEscape := func(c byte) bool { - return c < utf8.RuneSelf && ' ' <= c && c != '\\' && c != '"' - } - for uint(len(b)) > uint(n) && noEscape(b[n]) { - n++ - } - if uint(len(b)) <= uint(n) { - return n, io.ErrUnexpectedEOF - } - - // Check for terminating double quote. - if b[n] == '"' { - n++ - return n, nil - } - - switch r, rn := utf8.DecodeRune(b[n:]); { - // Handle UTF-8 encoded byte sequence. - // Due to specialized handling of ASCII above, we know that - // all normal sequences at this point must be 2 bytes or larger. - case rn > 1: - n += rn - // Handle escape sequence. - case r == '\\': - flags.Join(stringNonVerbatim) - resumeOffset = n - if uint(len(b)) < uint(n+2) { - return resumeOffset, io.ErrUnexpectedEOF - } - switch r := b[n+1]; r { - case '/': - // Forward slash is the only character with 3 representations. - // Per RFC 8785, section 3.2.2.2., this must not be escaped. - flags.Join(stringNonCanonical) - n += 2 - case '"', '\\', 'b', 'f', 'n', 'r', 't': - n += 2 - case 'u': - if uint(len(b)) < uint(n+6) { - if hasEscapedUTF16Prefix(b[n:], false) { - return resumeOffset, io.ErrUnexpectedEOF - } - flags.Join(stringNonCanonical) - return n, NewInvalidEscapeSequenceError(b[n:]) - } - v1, ok := parseHexUint16(b[n+2 : n+6]) - if !ok { - flags.Join(stringNonCanonical) - return n, NewInvalidEscapeSequenceError(b[n : n+6]) - } - // Only certain control characters can use the \uFFFF notation - // for canonical formatting (per RFC 8785, section 3.2.2.2.). - switch v1 { - // \uFFFF notation not permitted for these characters. - case '\b', '\f', '\n', '\r', '\t': - flags.Join(stringNonCanonical) - default: - // \uFFFF notation only permitted for control characters. - if v1 >= ' ' { - flags.Join(stringNonCanonical) - } else { - // \uFFFF notation must be lower case. - for _, c := range b[n+2 : n+6] { - if 'A' <= c && c <= 'F' { - flags.Join(stringNonCanonical) - } - } - } - } - n += 6 - - r := rune(v1) - if validateUTF8 && utf16.IsSurrogate(r) { - if uint(len(b)) < uint(n+6) { - if hasEscapedUTF16Prefix(b[n:], true) { - return resumeOffset, io.ErrUnexpectedEOF - } - flags.Join(stringNonCanonical) - return n - 6, NewInvalidEscapeSequenceError(b[n-6:]) - } else if v2, ok := parseHexUint16(b[n+2 : n+6]); b[n] != '\\' || b[n+1] != 'u' || !ok { - flags.Join(stringNonCanonical) - return n - 6, NewInvalidEscapeSequenceError(b[n-6 : n+6]) - } else if r = utf16.DecodeRune(rune(v1), rune(v2)); r == utf8.RuneError { - flags.Join(stringNonCanonical) - return n - 6, NewInvalidEscapeSequenceError(b[n-6 : n+6]) - } else { - n += 6 - } - } - default: - flags.Join(stringNonCanonical) - return n, NewInvalidEscapeSequenceError(b[n : n+2]) - } - // Handle invalid UTF-8. - case r == utf8.RuneError: - if !utf8.FullRune(b[n:]) { - return n, io.ErrUnexpectedEOF - } - flags.Join(stringNonVerbatim | stringNonCanonical) - if validateUTF8 { - return n, ErrInvalidUTF8 - } - n++ - // Handle invalid control characters. - case r < ' ': - flags.Join(stringNonVerbatim | stringNonCanonical) - return n, NewInvalidCharacterError(b[n:], "in string (expecting non-control character)") - default: - panic("BUG: unhandled character " + QuoteRune(b[n:])) - } - } - return n, io.ErrUnexpectedEOF -} - -// AppendUnquote appends the unescaped form of a JSON string in src to dst. -// Any invalid UTF-8 within the string will be replaced with utf8.RuneError, -// but the error will be specified as having encountered such an error. -// The input must be an entire JSON string with no surrounding whitespace. -func AppendUnquote[Bytes ~[]byte | ~string](dst []byte, src Bytes) (v []byte, err error) { - dst = slices.Grow(dst, len(src)) - - // Consume the leading double quote. - var i, n int - switch { - case uint(len(src)) == 0: - return dst, io.ErrUnexpectedEOF - case src[0] == '"': - i, n = 1, 1 - default: - return dst, NewInvalidCharacterError(src, `at start of string (expecting '"')`) - } - - // Consume every character in the string. - for uint(len(src)) > uint(n) { - // Optimize for long sequences of unescaped characters. - noEscape := func(c byte) bool { - return c < utf8.RuneSelf && ' ' <= c && c != '\\' && c != '"' - } - for uint(len(src)) > uint(n) && noEscape(src[n]) { - n++ - } - if uint(len(src)) <= uint(n) { - dst = append(dst, src[i:n]...) - return dst, io.ErrUnexpectedEOF - } - - // Check for terminating double quote. - if src[n] == '"' { - dst = append(dst, src[i:n]...) - n++ - if n < len(src) { - err = NewInvalidCharacterError(src[n:], "after string value") - } - return dst, err - } - - switch r, rn := utf8.DecodeRuneInString(string(truncateMaxUTF8(src[n:]))); { - // Handle UTF-8 encoded byte sequence. - // Due to specialized handling of ASCII above, we know that - // all normal sequences at this point must be 2 bytes or larger. - case rn > 1: - n += rn - // Handle escape sequence. - case r == '\\': - dst = append(dst, src[i:n]...) - - // Handle escape sequence. - if uint(len(src)) < uint(n+2) { - return dst, io.ErrUnexpectedEOF - } - switch r := src[n+1]; r { - case '"', '\\', '/': - dst = append(dst, r) - n += 2 - case 'b': - dst = append(dst, '\b') - n += 2 - case 'f': - dst = append(dst, '\f') - n += 2 - case 'n': - dst = append(dst, '\n') - n += 2 - case 'r': - dst = append(dst, '\r') - n += 2 - case 't': - dst = append(dst, '\t') - n += 2 - case 'u': - if uint(len(src)) < uint(n+6) { - if hasEscapedUTF16Prefix(src[n:], false) { - return dst, io.ErrUnexpectedEOF - } - return dst, NewInvalidEscapeSequenceError(src[n:]) - } - v1, ok := parseHexUint16(src[n+2 : n+6]) - if !ok { - return dst, NewInvalidEscapeSequenceError(src[n : n+6]) - } - n += 6 - - // Check whether this is a surrogate half. - r := rune(v1) - if utf16.IsSurrogate(r) { - r = utf8.RuneError // assume failure unless the following succeeds - if uint(len(src)) < uint(n+6) { - if hasEscapedUTF16Prefix(src[n:], true) { - return utf8.AppendRune(dst, r), io.ErrUnexpectedEOF - } - err = NewInvalidEscapeSequenceError(src[n-6:]) - } else if v2, ok := parseHexUint16(src[n+2 : n+6]); src[n] != '\\' || src[n+1] != 'u' || !ok { - err = NewInvalidEscapeSequenceError(src[n-6 : n+6]) - } else if r = utf16.DecodeRune(rune(v1), rune(v2)); r == utf8.RuneError { - err = NewInvalidEscapeSequenceError(src[n-6 : n+6]) - } else { - n += 6 - } - } - - dst = utf8.AppendRune(dst, r) - default: - return dst, NewInvalidEscapeSequenceError(src[n : n+2]) - } - i = n - // Handle invalid UTF-8. - case r == utf8.RuneError: - dst = append(dst, src[i:n]...) - if !utf8.FullRuneInString(string(truncateMaxUTF8(src[n:]))) { - return dst, io.ErrUnexpectedEOF - } - // NOTE: An unescaped string may be longer than the escaped string - // because invalid UTF-8 bytes are being replaced. - dst = append(dst, "\uFFFD"...) - n += rn - i = n - err = ErrInvalidUTF8 - // Handle invalid control characters. - case r < ' ': - dst = append(dst, src[i:n]...) - return dst, NewInvalidCharacterError(src[n:], "in string (expecting non-control character)") - default: - panic("BUG: unhandled character " + QuoteRune(src[n:])) - } - } - dst = append(dst, src[i:n]...) - return dst, io.ErrUnexpectedEOF -} - -// hasEscapedUTF16Prefix reports whether b is possibly -// the truncated prefix of a \uFFFF escape sequence. -func hasEscapedUTF16Prefix[Bytes ~[]byte | ~string](b Bytes, lowerSurrogateHalf bool) bool { - for i := range len(b) { - switch c := b[i]; { - case i == 0 && c != '\\': - return false - case i == 1 && c != 'u': - return false - case i == 2 && lowerSurrogateHalf && c != 'd' && c != 'D': - return false // not within ['\uDC00':'\uDFFF'] - case i == 3 && lowerSurrogateHalf && !('c' <= c && c <= 'f') && !('C' <= c && c <= 'F'): - return false // not within ['\uDC00':'\uDFFF'] - case i >= 2 && i < 6 && !('0' <= c && c <= '9') && !('a' <= c && c <= 'f') && !('A' <= c && c <= 'F'): - return false - } - } - return true -} - -// UnquoteMayCopy returns the unescaped form of b. -// If there are no escaped characters, the output is simply a subslice of -// the input with the surrounding quotes removed. -// Otherwise, a new buffer is allocated for the output. -// It assumes the input is valid. -func UnquoteMayCopy(b []byte, isVerbatim bool) []byte { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - if isVerbatim { - return b[len(`"`) : len(b)-len(`"`)] - } - b, _ = AppendUnquote(nil, b) - return b -} - -// ConsumeSimpleNumber consumes the next JSON number per RFC 7159, section 6 -// but is limited to the grammar for a positive integer. -// It returns 0 if it is invalid or more complicated than a simple integer, -// in which case consumeNumber should be called. -func ConsumeSimpleNumber(b []byte) (n int) { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - if len(b) > 0 { - if b[0] == '0' { - n++ - } else if '1' <= b[0] && b[0] <= '9' { - n++ - for len(b) > n && ('0' <= b[n] && b[n] <= '9') { - n++ - } - } else { - return 0 - } - if uint(len(b)) <= uint(n) || (b[n] != '.' && b[n] != 'e' && b[n] != 'E') { - return n - } - } - return 0 -} - -type ConsumeNumberState uint - -const ( - consumeNumberInit ConsumeNumberState = iota - beforeIntegerDigits - withinIntegerDigits - beforeFractionalDigits - withinFractionalDigits - beforeExponentDigits - withinExponentDigits -) - -// ConsumeNumber consumes the next JSON number per RFC 7159, section 6. -// It reports the number of bytes consumed and whether an error was encountered. -// If the input appears truncated, it returns io.ErrUnexpectedEOF. -// -// Note that JSON numbers are not self-terminating. -// If the entire input is consumed, then the caller needs to consider whether -// there may be subsequent unread data that may still be part of this number. -func ConsumeNumber(b []byte) (n int, err error) { - n, _, err = ConsumeNumberResumable(b, 0, consumeNumberInit) - return n, err -} - -// ConsumeNumberResumable is identical to consumeNumber but supports resuming -// from a previous call that returned io.ErrUnexpectedEOF. -func ConsumeNumberResumable(b []byte, resumeOffset int, state ConsumeNumberState) (n int, _ ConsumeNumberState, err error) { - // Jump to the right state when resuming from a partial consumption. - n = resumeOffset - if state > consumeNumberInit { - switch state { - case withinIntegerDigits, withinFractionalDigits, withinExponentDigits: - // Consume leading digits. - for uint(len(b)) > uint(n) && ('0' <= b[n] && b[n] <= '9') { - n++ - } - if uint(len(b)) <= uint(n) { - return n, state, nil // still within the same state - } - state++ // switches "withinX" to "beforeY" where Y is the state after X - } - switch state { - case beforeIntegerDigits: - goto beforeInteger - case beforeFractionalDigits: - goto beforeFractional - case beforeExponentDigits: - goto beforeExponent - default: - return n, state, nil - } - } - - // Consume required integer component (with optional minus sign). -beforeInteger: - resumeOffset = n - if uint(len(b)) > 0 && b[0] == '-' { - n++ - } - switch { - case uint(len(b)) <= uint(n): - return resumeOffset, beforeIntegerDigits, io.ErrUnexpectedEOF - case b[n] == '0': - n++ - state = beforeFractionalDigits - case '1' <= b[n] && b[n] <= '9': - n++ - for uint(len(b)) > uint(n) && ('0' <= b[n] && b[n] <= '9') { - n++ - } - state = withinIntegerDigits - default: - return n, state, NewInvalidCharacterError(b[n:], "in number (expecting digit)") - } - - // Consume optional fractional component. -beforeFractional: - if uint(len(b)) > uint(n) && b[n] == '.' { - resumeOffset = n - n++ - switch { - case uint(len(b)) <= uint(n): - return resumeOffset, beforeFractionalDigits, io.ErrUnexpectedEOF - case '0' <= b[n] && b[n] <= '9': - n++ - default: - return n, state, NewInvalidCharacterError(b[n:], "in number (expecting digit)") - } - for uint(len(b)) > uint(n) && ('0' <= b[n] && b[n] <= '9') { - n++ - } - state = withinFractionalDigits - } - - // Consume optional exponent component. -beforeExponent: - if uint(len(b)) > uint(n) && (b[n] == 'e' || b[n] == 'E') { - resumeOffset = n - n++ - if uint(len(b)) > uint(n) && (b[n] == '-' || b[n] == '+') { - n++ - } - switch { - case uint(len(b)) <= uint(n): - return resumeOffset, beforeExponentDigits, io.ErrUnexpectedEOF - case '0' <= b[n] && b[n] <= '9': - n++ - default: - return n, state, NewInvalidCharacterError(b[n:], "in number (expecting digit)") - } - for uint(len(b)) > uint(n) && ('0' <= b[n] && b[n] <= '9') { - n++ - } - state = withinExponentDigits - } - - return n, state, nil -} - -// parseHexUint16 is similar to strconv.ParseUint, -// but operates directly on []byte and is optimized for base-16. -// See https://go.dev/issue/42429. -func parseHexUint16[Bytes ~[]byte | ~string](b Bytes) (v uint16, ok bool) { - if len(b) != 4 { - return 0, false - } - for i := range 4 { - c := b[i] - switch { - case '0' <= c && c <= '9': - c = c - '0' - case 'a' <= c && c <= 'f': - c = 10 + c - 'a' - case 'A' <= c && c <= 'F': - c = 10 + c - 'A' - default: - return 0, false - } - v = v*16 + uint16(c) - } - return v, true -} - -// ParseUint parses b as a decimal unsigned integer according to -// a strict subset of the JSON number grammar, returning the value if valid. -// It returns (0, false) if there is a syntax error and -// returns (math.MaxUint64, false) if there is an overflow. -func ParseUint(b []byte) (v uint64, ok bool) { - const unsafeWidth = 20 // len(fmt.Sprint(uint64(math.MaxUint64))) - var n int - for ; len(b) > n && ('0' <= b[n] && b[n] <= '9'); n++ { - v = 10*v + uint64(b[n]-'0') - } - switch { - case n == 0 || len(b) != n || (b[0] == '0' && string(b) != "0"): - return 0, false - case n >= unsafeWidth && (b[0] != '1' || v < 1e19 || n > unsafeWidth): - return math.MaxUint64, false - } - return v, true -} - -// ParseFloat parses a floating point number according to the Go float grammar. -// Note that the JSON number grammar is a strict subset. -// -// If the number overflows the finite representation of a float, -// then we return MaxFloat since any finite value will always be infinitely -// more accurate at representing another finite value than an infinite value. -func ParseFloat(b []byte, bits int) (v float64, ok bool) { - fv, err := strconv.ParseFloat(string(b), bits) - if math.IsInf(fv, 0) { - switch { - case bits == 32 && math.IsInf(fv, +1): - fv = +math.MaxFloat32 - case bits == 64 && math.IsInf(fv, +1): - fv = +math.MaxFloat64 - case bits == 32 && math.IsInf(fv, -1): - fv = -math.MaxFloat32 - case bits == 64 && math.IsInf(fv, -1): - fv = -math.MaxFloat64 - } - } - return fv, err == nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/encode.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/encode.go deleted file mode 100644 index 35b238a2e..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/encode.go +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsonwire - -import ( - "math" - "slices" - "strconv" - "unicode/utf16" - "unicode/utf8" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" -) - -// escapeASCII reports whether the ASCII character needs to be escaped. -// It conservatively assumes EscapeForHTML. -var escapeASCII = [...]uint8{ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // escape control characters - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // escape control characters - 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // escape '"' and '&' - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, // escape '<' and '>' - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, // escape '\\' - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -} - -// NeedEscape reports whether src needs escaping of any characters. -// It conservatively assumes EscapeForHTML and EscapeForJS. -// It reports true for inputs with invalid UTF-8. -func NeedEscape[Bytes ~[]byte | ~string](src Bytes) bool { - var i int - for uint(len(src)) > uint(i) { - if c := src[i]; c < utf8.RuneSelf { - if escapeASCII[c] > 0 { - return true - } - i++ - } else { - r, rn := utf8.DecodeRuneInString(string(truncateMaxUTF8(src[i:]))) - if r == utf8.RuneError || r == '\u2028' || r == '\u2029' { - return true - } - i += rn - } - } - return false -} - -// AppendQuote appends src to dst as a JSON string per RFC 7159, section 7. -// -// It takes in flags and respects the following: -// - EscapeForHTML escapes '<', '>', and '&'. -// - EscapeForJS escapes '\u2028' and '\u2029'. -// - AllowInvalidUTF8 avoids reporting an error for invalid UTF-8. -// -// Regardless of whether AllowInvalidUTF8 is specified, -// invalid bytes are replaced with the Unicode replacement character ('\ufffd'). -// If no escape flags are set, then the shortest representable form is used, -// which is also the canonical form for strings (RFC 8785, section 3.2.2.2). -func AppendQuote[Bytes ~[]byte | ~string](dst []byte, src Bytes, flags *jsonflags.Flags) ([]byte, error) { - var i, n int - var hasInvalidUTF8 bool - dst = slices.Grow(dst, len(`"`)+len(src)+len(`"`)) - dst = append(dst, '"') - for uint(len(src)) > uint(n) { - if c := src[n]; c < utf8.RuneSelf { - // Handle single-byte ASCII. - n++ - if escapeASCII[c] == 0 { - continue // no escaping possibly needed - } - // Handle escaping of single-byte ASCII. - if !(c == '<' || c == '>' || c == '&') || flags.Get(jsonflags.EscapeForHTML) { - dst = append(dst, src[i:n-1]...) - dst = appendEscapedASCII(dst, c) - i = n - } - } else { - // Handle multi-byte Unicode. - r, rn := utf8.DecodeRuneInString(string(truncateMaxUTF8(src[n:]))) - n += rn - if r != utf8.RuneError && r != '\u2028' && r != '\u2029' { - continue // no escaping possibly needed - } - // Handle escaping of multi-byte Unicode. - switch { - case isInvalidUTF8(r, rn): - hasInvalidUTF8 = true - dst = append(dst, src[i:n-rn]...) - dst = append(dst, "\ufffd"...) - i = n - case (r == '\u2028' || r == '\u2029') && flags.Get(jsonflags.EscapeForJS): - dst = append(dst, src[i:n-rn]...) - dst = appendEscapedUnicode(dst, r) - i = n - } - } - } - dst = append(dst, src[i:n]...) - dst = append(dst, '"') - if hasInvalidUTF8 && !flags.Get(jsonflags.AllowInvalidUTF8) { - return dst, ErrInvalidUTF8 - } - return dst, nil -} - -func appendEscapedASCII(dst []byte, c byte) []byte { - switch c { - case '"', '\\': - dst = append(dst, '\\', c) - case '\b': - dst = append(dst, "\\b"...) - case '\f': - dst = append(dst, "\\f"...) - case '\n': - dst = append(dst, "\\n"...) - case '\r': - dst = append(dst, "\\r"...) - case '\t': - dst = append(dst, "\\t"...) - default: - dst = appendEscapedUTF16(dst, uint16(c)) - } - return dst -} - -func appendEscapedUnicode(dst []byte, r rune) []byte { - if r1, r2 := utf16.EncodeRune(r); r1 != '\ufffd' && r2 != '\ufffd' { - dst = appendEscapedUTF16(dst, uint16(r1)) - dst = appendEscapedUTF16(dst, uint16(r2)) - } else { - dst = appendEscapedUTF16(dst, uint16(r)) - } - return dst -} - -func appendEscapedUTF16(dst []byte, x uint16) []byte { - const hex = "0123456789abcdef" - return append(dst, '\\', 'u', hex[(x>>12)&0xf], hex[(x>>8)&0xf], hex[(x>>4)&0xf], hex[(x>>0)&0xf]) -} - -// ReformatString consumes a JSON string from src and appends it to dst, -// reformatting it if necessary according to the specified flags. -// It returns the appended output and the number of consumed input bytes. -func ReformatString(dst, src []byte, flags *jsonflags.Flags) ([]byte, int, error) { - // TODO: Should this update ValueFlags as input? - var valFlags ValueFlags - n, err := ConsumeString(&valFlags, src, !flags.Get(jsonflags.AllowInvalidUTF8)) - if err != nil { - return dst, n, err - } - - // If the output requires no special escapes, and the input - // is already in canonical form or should be preserved verbatim, - // then directly copy the input to the output. - if !flags.Get(jsonflags.AnyEscape) && - (valFlags.IsCanonical() || flags.Get(jsonflags.PreserveRawStrings)) { - dst = append(dst, src[:n]...) // copy the string verbatim - return dst, n, nil - } - - // Under [jsonflags.PreserveRawStrings], any pre-escaped sequences - // remain escaped, however we still need to respect the - // [jsonflags.EscapeForHTML] and [jsonflags.EscapeForJS] options. - if flags.Get(jsonflags.PreserveRawStrings) { - var i, lastAppendIndex int - for i < n { - if c := src[i]; c < utf8.RuneSelf { - if (c == '<' || c == '>' || c == '&') && flags.Get(jsonflags.EscapeForHTML) { - dst = append(dst, src[lastAppendIndex:i]...) - dst = appendEscapedASCII(dst, c) - lastAppendIndex = i + 1 - } - i++ - } else { - r, rn := utf8.DecodeRune(truncateMaxUTF8(src[i:])) - if (r == '\u2028' || r == '\u2029') && flags.Get(jsonflags.EscapeForJS) { - dst = append(dst, src[lastAppendIndex:i]...) - dst = appendEscapedUnicode(dst, r) - lastAppendIndex = i + rn - } - i += rn - } - } - return append(dst, src[lastAppendIndex:n]...), n, nil - } - - // The input contains characters that might need escaping, - // unnecessary escape sequences, or invalid UTF-8. - // Perform a round-trip unquote and quote to properly reformat - // these sequences according the current flags. - b, _ := AppendUnquote(nil, src[:n]) - dst, _ = AppendQuote(dst, b, flags) - return dst, n, nil -} - -// AppendFloat appends src to dst as a JSON number per RFC 7159, section 6. -// It formats numbers similar to the ES6 number-to-string conversion. -// See https://go.dev/issue/14135. -// -// The output is identical to ECMA-262, 6th edition, section 7.1.12.1 and with -// RFC 8785, section 3.2.2.3 for 64-bit floating-point numbers except for -0, -// which is formatted as -0 instead of just 0. -// -// For 32-bit floating-point numbers, -// the output is a 32-bit equivalent of the algorithm. -// Note that ECMA-262 specifies no algorithm for 32-bit numbers. -func AppendFloat(dst []byte, src float64, bits int) []byte { - if bits == 32 { - src = float64(float32(src)) - } - - abs := math.Abs(src) - fmt := byte('f') - if abs != 0 { - if bits == 64 && (float64(abs) < 1e-6 || float64(abs) >= 1e21) || - bits == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) { - fmt = 'e' - } - } - dst = strconv.AppendFloat(dst, src, fmt, -1, bits) - if fmt == 'e' { - // Clean up e-09 to e-9. - n := len(dst) - if n >= 4 && dst[n-4] == 'e' && dst[n-3] == '-' && dst[n-2] == '0' { - dst[n-2] = dst[n-1] - dst = dst[:n-1] - } - } - return dst -} - -// ReformatNumber consumes a JSON string from src and appends it to dst, -// canonicalizing it if specified. -// It returns the appended output and the number of consumed input bytes. -func ReformatNumber(dst, src []byte, flags *jsonflags.Flags) ([]byte, int, error) { - n, err := ConsumeNumber(src) - if err != nil { - return dst, n, err - } - if !flags.Get(jsonflags.CanonicalizeNumbers) { - dst = append(dst, src[:n]...) // copy the number verbatim - return dst, n, nil - } - - // Identify the kind of number. - var isFloat bool - for _, c := range src[:n] { - if c == '.' || c == 'e' || c == 'E' { - isFloat = true // has fraction or exponent - break - } - } - - // Check if need to canonicalize this kind of number. - switch { - case string(src[:n]) == "-0": - break // canonicalize -0 as 0 regardless of kind - case isFloat: - if !flags.Get(jsonflags.CanonicalizeRawFloats) { - dst = append(dst, src[:n]...) // copy the number verbatim - return dst, n, nil - } - default: - // As an optimization, we can copy integer numbers below 2⁵³ verbatim - // since the canonical form is always identical. - const maxExactIntegerDigits = 16 // len(strconv.AppendUint(nil, 1<<53, 10)) - if !flags.Get(jsonflags.CanonicalizeRawInts) || n < maxExactIntegerDigits { - dst = append(dst, src[:n]...) // copy the number verbatim - return dst, n, nil - } - } - - // Parse and reformat the number (which uses a canonical format). - fv, _ := strconv.ParseFloat(string(src[:n]), 64) - switch { - case fv == 0: - fv = 0 // normalize negative zero as just zero - case math.IsInf(fv, +1): - fv = +math.MaxFloat64 - case math.IsInf(fv, -1): - fv = -math.MaxFloat64 - } - return AppendFloat(dst, fv, 64), n, nil -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/wire.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/wire.go deleted file mode 100644 index 1831a66bd..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire/wire.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package jsonwire implements stateless functionality for handling JSON text. -package jsonwire - -import ( - "cmp" - "errors" - "strconv" - "strings" - "unicode" - "unicode/utf16" - "unicode/utf8" -) - -// TrimSuffixWhitespace trims JSON from the end of b. -func TrimSuffixWhitespace(b []byte) []byte { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - n := len(b) - 1 - for n >= 0 && (b[n] == ' ' || b[n] == '\t' || b[n] == '\r' || b[n] == '\n') { - n-- - } - return b[:n+1] -} - -// TrimSuffixString trims a valid JSON string at the end of b. -// The behavior is undefined if there is not a valid JSON string present. -func TrimSuffixString(b []byte) []byte { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - if len(b) > 0 && b[len(b)-1] == '"' { - b = b[:len(b)-1] - } - for len(b) >= 2 && !(b[len(b)-1] == '"' && b[len(b)-2] != '\\') { - b = b[:len(b)-1] // trim all characters except an unescaped quote - } - if len(b) > 0 && b[len(b)-1] == '"' { - b = b[:len(b)-1] - } - return b -} - -// HasSuffixByte reports whether b ends with c. -func HasSuffixByte(b []byte, c byte) bool { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - return len(b) > 0 && b[len(b)-1] == c -} - -// TrimSuffixByte removes c from the end of b if it is present. -func TrimSuffixByte(b []byte, c byte) []byte { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - if len(b) > 0 && b[len(b)-1] == c { - return b[:len(b)-1] - } - return b -} - -// QuoteRune quotes the first rune in the input. -func QuoteRune[Bytes ~[]byte | ~string](b Bytes) string { - r, n := utf8.DecodeRuneInString(string(truncateMaxUTF8(b))) - if r == utf8.RuneError && n == 1 { - return `'\x` + strconv.FormatUint(uint64(b[0]), 16) + `'` - } - return strconv.QuoteRune(r) -} - -// CompareUTF16 lexicographically compares x to y according -// to the UTF-16 codepoints of the UTF-8 encoded input strings. -// This implements the ordering specified in RFC 8785, section 3.2.3. -func CompareUTF16[Bytes ~[]byte | ~string](x, y Bytes) int { - // NOTE: This is an optimized, mostly allocation-free implementation - // of CompareUTF16Simple in wire_test.go. FuzzCompareUTF16 verifies that the - // two implementations agree on the result of comparing any two strings. - isUTF16Self := func(r rune) bool { - return ('\u0000' <= r && r <= '\uD7FF') || ('\uE000' <= r && r <= '\uFFFF') - } - - for { - if len(x) == 0 || len(y) == 0 { - return cmp.Compare(len(x), len(y)) - } - - // ASCII fast-path. - if x[0] < utf8.RuneSelf || y[0] < utf8.RuneSelf { - if x[0] != y[0] { - return cmp.Compare(x[0], y[0]) - } - x, y = x[1:], y[1:] - continue - } - - // Decode next pair of runes as UTF-8. - rx, nx := utf8.DecodeRuneInString(string(truncateMaxUTF8(x))) - ry, ny := utf8.DecodeRuneInString(string(truncateMaxUTF8(y))) - - selfx := isUTF16Self(rx) - selfy := isUTF16Self(ry) - switch { - // The x rune is a single UTF-16 codepoint, while - // the y rune is a surrogate pair of UTF-16 codepoints. - case selfx && !selfy: - ry, _ = utf16.EncodeRune(ry) - // The y rune is a single UTF-16 codepoint, while - // the x rune is a surrogate pair of UTF-16 codepoints. - case selfy && !selfx: - rx, _ = utf16.EncodeRune(rx) - } - if rx != ry { - return cmp.Compare(rx, ry) - } - - // Check for invalid UTF-8, in which case, - // we just perform a byte-for-byte comparison. - if isInvalidUTF8(rx, nx) || isInvalidUTF8(ry, ny) { - if x[0] != y[0] { - return cmp.Compare(x[0], y[0]) - } - } - x, y = x[nx:], y[ny:] - } -} - -// truncateMaxUTF8 truncates b such it contains at least one rune. -// -// The utf8 package currently lacks generic variants, which complicates -// generic functions that operates on either []byte or string. -// As a hack, we always call the utf8 function operating on strings, -// but always truncate the input such that the result is identical. -// -// Example usage: -// -// utf8.DecodeRuneInString(string(truncateMaxUTF8(b))) -// -// Converting a []byte to a string is stack allocated since -// truncateMaxUTF8 guarantees that the []byte is short. -func truncateMaxUTF8[Bytes ~[]byte | ~string](b Bytes) Bytes { - // TODO(https://go.dev/issue/56948): Remove this function and - // instead directly call generic utf8 functions wherever used. - if len(b) > utf8.UTFMax { - return b[:utf8.UTFMax] - } - return b -} - -// TODO(https://go.dev/issue/70547): Use utf8.ErrInvalid instead. -var ErrInvalidUTF8 = errors.New("invalid UTF-8") - -func NewInvalidCharacterError[Bytes ~[]byte | ~string](prefix Bytes, where string) error { - what := QuoteRune(prefix) - return errors.New("invalid character " + what + " " + where) -} - -func NewInvalidEscapeSequenceError[Bytes ~[]byte | ~string](what Bytes) error { - label := "escape sequence" - if len(what) > 6 { - label = "surrogate pair" - } - needEscape := strings.IndexFunc(string(what), func(r rune) bool { - return r == '`' || r == utf8.RuneError || unicode.IsSpace(r) || !unicode.IsPrint(r) - }) >= 0 - if needEscape { - return errors.New("invalid " + label + " " + strconv.Quote(string(what)) + " in string") - } else { - return errors.New("invalid " + label + " `" + string(what) + "` in string") - } -} - -// TruncatePointer optionally truncates the JSON pointer, -// enforcing that the length roughly does not exceed n. -func TruncatePointer(s string, n int) string { - if len(s) <= n { - return s - } - i := n / 2 - j := len(s) - n/2 - - // Avoid truncating a name if there are multiple names present. - if k := strings.LastIndexByte(s[:i], '/'); k > 0 { - i = k - } - if k := strings.IndexByte(s[j:], '/'); k >= 0 { - j += k + len("/") - } - - // Avoid truncation in the middle of a UTF-8 rune. - for i > 0 && isInvalidUTF8(utf8.DecodeLastRuneInString(s[:i])) { - i-- - } - for j < len(s) && isInvalidUTF8(utf8.DecodeRuneInString(s[j:])) { - j++ - } - - // Determine the right middle fragment to use. - var middle string - switch strings.Count(s[i:j], "/") { - case 0: - middle = "…" - case 1: - middle = "…/…" - default: - middle = "…/…/…" - } - if strings.HasPrefix(s[i:j], "/") && middle != "…" { - middle = strings.TrimPrefix(middle, "…") - } - if strings.HasSuffix(s[i:j], "/") && middle != "…" { - middle = strings.TrimSuffix(middle, "…") - } - return s[:i] + middle + s[j:] -} - -func isInvalidUTF8(r rune, rn int) bool { - return r == utf8.RuneError && rn == 1 -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/decode.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/decode.go deleted file mode 100644 index 96fd5c27c..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/decode.go +++ /dev/null @@ -1,1177 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "bytes" - "errors" - "io" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// NOTE: The logic for decoding is complicated by the fact that reading from -// an io.Reader into a temporary buffer means that the buffer may contain a -// truncated portion of some valid input, requiring the need to fetch more data. -// -// This file is structured in the following way: -// -// - consumeXXX functions parse an exact JSON token from a []byte. -// If the buffer appears truncated, then it returns io.ErrUnexpectedEOF. -// The consumeSimpleXXX functions are so named because they only handle -// a subset of the grammar for the JSON token being parsed. -// They do not handle the full grammar to keep these functions inlinable. -// -// - Decoder.consumeXXX methods parse the next JSON token from Decoder.buf, -// automatically fetching more input if necessary. These methods take -// a position relative to the start of Decoder.buf as an argument and -// return the end of the consumed JSON token as a position, -// also relative to the start of Decoder.buf. -// -// - In the event of an I/O errors or state machine violations, -// the implementation avoids mutating the state of Decoder -// (aside from the book-keeping needed to implement Decoder.fetch). -// For this reason, only Decoder.ReadToken and Decoder.ReadValue are -// responsible for updated Decoder.prevStart and Decoder.prevEnd. -// -// - For performance, much of the implementation uses the pattern of calling -// the inlinable consumeXXX functions first, and if more work is necessary, -// then it calls the slower Decoder.consumeXXX methods. -// TODO: Revisit this pattern if the Go compiler provides finer control -// over exactly which calls are inlined or not. - -// Decoder is a streaming decoder for raw JSON tokens and values. -// It is used to read a stream of top-level JSON values, -// each separated by optional whitespace characters. -// -// [Decoder.ReadToken] and [Decoder.ReadValue] calls may be interleaved. -// For example, the following JSON value: -// -// {"name":"value","array":[null,false,true,3.14159],"object":{"k":"v"}} -// -// can be parsed with the following calls (ignoring errors for brevity): -// -// d.ReadToken() // { -// d.ReadToken() // "name" -// d.ReadToken() // "value" -// d.ReadValue() // "array" -// d.ReadToken() // [ -// d.ReadToken() // null -// d.ReadToken() // false -// d.ReadValue() // true -// d.ReadToken() // 3.14159 -// d.ReadToken() // ] -// d.ReadValue() // "object" -// d.ReadValue() // {"k":"v"} -// d.ReadToken() // } -// -// The above is one of many possible sequence of calls and -// may not represent the most sensible method to call for any given token/value. -// For example, it is probably more common to call [Decoder.ReadToken] to obtain a -// string token for object names. -type Decoder struct { - s decoderState -} - -// decoderState is the low-level state of Decoder. -// It has exported fields and method for use by the "json" package. -type decoderState struct { - state - decodeBuffer - jsonopts.Struct - - StringCache *[256]string // only used when unmarshaling; identical to json.stringCache -} - -// decodeBuffer is a buffer split into 4 segments: -// -// - buf[0:prevEnd] // already read portion of the buffer -// - buf[prevStart:prevEnd] // previously read value -// - buf[prevEnd:len(buf)] // unread portion of the buffer -// - buf[len(buf):cap(buf)] // unused portion of the buffer -// -// Invariants: -// -// 0 ≤ prevStart ≤ prevEnd ≤ len(buf) ≤ cap(buf) -type decodeBuffer struct { - peekPos int // non-zero if valid offset into buf for start of next token - peekErr error // implies peekPos is -1 - - buf []byte // may alias rd if it is a bytes.Buffer - prevStart int - prevEnd int - - // baseOffset is added to prevStart and prevEnd to obtain - // the absolute offset relative to the start of io.Reader stream. - baseOffset int64 - - rd io.Reader -} - -// NewDecoder constructs a new streaming decoder reading from r. -// -// If r is a [bytes.Buffer], then the decoder parses directly from the buffer -// without first copying the contents to an intermediate buffer. -// Additional writes to the buffer must not occur while the decoder is in use. -func NewDecoder(r io.Reader, opts ...Options) *Decoder { - d := new(Decoder) - d.Reset(r, opts...) - return d -} - -// Reset resets a decoder such that it is reading afresh from r and -// configured with the provided options. Reset must not be called on an -// a Decoder passed to the [encoding/json/v2.UnmarshalerFrom.UnmarshalJSONFrom] method -// or the [encoding/json/v2.UnmarshalFromFunc] function. -func (d *Decoder) Reset(r io.Reader, opts ...Options) { - switch { - case d == nil: - panic("jsontext: invalid nil Decoder") - case r == nil: - panic("jsontext: invalid nil io.Reader") - case d.s.Flags.Get(jsonflags.WithinArshalCall): - panic("jsontext: cannot reset Decoder passed to json.UnmarshalerFrom") - } - // Reuse the buffer if it does not alias a previous [bytes.Buffer]. - b := d.s.buf[:0] - if _, ok := d.s.rd.(*bytes.Buffer); ok { - b = nil - } - d.s.reset(b, r, opts...) -} - -func (d *decoderState) reset(b []byte, r io.Reader, opts ...Options) { - d.state.reset() - d.decodeBuffer = decodeBuffer{buf: b, rd: r} - opts2 := jsonopts.Struct{} // avoid mutating d.Struct in case it is part of opts - opts2.Join(opts...) - d.Struct = opts2 -} - -// Options returns the options used to construct the encoder and -// may additionally contain semantic options passed to a -// [encoding/json/v2.UnmarshalDecode] call. -// -// If operating within -// a [encoding/json/v2.UnmarshalerFrom.UnmarshalJSONFrom] method call or -// a [encoding/json/v2.UnmarshalFromFunc] function call, -// then the returned options are only valid within the call. -func (d *Decoder) Options() Options { - return &d.s.Struct -} - -var errBufferWriteAfterNext = errors.New("invalid bytes.Buffer.Write call after calling bytes.Buffer.Next") - -// fetch reads at least 1 byte from the underlying io.Reader. -// It returns io.ErrUnexpectedEOF if zero bytes were read and io.EOF was seen. -func (d *decoderState) fetch() error { - if d.rd == nil { - return io.ErrUnexpectedEOF - } - - // Inform objectNameStack that we are about to fetch new buffer content. - d.Names.copyQuotedBuffer(d.buf) - - // Specialize bytes.Buffer for better performance. - if bb, ok := d.rd.(*bytes.Buffer); ok { - switch { - case bb.Len() == 0: - return io.ErrUnexpectedEOF - case len(d.buf) == 0: - d.buf = bb.Next(bb.Len()) // "read" all data in the buffer - return nil - default: - // This only occurs if a partially filled bytes.Buffer was provided - // and more data is written to it while Decoder is reading from it. - // This practice will lead to data corruption since future writes - // may overwrite the contents of the current buffer. - // - // The user is trying to use a bytes.Buffer as a pipe, - // but a bytes.Buffer is poor implementation of a pipe, - // the purpose-built io.Pipe should be used instead. - return &ioError{action: "read", err: errBufferWriteAfterNext} - } - } - - // Allocate initial buffer if empty. - if cap(d.buf) == 0 { - d.buf = make([]byte, 0, 64) - } - - // Check whether to grow the buffer. - const maxBufferSize = 4 << 10 - const growthSizeFactor = 2 // higher value is faster - const growthRateFactor = 2 // higher value is slower - // By default, grow if below the maximum buffer size. - grow := cap(d.buf) <= maxBufferSize/growthSizeFactor - // Growing can be expensive, so only grow - // if a sufficient number of bytes have been processed. - grow = grow && int64(cap(d.buf)) < d.previousOffsetEnd()/growthRateFactor - // If prevStart==0, then fetch was called in order to fetch more data - // to finish consuming a large JSON value contiguously. - // Grow if less than 25% of the remaining capacity is available. - // Note that this may cause the input buffer to exceed maxBufferSize. - grow = grow || (d.prevStart == 0 && len(d.buf) >= 3*cap(d.buf)/4) - - if grow { - // Allocate a new buffer and copy the contents of the old buffer over. - // TODO: Provide a hard limit on the maximum internal buffer size? - buf := make([]byte, 0, cap(d.buf)*growthSizeFactor) - d.buf = append(buf, d.buf[d.prevStart:]...) - } else { - // Move unread portion of the data to the front. - n := copy(d.buf[:cap(d.buf)], d.buf[d.prevStart:]) - d.buf = d.buf[:n] - } - d.baseOffset += int64(d.prevStart) - d.prevEnd -= d.prevStart - d.prevStart = 0 - - // Read more data into the internal buffer. - for { - n, err := d.rd.Read(d.buf[len(d.buf):cap(d.buf)]) - switch { - case n > 0: - d.buf = d.buf[:len(d.buf)+n] - return nil // ignore errors if any bytes are read - case err == io.EOF: - return io.ErrUnexpectedEOF - case err != nil: - return &ioError{action: "read", err: err} - default: - continue // Read returned (0, nil) - } - } -} - -const invalidateBufferByte = '#' // invalid starting character for JSON grammar - -// invalidatePreviousRead invalidates buffers returned by Peek and Read calls -// so that the first byte is an invalid character. -// This Hyrum-proofs the API against faulty application code that assumes -// values returned by ReadValue remain valid past subsequent Read calls. -func (d *decodeBuffer) invalidatePreviousRead() { - // Avoid mutating the buffer if d.rd is nil which implies that d.buf - // is provided by the user code and may not expect mutations. - isBytesBuffer := func(r io.Reader) bool { - _, ok := r.(*bytes.Buffer) - return ok - } - if d.rd != nil && !isBytesBuffer(d.rd) && d.prevStart < d.prevEnd && uint(d.prevStart) < uint(len(d.buf)) { - d.buf[d.prevStart] = invalidateBufferByte - d.prevStart = d.prevEnd - } -} - -// needMore reports whether there are no more unread bytes. -func (d *decodeBuffer) needMore(pos int) bool { - // NOTE: The arguments and logic are kept simple to keep this inlinable. - return pos == len(d.buf) -} - -func (d *decodeBuffer) offsetAt(pos int) int64 { return d.baseOffset + int64(pos) } -func (d *decodeBuffer) previousOffsetStart() int64 { return d.baseOffset + int64(d.prevStart) } -func (d *decodeBuffer) previousOffsetEnd() int64 { return d.baseOffset + int64(d.prevEnd) } -func (d *decodeBuffer) previousBuffer() []byte { return d.buf[d.prevStart:d.prevEnd] } -func (d *decodeBuffer) unreadBuffer() []byte { return d.buf[d.prevEnd:len(d.buf)] } - -// PreviousTokenOrValue returns the previously read token or value -// unless it has been invalidated by a call to PeekKind. -// If a token is just a delimiter, then this returns a 1-byte buffer. -// This method is used for error reporting at the semantic layer. -func (d *decodeBuffer) PreviousTokenOrValue() []byte { - b := d.previousBuffer() - // If peek was called, then the previous token or buffer is invalidated. - if d.peekPos > 0 || len(b) > 0 && b[0] == invalidateBufferByte { - return nil - } - // ReadToken does not preserve the buffer for null, bools, or delimiters. - // Manually re-construct that buffer. - if len(b) == 0 { - b = d.buf[:d.prevEnd] // entirety of the previous buffer - for _, tok := range []string{"null", "false", "true", "{", "}", "[", "]"} { - if len(b) >= len(tok) && string(b[len(b)-len(tok):]) == tok { - return b[len(b)-len(tok):] - } - } - } - return b -} - -// PeekKind retrieves the next token kind, but does not advance the read offset. -// -// It returns 0 if an error occurs. Any such error is cached until -// the next read call and it is the caller's responsibility to eventually -// follow up a PeekKind call with a read call. -func (d *Decoder) PeekKind() Kind { - return d.s.PeekKind() -} -func (d *decoderState) PeekKind() Kind { - // Check whether we have a cached peek result. - if d.peekPos > 0 { - return Kind(d.buf[d.peekPos]).normalize() - } - - var err error - d.invalidatePreviousRead() - pos := d.prevEnd - - // Consume leading whitespace. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - if err == io.ErrUnexpectedEOF && d.Tokens.Depth() == 1 { - err = io.EOF // EOF possibly if no Tokens present after top-level value - } - d.peekPos, d.peekErr = -1, wrapSyntacticError(d, err, pos, 0) - return invalidKind - } - } - - // Consume colon or comma. - var delim byte - if c := d.buf[pos]; c == ':' || c == ',' { - delim = c - pos += 1 - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - err = wrapSyntacticError(d, err, pos, 0) - d.peekPos, d.peekErr = -1, d.checkDelimBeforeIOError(delim, err) - return invalidKind - } - } - } - next := Kind(d.buf[pos]).normalize() - if d.Tokens.needDelim(next) != delim { - d.peekPos, d.peekErr = -1, d.checkDelim(delim, next) - return invalidKind - } - - // This may set peekPos to zero, which is indistinguishable from - // the uninitialized state. While a small hit to performance, it is correct - // since ReadValue and ReadToken will disregard the cached result and - // recompute the next kind. - d.peekPos, d.peekErr = pos, nil - return next -} - -// checkDelimBeforeIOError checks whether the delim is even valid -// before returning an IO error, which occurs after the delim. -func (d *decoderState) checkDelimBeforeIOError(delim byte, err error) error { - // Since an IO error occurred, we do not know what the next kind is. - // However, knowing the next kind is necessary to validate - // whether the current delim is at least potentially valid. - // Since a JSON string is always valid as the next token, - // conservatively assume that is the next kind for validation. - const next = Kind('"') - if d.Tokens.needDelim(next) != delim { - err = d.checkDelim(delim, next) - } - return err -} - -// CountNextDelimWhitespace counts the number of upcoming bytes of -// delimiter or whitespace characters. -// This method is used for error reporting at the semantic layer. -func (d *decoderState) CountNextDelimWhitespace() int { - d.PeekKind() // populate unreadBuffer - return len(d.unreadBuffer()) - len(bytes.TrimLeft(d.unreadBuffer(), ",: \n\r\t")) -} - -// checkDelim checks whether delim is valid for the given next kind. -func (d *decoderState) checkDelim(delim byte, next Kind) error { - where := "at start of value" - switch d.Tokens.needDelim(next) { - case delim: - return nil - case ':': - where = "after object name (expecting ':')" - case ',': - if d.Tokens.Last.isObject() { - where = "after object value (expecting ',' or '}')" - } else { - where = "after array element (expecting ',' or ']')" - } - } - pos := d.prevEnd // restore position to right after leading whitespace - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - err := jsonwire.NewInvalidCharacterError(d.buf[pos:], where) - return wrapSyntacticError(d, err, pos, 0) -} - -// SkipValue is semantically equivalent to calling [Decoder.ReadValue] and discarding -// the result except that memory is not wasted trying to hold the entire result. -func (d *Decoder) SkipValue() error { - return d.s.SkipValue() -} -func (d *decoderState) SkipValue() error { - switch d.PeekKind() { - case '{', '[': - // For JSON objects and arrays, keep skipping all tokens - // until the depth matches the starting depth. - depth := d.Tokens.Depth() - for { - if _, err := d.ReadToken(); err != nil { - return err - } - if depth >= d.Tokens.Depth() { - return nil - } - } - default: - // Trying to skip a value when the next token is a '}' or ']' - // will result in an error being returned here. - var flags jsonwire.ValueFlags - if _, err := d.ReadValue(&flags); err != nil { - return err - } - return nil - } -} - -// SkipValueRemainder skips the remainder of a value -// after reading a '{' or '[' token. -func (d *decoderState) SkipValueRemainder() error { - if d.Tokens.Depth()-1 > 0 && d.Tokens.Last.Length() == 0 { - for n := d.Tokens.Depth(); d.Tokens.Depth() >= n; { - if _, err := d.ReadToken(); err != nil { - return err - } - } - } - return nil -} - -// SkipUntil skips all tokens until the state machine -// is at or past the specified depth and length. -func (d *decoderState) SkipUntil(depth int, length int64) error { - for d.Tokens.Depth() > depth || (d.Tokens.Depth() == depth && d.Tokens.Last.Length() < length) { - if _, err := d.ReadToken(); err != nil { - return err - } - } - return nil -} - -// ReadToken reads the next [Token], advancing the read offset. -// The returned token is only valid until the next Peek, Read, or Skip call. -// It returns [io.EOF] if there are no more tokens. -func (d *Decoder) ReadToken() (Token, error) { - return d.s.ReadToken() -} -func (d *decoderState) ReadToken() (Token, error) { - // Determine the next kind. - var err error - var next Kind - pos := d.peekPos - if pos != 0 { - // Use cached peek result. - if d.peekErr != nil { - err := d.peekErr - d.peekPos, d.peekErr = 0, nil // possibly a transient I/O error - return Token{}, err - } - next = Kind(d.buf[pos]).normalize() - d.peekPos = 0 // reset cache - } else { - d.invalidatePreviousRead() - pos = d.prevEnd - - // Consume leading whitespace. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - if err == io.ErrUnexpectedEOF && d.Tokens.Depth() == 1 { - err = io.EOF // EOF possibly if no Tokens present after top-level value - } - return Token{}, wrapSyntacticError(d, err, pos, 0) - } - } - - // Consume colon or comma. - var delim byte - if c := d.buf[pos]; c == ':' || c == ',' { - delim = c - pos += 1 - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - err = wrapSyntacticError(d, err, pos, 0) - return Token{}, d.checkDelimBeforeIOError(delim, err) - } - } - } - next = Kind(d.buf[pos]).normalize() - if d.Tokens.needDelim(next) != delim { - return Token{}, d.checkDelim(delim, next) - } - } - - // Handle the next token. - var n int - switch next { - case 'n': - if jsonwire.ConsumeNull(d.buf[pos:]) == 0 { - pos, err = d.consumeLiteral(pos, "null") - if err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - } else { - pos += len("null") - } - if err = d.Tokens.appendLiteral(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos-len("null"), +1) // report position at start of literal - } - d.prevStart, d.prevEnd = pos, pos - return Null, nil - - case 'f': - if jsonwire.ConsumeFalse(d.buf[pos:]) == 0 { - pos, err = d.consumeLiteral(pos, "false") - if err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - } else { - pos += len("false") - } - if err = d.Tokens.appendLiteral(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos-len("false"), +1) // report position at start of literal - } - d.prevStart, d.prevEnd = pos, pos - return False, nil - - case 't': - if jsonwire.ConsumeTrue(d.buf[pos:]) == 0 { - pos, err = d.consumeLiteral(pos, "true") - if err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - } else { - pos += len("true") - } - if err = d.Tokens.appendLiteral(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos-len("true"), +1) // report position at start of literal - } - d.prevStart, d.prevEnd = pos, pos - return True, nil - - case '"': - var flags jsonwire.ValueFlags // TODO: Preserve this in Token? - if n = jsonwire.ConsumeSimpleString(d.buf[pos:]); n == 0 { - oldAbsPos := d.baseOffset + int64(pos) - pos, err = d.consumeString(&flags, pos) - newAbsPos := d.baseOffset + int64(pos) - n = int(newAbsPos - oldAbsPos) - if err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - } else { - pos += n - } - if d.Tokens.Last.NeedObjectName() { - if !d.Flags.Get(jsonflags.AllowDuplicateNames) { - if !d.Tokens.Last.isValidNamespace() { - return Token{}, wrapSyntacticError(d, errInvalidNamespace, pos-n, +1) - } - if d.Tokens.Last.isActiveNamespace() && !d.Namespaces.Last().insertQuoted(d.buf[pos-n:pos], flags.IsVerbatim()) { - err = wrapWithObjectName(ErrDuplicateName, d.buf[pos-n:pos]) - return Token{}, wrapSyntacticError(d, err, pos-n, +1) // report position at start of string - } - } - d.Names.ReplaceLastQuotedOffset(pos - n) // only replace if insertQuoted succeeds - } - if err = d.Tokens.appendString(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos-n, +1) // report position at start of string - } - d.prevStart, d.prevEnd = pos-n, pos - return Token{raw: &d.decodeBuffer, num: uint64(d.previousOffsetStart())}, nil - - case '0': - // NOTE: Since JSON numbers are not self-terminating, - // we need to make sure that the next byte is not part of a number. - if n = jsonwire.ConsumeSimpleNumber(d.buf[pos:]); n == 0 || d.needMore(pos+n) { - oldAbsPos := d.baseOffset + int64(pos) - pos, err = d.consumeNumber(pos) - newAbsPos := d.baseOffset + int64(pos) - n = int(newAbsPos - oldAbsPos) - if err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - } else { - pos += n - } - if err = d.Tokens.appendNumber(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos-n, +1) // report position at start of number - } - d.prevStart, d.prevEnd = pos-n, pos - return Token{raw: &d.decodeBuffer, num: uint64(d.previousOffsetStart())}, nil - - case '{': - if err = d.Tokens.pushObject(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - d.Names.push() - if !d.Flags.Get(jsonflags.AllowDuplicateNames) { - d.Namespaces.push() - } - pos += 1 - d.prevStart, d.prevEnd = pos, pos - return BeginObject, nil - - case '}': - if err = d.Tokens.popObject(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - d.Names.pop() - if !d.Flags.Get(jsonflags.AllowDuplicateNames) { - d.Namespaces.pop() - } - pos += 1 - d.prevStart, d.prevEnd = pos, pos - return EndObject, nil - - case '[': - if err = d.Tokens.pushArray(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - pos += 1 - d.prevStart, d.prevEnd = pos, pos - return BeginArray, nil - - case ']': - if err = d.Tokens.popArray(); err != nil { - return Token{}, wrapSyntacticError(d, err, pos, +1) - } - pos += 1 - d.prevStart, d.prevEnd = pos, pos - return EndArray, nil - - default: - err = jsonwire.NewInvalidCharacterError(d.buf[pos:], "at start of value") - return Token{}, wrapSyntacticError(d, err, pos, +1) - } -} - -// ReadValue returns the next raw JSON value, advancing the read offset. -// The value is stripped of any leading or trailing whitespace and -// contains the exact bytes of the input, which may contain invalid UTF-8 -// if [AllowInvalidUTF8] is specified. -// -// The returned value is only valid until the next Peek, Read, or Skip call and -// may not be mutated while the Decoder remains in use. -// If the decoder is currently at the end token for an object or array, -// then it reports a [SyntacticError] and the internal state remains unchanged. -// It returns [io.EOF] if there are no more values. -func (d *Decoder) ReadValue() (Value, error) { - var flags jsonwire.ValueFlags - return d.s.ReadValue(&flags) -} -func (d *decoderState) ReadValue(flags *jsonwire.ValueFlags) (Value, error) { - // Determine the next kind. - var err error - var next Kind - pos := d.peekPos - if pos != 0 { - // Use cached peek result. - if d.peekErr != nil { - err := d.peekErr - d.peekPos, d.peekErr = 0, nil // possibly a transient I/O error - return nil, err - } - next = Kind(d.buf[pos]).normalize() - d.peekPos = 0 // reset cache - } else { - d.invalidatePreviousRead() - pos = d.prevEnd - - // Consume leading whitespace. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - if err == io.ErrUnexpectedEOF && d.Tokens.Depth() == 1 { - err = io.EOF // EOF possibly if no Tokens present after top-level value - } - return nil, wrapSyntacticError(d, err, pos, 0) - } - } - - // Consume colon or comma. - var delim byte - if c := d.buf[pos]; c == ':' || c == ',' { - delim = c - pos += 1 - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - err = wrapSyntacticError(d, err, pos, 0) - return nil, d.checkDelimBeforeIOError(delim, err) - } - } - } - next = Kind(d.buf[pos]).normalize() - if d.Tokens.needDelim(next) != delim { - return nil, d.checkDelim(delim, next) - } - } - - // Handle the next value. - oldAbsPos := d.baseOffset + int64(pos) - pos, err = d.consumeValue(flags, pos, d.Tokens.Depth()) - newAbsPos := d.baseOffset + int64(pos) - n := int(newAbsPos - oldAbsPos) - if err != nil { - return nil, wrapSyntacticError(d, err, pos, +1) - } - switch next { - case 'n', 't', 'f': - err = d.Tokens.appendLiteral() - case '"': - if d.Tokens.Last.NeedObjectName() { - if !d.Flags.Get(jsonflags.AllowDuplicateNames) { - if !d.Tokens.Last.isValidNamespace() { - err = errInvalidNamespace - break - } - if d.Tokens.Last.isActiveNamespace() && !d.Namespaces.Last().insertQuoted(d.buf[pos-n:pos], flags.IsVerbatim()) { - err = wrapWithObjectName(ErrDuplicateName, d.buf[pos-n:pos]) - break - } - } - d.Names.ReplaceLastQuotedOffset(pos - n) // only replace if insertQuoted succeeds - } - err = d.Tokens.appendString() - case '0': - err = d.Tokens.appendNumber() - case '{': - if err = d.Tokens.pushObject(); err != nil { - break - } - if err = d.Tokens.popObject(); err != nil { - panic("BUG: popObject should never fail immediately after pushObject: " + err.Error()) - } - case '[': - if err = d.Tokens.pushArray(); err != nil { - break - } - if err = d.Tokens.popArray(); err != nil { - panic("BUG: popArray should never fail immediately after pushArray: " + err.Error()) - } - } - if err != nil { - return nil, wrapSyntacticError(d, err, pos-n, +1) // report position at start of value - } - d.prevEnd = pos - d.prevStart = pos - n - return d.buf[pos-n : pos : pos], nil -} - -// CheckNextValue checks whether the next value is syntactically valid, -// but does not advance the read offset. -// If last, it verifies that the stream cleanly terminates with [io.EOF]. -func (d *decoderState) CheckNextValue(last bool) error { - d.PeekKind() // populates d.peekPos and d.peekErr - pos, err := d.peekPos, d.peekErr - d.peekPos, d.peekErr = 0, nil - if err != nil { - return err - } - - var flags jsonwire.ValueFlags - if pos, err := d.consumeValue(&flags, pos, d.Tokens.Depth()); err != nil { - return wrapSyntacticError(d, err, pos, +1) - } else if last { - return d.checkEOF(pos) - } - return nil -} - -// CheckEOF verifies that the input has no more data. -func (d *decoderState) CheckEOF() error { - return d.checkEOF(d.prevEnd) -} -func (d *decoderState) checkEOF(pos int) error { - switch pos, err := d.consumeWhitespace(pos); err { - case nil: - err := jsonwire.NewInvalidCharacterError(d.buf[pos:], "after top-level value") - return wrapSyntacticError(d, err, pos, 0) - case io.ErrUnexpectedEOF: - return nil - default: - return err - } -} - -// consumeWhitespace consumes all whitespace starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the last whitespace. -// If it returns nil, there is guaranteed to at least be one unread byte. -// -// The following pattern is common in this implementation: -// -// pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) -// if d.needMore(pos) { -// if pos, err = d.consumeWhitespace(pos); err != nil { -// return ... -// } -// } -// -// It is difficult to simplify this without sacrificing performance since -// consumeWhitespace must be inlined. The body of the if statement is -// executed only in rare situations where we need to fetch more data. -// Since fetching may return an error, we also need to check the error. -func (d *decoderState) consumeWhitespace(pos int) (newPos int, err error) { - for { - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - absPos := d.baseOffset + int64(pos) - err = d.fetch() // will mutate d.buf and invalidate pos - pos = int(absPos - d.baseOffset) - if err != nil { - return pos, err - } - continue - } - return pos, nil - } -} - -// consumeValue consumes a single JSON value starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the value. -func (d *decoderState) consumeValue(flags *jsonwire.ValueFlags, pos, depth int) (newPos int, err error) { - for { - var n int - var err error - switch next := Kind(d.buf[pos]).normalize(); next { - case 'n': - if n = jsonwire.ConsumeNull(d.buf[pos:]); n == 0 { - n, err = jsonwire.ConsumeLiteral(d.buf[pos:], "null") - } - case 'f': - if n = jsonwire.ConsumeFalse(d.buf[pos:]); n == 0 { - n, err = jsonwire.ConsumeLiteral(d.buf[pos:], "false") - } - case 't': - if n = jsonwire.ConsumeTrue(d.buf[pos:]); n == 0 { - n, err = jsonwire.ConsumeLiteral(d.buf[pos:], "true") - } - case '"': - if n = jsonwire.ConsumeSimpleString(d.buf[pos:]); n == 0 { - return d.consumeString(flags, pos) - } - case '0': - // NOTE: Since JSON numbers are not self-terminating, - // we need to make sure that the next byte is not part of a number. - if n = jsonwire.ConsumeSimpleNumber(d.buf[pos:]); n == 0 || d.needMore(pos+n) { - return d.consumeNumber(pos) - } - case '{': - return d.consumeObject(flags, pos, depth) - case '[': - return d.consumeArray(flags, pos, depth) - default: - if (d.Tokens.Last.isObject() && next == ']') || (d.Tokens.Last.isArray() && next == '}') { - return pos, errMismatchDelim - } - return pos, jsonwire.NewInvalidCharacterError(d.buf[pos:], "at start of value") - } - if err == io.ErrUnexpectedEOF { - absPos := d.baseOffset + int64(pos) - err = d.fetch() // will mutate d.buf and invalidate pos - pos = int(absPos - d.baseOffset) - if err != nil { - return pos + n, err - } - continue - } - return pos + n, err - } -} - -// consumeLiteral consumes a single JSON literal starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the literal. -func (d *decoderState) consumeLiteral(pos int, lit string) (newPos int, err error) { - for { - n, err := jsonwire.ConsumeLiteral(d.buf[pos:], lit) - if err == io.ErrUnexpectedEOF { - absPos := d.baseOffset + int64(pos) - err = d.fetch() // will mutate d.buf and invalidate pos - pos = int(absPos - d.baseOffset) - if err != nil { - return pos + n, err - } - continue - } - return pos + n, err - } -} - -// consumeString consumes a single JSON string starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the string. -func (d *decoderState) consumeString(flags *jsonwire.ValueFlags, pos int) (newPos int, err error) { - var n int - for { - n, err = jsonwire.ConsumeStringResumable(flags, d.buf[pos:], n, !d.Flags.Get(jsonflags.AllowInvalidUTF8)) - if err == io.ErrUnexpectedEOF { - absPos := d.baseOffset + int64(pos) - err = d.fetch() // will mutate d.buf and invalidate pos - pos = int(absPos - d.baseOffset) - if err != nil { - return pos + n, err - } - continue - } - return pos + n, err - } -} - -// consumeNumber consumes a single JSON number starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the number. -func (d *decoderState) consumeNumber(pos int) (newPos int, err error) { - var n int - var state jsonwire.ConsumeNumberState - for { - n, state, err = jsonwire.ConsumeNumberResumable(d.buf[pos:], n, state) - // NOTE: Since JSON numbers are not self-terminating, - // we need to make sure that the next byte is not part of a number. - if err == io.ErrUnexpectedEOF || d.needMore(pos+n) { - mayTerminate := err == nil - absPos := d.baseOffset + int64(pos) - err = d.fetch() // will mutate d.buf and invalidate pos - pos = int(absPos - d.baseOffset) - if err != nil { - if mayTerminate && err == io.ErrUnexpectedEOF { - return pos + n, nil - } - return pos, err - } - continue - } - return pos + n, err - } -} - -// consumeObject consumes a single JSON object starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the object. -func (d *decoderState) consumeObject(flags *jsonwire.ValueFlags, pos, depth int) (newPos int, err error) { - var n int - var names *objectNamespace - if !d.Flags.Get(jsonflags.AllowDuplicateNames) { - d.Namespaces.push() - defer d.Namespaces.pop() - names = d.Namespaces.Last() - } - - // Handle before start. - if uint(pos) >= uint(len(d.buf)) || d.buf[pos] != '{' { - panic("BUG: consumeObject must be called with a buffer that starts with '{'") - } else if depth == maxNestingDepth+1 { - return pos, errMaxDepth - } - pos++ - - // Handle after start. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, err - } - } - if d.buf[pos] == '}' { - pos++ - return pos, nil - } - - depth++ - for { - // Handle before name. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, err - } - } - var flags2 jsonwire.ValueFlags - if n = jsonwire.ConsumeSimpleString(d.buf[pos:]); n == 0 { - oldAbsPos := d.baseOffset + int64(pos) - pos, err = d.consumeString(&flags2, pos) - newAbsPos := d.baseOffset + int64(pos) - n = int(newAbsPos - oldAbsPos) - flags.Join(flags2) - if err != nil { - return pos, err - } - } else { - pos += n - } - quotedName := d.buf[pos-n : pos] - if !d.Flags.Get(jsonflags.AllowDuplicateNames) && !names.insertQuoted(quotedName, flags2.IsVerbatim()) { - return pos - n, wrapWithObjectName(ErrDuplicateName, quotedName) - } - - // Handle after name. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, wrapWithObjectName(err, quotedName) - } - } - if d.buf[pos] != ':' { - err := jsonwire.NewInvalidCharacterError(d.buf[pos:], "after object name (expecting ':')") - return pos, wrapWithObjectName(err, quotedName) - } - pos++ - - // Handle before value. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, wrapWithObjectName(err, quotedName) - } - } - pos, err = d.consumeValue(flags, pos, depth) - if err != nil { - return pos, wrapWithObjectName(err, quotedName) - } - - // Handle after value. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, err - } - } - switch d.buf[pos] { - case ',': - pos++ - continue - case '}': - pos++ - return pos, nil - default: - return pos, jsonwire.NewInvalidCharacterError(d.buf[pos:], "after object value (expecting ',' or '}')") - } - } -} - -// consumeArray consumes a single JSON array starting at d.buf[pos:]. -// It returns the new position in d.buf immediately after the array. -func (d *decoderState) consumeArray(flags *jsonwire.ValueFlags, pos, depth int) (newPos int, err error) { - // Handle before start. - if uint(pos) >= uint(len(d.buf)) || d.buf[pos] != '[' { - panic("BUG: consumeArray must be called with a buffer that starts with '['") - } else if depth == maxNestingDepth+1 { - return pos, errMaxDepth - } - pos++ - - // Handle after start. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, err - } - } - if d.buf[pos] == ']' { - pos++ - return pos, nil - } - - var idx int64 - depth++ - for { - // Handle before value. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, err - } - } - pos, err = d.consumeValue(flags, pos, depth) - if err != nil { - return pos, wrapWithArrayIndex(err, idx) - } - - // Handle after value. - pos += jsonwire.ConsumeWhitespace(d.buf[pos:]) - if d.needMore(pos) { - if pos, err = d.consumeWhitespace(pos); err != nil { - return pos, err - } - } - switch d.buf[pos] { - case ',': - pos++ - idx++ - continue - case ']': - pos++ - return pos, nil - default: - return pos, jsonwire.NewInvalidCharacterError(d.buf[pos:], "after array element (expecting ',' or ']')") - } - } -} - -// InputOffset returns the current input byte offset. It gives the location -// of the next byte immediately after the most recently returned token or value. -// The number of bytes actually read from the underlying [io.Reader] may be more -// than this offset due to internal buffering effects. -func (d *Decoder) InputOffset() int64 { - return d.s.previousOffsetEnd() -} - -// UnreadBuffer returns the data remaining in the unread buffer, -// which may contain zero or more bytes. -// The returned buffer must not be mutated while Decoder continues to be used. -// The buffer contents are valid until the next Peek, Read, or Skip call. -func (d *Decoder) UnreadBuffer() []byte { - return d.s.unreadBuffer() -} - -// StackDepth returns the depth of the state machine for read JSON data. -// Each level on the stack represents a nested JSON object or array. -// It is incremented whenever an [BeginObject] or [BeginArray] token is encountered -// and decremented whenever an [EndObject] or [EndArray] token is encountered. -// The depth is zero-indexed, where zero represents the top-level JSON value. -func (d *Decoder) StackDepth() int { - // NOTE: Keep in sync with Encoder.StackDepth. - return d.s.Tokens.Depth() - 1 -} - -// StackIndex returns information about the specified stack level. -// It must be a number between 0 and [Decoder.StackDepth], inclusive. -// For each level, it reports the kind: -// -// - 0 for a level of zero, -// - '{' for a level representing a JSON object, and -// - '[' for a level representing a JSON array. -// -// It also reports the length of that JSON object or array. -// Each name and value in a JSON object is counted separately, -// so the effective number of members would be half the length. -// A complete JSON object must have an even length. -func (d *Decoder) StackIndex(i int) (Kind, int64) { - // NOTE: Keep in sync with Encoder.StackIndex. - switch s := d.s.Tokens.index(i); { - case i > 0 && s.isObject(): - return '{', s.Length() - case i > 0 && s.isArray(): - return '[', s.Length() - default: - return 0, s.Length() - } -} - -// StackPointer returns a JSON Pointer (RFC 6901) to the most recently read value. -func (d *Decoder) StackPointer() Pointer { - return Pointer(d.s.AppendStackPointer(nil, -1)) -} - -func (d *decoderState) AppendStackPointer(b []byte, where int) []byte { - d.Names.copyQuotedBuffer(d.buf) - return d.state.appendStackPointer(b, where) -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/doc.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/doc.go deleted file mode 100644 index bea3ccd34..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/doc.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package jsontext implements syntactic processing of JSON -// as specified in RFC 4627, RFC 7159, RFC 7493, RFC 8259, and RFC 8785. -// JSON is a simple data interchange format that can represent -// primitive data types such as booleans, strings, and numbers, -// in addition to structured data types such as objects and arrays. -// -// The [Encoder] and [Decoder] types are used to encode or decode -// a stream of JSON tokens or values. -// -// # Tokens and Values -// -// A JSON token refers to the basic structural elements of JSON: -// -// - a JSON literal (i.e., null, true, or false) -// - a JSON string (e.g., "hello, world!") -// - a JSON number (e.g., 123.456) -// - a begin or end delimiter for a JSON object (i.e., '{' or '}') -// - a begin or end delimiter for a JSON array (i.e., '[' or ']') -// -// A JSON token is represented by the [Token] type in Go. Technically, -// there are two additional structural characters (i.e., ':' and ','), -// but there is no [Token] representation for them since their presence -// can be inferred by the structure of the JSON grammar itself. -// For example, there must always be an implicit colon between -// the name and value of a JSON object member. -// -// A JSON value refers to a complete unit of JSON data: -// -// - a JSON literal, string, or number -// - a JSON object (e.g., `{"name":"value"}`) -// - a JSON array (e.g., `[1,2,3,]`) -// -// A JSON value is represented by the [Value] type in Go and is a []byte -// containing the raw textual representation of the value. There is some overlap -// between tokens and values as both contain literals, strings, and numbers. -// However, only a value can represent the entirety of a JSON object or array. -// -// The [Encoder] and [Decoder] types contain methods to read or write the next -// [Token] or [Value] in a sequence. They maintain a state machine to validate -// whether the sequence of JSON tokens and/or values produces a valid JSON. -// [Options] may be passed to the [NewEncoder] or [NewDecoder] constructors -// to configure the syntactic behavior of encoding and decoding. -// -// # Terminology -// -// The terms "encode" and "decode" are used for syntactic functionality -// that is concerned with processing JSON based on its grammar, and -// the terms "marshal" and "unmarshal" are used for semantic functionality -// that determines the meaning of JSON values as Go values and vice-versa. -// This package (i.e., [jsontext]) deals with JSON at a syntactic layer, -// while [encoding/json/v2] deals with JSON at a semantic layer. -// The goal is to provide a clear distinction between functionality that -// is purely concerned with encoding versus that of marshaling. -// For example, one can directly encode a stream of JSON tokens without -// needing to marshal a concrete Go value representing them. -// Similarly, one can decode a stream of JSON tokens without -// needing to unmarshal them into a concrete Go value. -// -// This package uses JSON terminology when discussing JSON, which may differ -// from related concepts in Go or elsewhere in computing literature. -// -// - a JSON "object" refers to an unordered collection of name/value members. -// - a JSON "array" refers to an ordered sequence of elements. -// - a JSON "value" refers to either a literal (i.e., null, false, or true), -// string, number, object, or array. -// -// See RFC 8259 for more information. -// -// # Specifications -// -// Relevant specifications include RFC 4627, RFC 7159, RFC 7493, RFC 8259, -// and RFC 8785. Each RFC is generally a stricter subset of another RFC. -// In increasing order of strictness: -// -// - RFC 4627 and RFC 7159 do not require (but recommend) the use of UTF-8 -// and also do not require (but recommend) that object names be unique. -// - RFC 8259 requires the use of UTF-8, -// but does not require (but recommends) that object names be unique. -// - RFC 7493 requires the use of UTF-8 -// and also requires that object names be unique. -// - RFC 8785 defines a canonical representation. It requires the use of UTF-8 -// and also requires that object names be unique and in a specific ordering. -// It specifies exactly how strings and numbers must be formatted. -// -// The primary difference between RFC 4627 and RFC 7159 is that the former -// restricted top-level values to only JSON objects and arrays, while -// RFC 7159 and subsequent RFCs permit top-level values to additionally be -// JSON nulls, booleans, strings, or numbers. -// -// By default, this package operates on RFC 7493, but can be configured -// to operate according to the other RFC specifications. -// RFC 7493 is a stricter subset of RFC 8259 and fully compliant with it. -// In particular, it makes specific choices about behavior that RFC 8259 -// leaves as undefined in order to ensure greater interoperability. -// -// # Security Considerations -// -// See the "Security Considerations" section in [encoding/json/v2]. -package jsontext - -// requireKeyedLiterals can be embedded in a struct to require keyed literals. -type requireKeyedLiterals struct{} - -// nonComparable can be embedded in a struct to prevent comparability. -type nonComparable [0]func() diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/encode.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/encode.go deleted file mode 100644 index 36bf7efdf..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/encode.go +++ /dev/null @@ -1,975 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "bytes" - "io" - "math/bits" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// Encoder is a streaming encoder from raw JSON tokens and values. -// It is used to write a stream of top-level JSON values, -// each terminated with a newline character. -// -// [Encoder.WriteToken] and [Encoder.WriteValue] calls may be interleaved. -// For example, the following JSON value: -// -// {"name":"value","array":[null,false,true,3.14159],"object":{"k":"v"}} -// -// can be composed with the following calls (ignoring errors for brevity): -// -// e.WriteToken(BeginObject) // { -// e.WriteToken(String("name")) // "name" -// e.WriteToken(String("value")) // "value" -// e.WriteValue(Value(`"array"`)) // "array" -// e.WriteToken(BeginArray) // [ -// e.WriteToken(Null) // null -// e.WriteToken(False) // false -// e.WriteValue(Value("true")) // true -// e.WriteToken(Float(3.14159)) // 3.14159 -// e.WriteToken(EndArray) // ] -// e.WriteValue(Value(`"object"`)) // "object" -// e.WriteValue(Value(`{"k":"v"}`)) // {"k":"v"} -// e.WriteToken(EndObject) // } -// -// The above is one of many possible sequence of calls and -// may not represent the most sensible method to call for any given token/value. -// For example, it is probably more common to call [Encoder.WriteToken] with a string -// for object names. -type Encoder struct { - s encoderState -} - -// encoderState is the low-level state of Encoder. -// It has exported fields and method for use by the "json" package. -type encoderState struct { - state - encodeBuffer - jsonopts.Struct - - SeenPointers map[any]struct{} // only used when marshaling; identical to json.seenPointers -} - -// encodeBuffer is a buffer split into 2 segments: -// -// - buf[0:len(buf)] // written (but unflushed) portion of the buffer -// - buf[len(buf):cap(buf)] // unused portion of the buffer -type encodeBuffer struct { - Buf []byte // may alias wr if it is a bytes.Buffer - - // baseOffset is added to len(buf) to obtain the absolute offset - // relative to the start of io.Writer stream. - baseOffset int64 - - wr io.Writer - - // maxValue is the approximate maximum Value size passed to WriteValue. - maxValue int - // availBuffer is the buffer returned by the AvailableBuffer method. - availBuffer []byte // always has zero length - // bufStats is statistics about buffer utilization. - // It is only used with pooled encoders in pools.go. - bufStats bufferStatistics -} - -// NewEncoder constructs a new streaming encoder writing to w -// configured with the provided options. -// It flushes the internal buffer when the buffer is sufficiently full or -// when a top-level value has been written. -// -// If w is a [bytes.Buffer], then the encoder appends directly into the buffer -// without copying the contents from an intermediate buffer. -func NewEncoder(w io.Writer, opts ...Options) *Encoder { - e := new(Encoder) - e.Reset(w, opts...) - return e -} - -// Reset resets an encoder such that it is writing afresh to w and -// configured with the provided options. Reset must not be called on -// a Encoder passed to the [encoding/json/v2.MarshalerTo.MarshalJSONTo] method -// or the [encoding/json/v2.MarshalToFunc] function. -func (e *Encoder) Reset(w io.Writer, opts ...Options) { - switch { - case e == nil: - panic("jsontext: invalid nil Encoder") - case w == nil: - panic("jsontext: invalid nil io.Writer") - case e.s.Flags.Get(jsonflags.WithinArshalCall): - panic("jsontext: cannot reset Encoder passed to json.MarshalerTo") - } - // Reuse the buffer if it does not alias a previous [bytes.Buffer]. - b := e.s.Buf[:0] - if _, ok := e.s.wr.(*bytes.Buffer); ok { - b = nil - } - e.s.reset(b, w, opts...) -} - -func (e *encoderState) reset(b []byte, w io.Writer, opts ...Options) { - e.state.reset() - e.encodeBuffer = encodeBuffer{Buf: b, wr: w, availBuffer: e.availBuffer, bufStats: e.bufStats} - if bb, ok := w.(*bytes.Buffer); ok && bb != nil { - e.Buf = bb.AvailableBuffer() // alias the unused buffer of bb - } - opts2 := jsonopts.Struct{} // avoid mutating e.Struct in case it is part of opts - opts2.Join(opts...) - e.Struct = opts2 - if e.Flags.Get(jsonflags.Multiline) { - if !e.Flags.Has(jsonflags.SpaceAfterColon) { - e.Flags.Set(jsonflags.SpaceAfterColon | 1) - } - if !e.Flags.Has(jsonflags.SpaceAfterComma) { - e.Flags.Set(jsonflags.SpaceAfterComma | 0) - } - if !e.Flags.Has(jsonflags.Indent) { - e.Flags.Set(jsonflags.Indent | 1) - e.Indent = "\t" - } - } -} - -// Options returns the options used to construct the decoder and -// may additionally contain semantic options passed to a -// [encoding/json/v2.MarshalEncode] call. -// -// If operating within -// a [encoding/json/v2.MarshalerTo.MarshalJSONTo] method call or -// a [encoding/json/v2.MarshalToFunc] function call, -// then the returned options are only valid within the call. -func (e *Encoder) Options() Options { - return &e.s.Struct -} - -// NeedFlush determines whether to flush at this point. -func (e *encoderState) NeedFlush() bool { - // NOTE: This function is carefully written to be inlinable. - - // Avoid flushing if e.wr is nil since there is no underlying writer. - // Flush if less than 25% of the capacity remains. - // Flushing at some constant fraction ensures that the buffer stops growing - // so long as the largest Token or Value fits within that unused capacity. - return e.wr != nil && (e.Tokens.Depth() == 1 || len(e.Buf) > 3*cap(e.Buf)/4) -} - -// Flush flushes the buffer to the underlying io.Writer. -// It may append a trailing newline after the top-level value. -func (e *encoderState) Flush() error { - if e.wr == nil || e.avoidFlush() { - return nil - } - - // In streaming mode, always emit a newline after the top-level value. - if e.Tokens.Depth() == 1 && !e.Flags.Get(jsonflags.OmitTopLevelNewline) { - e.Buf = append(e.Buf, '\n') - } - - // Inform objectNameStack that we are about to flush the buffer content. - e.Names.copyQuotedBuffer(e.Buf) - - // Specialize bytes.Buffer for better performance. - if bb, ok := e.wr.(*bytes.Buffer); ok { - // If e.buf already aliases the internal buffer of bb, - // then the Write call simply increments the internal offset, - // otherwise Write operates as expected. - // See https://go.dev/issue/42986. - n, _ := bb.Write(e.Buf) // never fails unless bb is nil - e.baseOffset += int64(n) - - // If the internal buffer of bytes.Buffer is too small, - // append operations elsewhere in the Encoder may grow the buffer. - // This would be semantically correct, but hurts performance. - // As such, ensure 25% of the current length is always available - // to reduce the probability that other appends must allocate. - if avail := bb.Available(); avail < bb.Len()/4 { - bb.Grow(avail + 1) - } - - e.Buf = bb.AvailableBuffer() - return nil - } - - // Flush the internal buffer to the underlying io.Writer. - n, err := e.wr.Write(e.Buf) - e.baseOffset += int64(n) - if err != nil { - // In the event of an error, preserve the unflushed portion. - // Thus, write errors aren't fatal so long as the io.Writer - // maintains consistent state after errors. - if n > 0 { - e.Buf = e.Buf[:copy(e.Buf, e.Buf[n:])] - } - return &ioError{action: "write", err: err} - } - e.Buf = e.Buf[:0] - - // Check whether to grow the buffer. - // Note that cap(e.buf) may already exceed maxBufferSize since - // an append elsewhere already grew it to store a large token. - const maxBufferSize = 4 << 10 - const growthSizeFactor = 2 // higher value is faster - const growthRateFactor = 2 // higher value is slower - // By default, grow if below the maximum buffer size. - grow := cap(e.Buf) <= maxBufferSize/growthSizeFactor - // Growing can be expensive, so only grow - // if a sufficient number of bytes have been processed. - grow = grow && int64(cap(e.Buf)) < e.previousOffsetEnd()/growthRateFactor - if grow { - e.Buf = make([]byte, 0, cap(e.Buf)*growthSizeFactor) - } - - return nil -} -func (d *encodeBuffer) offsetAt(pos int) int64 { return d.baseOffset + int64(pos) } -func (e *encodeBuffer) previousOffsetEnd() int64 { return e.baseOffset + int64(len(e.Buf)) } -func (e *encodeBuffer) unflushedBuffer() []byte { return e.Buf } - -// avoidFlush indicates whether to avoid flushing to ensure there is always -// enough in the buffer to unwrite the last object member if it were empty. -func (e *encoderState) avoidFlush() bool { - switch { - case e.Tokens.Last.Length() == 0: - // Never flush after BeginObject or BeginArray since we don't know yet - // if the object or array will end up being empty. - return true - case e.Tokens.Last.needObjectValue(): - // Never flush before the object value since we don't know yet - // if the object value will end up being empty. - return true - case e.Tokens.Last.NeedObjectName() && len(e.Buf) >= 2: - // Never flush after the object value if it does turn out to be empty. - switch string(e.Buf[len(e.Buf)-2:]) { - case `ll`, `""`, `{}`, `[]`: // last two bytes of every empty value - return true - } - } - return false -} - -// UnwriteEmptyObjectMember unwrites the last object member if it is empty -// and reports whether it performed an unwrite operation. -func (e *encoderState) UnwriteEmptyObjectMember(prevName *string) bool { - if last := e.Tokens.Last; !last.isObject() || !last.NeedObjectName() || last.Length() == 0 { - panic("BUG: must be called on an object after writing a value") - } - - // The flushing logic is modified to never flush a trailing empty value. - // The encoder never writes trailing whitespace eagerly. - b := e.unflushedBuffer() - - // Detect whether the last value was empty. - var n int - if len(b) >= 3 { - switch string(b[len(b)-2:]) { - case "ll": // last two bytes of `null` - n = len(`null`) - case `""`: - // It is possible for a non-empty string to have `""` as a suffix - // if the second to the last quote was escaped. - if b[len(b)-3] == '\\' { - return false // e.g., `"\""` is not empty - } - n = len(`""`) - case `{}`: - n = len(`{}`) - case `[]`: - n = len(`[]`) - } - } - if n == 0 { - return false - } - - // Unwrite the value, whitespace, colon, name, whitespace, and comma. - b = b[:len(b)-n] - b = jsonwire.TrimSuffixWhitespace(b) - b = jsonwire.TrimSuffixByte(b, ':') - b = jsonwire.TrimSuffixString(b) - b = jsonwire.TrimSuffixWhitespace(b) - b = jsonwire.TrimSuffixByte(b, ',') - e.Buf = b // store back truncated unflushed buffer - - // Undo state changes. - e.Tokens.Last.decrement() // for object member value - e.Tokens.Last.decrement() // for object member name - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - if e.Tokens.Last.isActiveNamespace() { - e.Namespaces.Last().removeLast() - } - } - e.Names.clearLast() - if prevName != nil { - e.Names.copyQuotedBuffer(e.Buf) // required by objectNameStack.replaceLastUnquotedName - e.Names.replaceLastUnquotedName(*prevName) - } - return true -} - -// UnwriteOnlyObjectMemberName unwrites the only object member name -// and returns the unquoted name. -func (e *encoderState) UnwriteOnlyObjectMemberName() string { - if last := e.Tokens.Last; !last.isObject() || last.Length() != 1 { - panic("BUG: must be called on an object after writing first name") - } - - // Unwrite the name and whitespace. - b := jsonwire.TrimSuffixString(e.Buf) - isVerbatim := bytes.IndexByte(e.Buf[len(b):], '\\') < 0 - name := string(jsonwire.UnquoteMayCopy(e.Buf[len(b):], isVerbatim)) - e.Buf = jsonwire.TrimSuffixWhitespace(b) - - // Undo state changes. - e.Tokens.Last.decrement() - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - if e.Tokens.Last.isActiveNamespace() { - e.Namespaces.Last().removeLast() - } - } - e.Names.clearLast() - return name -} - -// WriteToken writes the next token and advances the internal write offset. -// -// The provided token kind must be consistent with the JSON grammar. -// For example, it is an error to provide a number when the encoder -// is expecting an object name (which is always a string), or -// to provide an end object delimiter when the encoder is finishing an array. -// If the provided token is invalid, then it reports a [SyntacticError] and -// the internal state remains unchanged. The offset reported -// in [SyntacticError] will be relative to the [Encoder.OutputOffset]. -func (e *Encoder) WriteToken(t Token) error { - return e.s.WriteToken(t) -} -func (e *encoderState) WriteToken(t Token) error { - k := t.Kind() - b := e.Buf // use local variable to avoid mutating e in case of error - - // Append any delimiters or optional whitespace. - b = e.Tokens.MayAppendDelim(b, k) - if e.Flags.Get(jsonflags.AnyWhitespace) { - b = e.appendWhitespace(b, k) - } - pos := len(b) // offset before the token - - // Append the token to the output and to the state machine. - var err error - switch k { - case 'n': - b = append(b, "null"...) - err = e.Tokens.appendLiteral() - case 'f': - b = append(b, "false"...) - err = e.Tokens.appendLiteral() - case 't': - b = append(b, "true"...) - err = e.Tokens.appendLiteral() - case '"': - if b, err = t.appendString(b, &e.Flags); err != nil { - break - } - if e.Tokens.Last.NeedObjectName() { - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - if !e.Tokens.Last.isValidNamespace() { - err = errInvalidNamespace - break - } - if e.Tokens.Last.isActiveNamespace() && !e.Namespaces.Last().insertQuoted(b[pos:], false) { - err = wrapWithObjectName(ErrDuplicateName, b[pos:]) - break - } - } - e.Names.ReplaceLastQuotedOffset(pos) // only replace if insertQuoted succeeds - } - err = e.Tokens.appendString() - case '0': - if b, err = t.appendNumber(b, &e.Flags); err != nil { - break - } - err = e.Tokens.appendNumber() - case '{': - b = append(b, '{') - if err = e.Tokens.pushObject(); err != nil { - break - } - e.Names.push() - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - e.Namespaces.push() - } - case '}': - b = append(b, '}') - if err = e.Tokens.popObject(); err != nil { - break - } - e.Names.pop() - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - e.Namespaces.pop() - } - case '[': - b = append(b, '[') - err = e.Tokens.pushArray() - case ']': - b = append(b, ']') - err = e.Tokens.popArray() - default: - err = errInvalidToken - } - if err != nil { - return wrapSyntacticError(e, err, pos, +1) - } - - // Finish off the buffer and store it back into e. - e.Buf = b - if e.NeedFlush() { - return e.Flush() - } - return nil -} - -// AppendRaw appends either a raw string (without double quotes) or number. -// Specify safeASCII if the string output is guaranteed to be ASCII -// without any characters (including '<', '>', and '&') that need escaping, -// otherwise this will validate whether the string needs escaping. -// The appended bytes for a JSON number must be valid. -// -// This is a specialized implementation of Encoder.WriteValue -// that allows appending directly into the buffer. -// It is only called from marshal logic in the "json" package. -func (e *encoderState) AppendRaw(k Kind, safeASCII bool, appendFn func([]byte) ([]byte, error)) error { - b := e.Buf // use local variable to avoid mutating e in case of error - - // Append any delimiters or optional whitespace. - b = e.Tokens.MayAppendDelim(b, k) - if e.Flags.Get(jsonflags.AnyWhitespace) { - b = e.appendWhitespace(b, k) - } - pos := len(b) // offset before the token - - var err error - switch k { - case '"': - // Append directly into the encoder buffer by assuming that - // most of the time none of the characters need escaping. - b = append(b, '"') - if b, err = appendFn(b); err != nil { - return err - } - b = append(b, '"') - - // Check whether we need to escape the string and if necessary - // copy it to a scratch buffer and then escape it back. - isVerbatim := safeASCII || !jsonwire.NeedEscape(b[pos+len(`"`):len(b)-len(`"`)]) - if !isVerbatim { - var err error - b2 := append(e.availBuffer, b[pos+len(`"`):len(b)-len(`"`)]...) - b, err = jsonwire.AppendQuote(b[:pos], string(b2), &e.Flags) - e.availBuffer = b2[:0] - if err != nil { - return wrapSyntacticError(e, err, pos, +1) - } - } - - // Update the state machine. - if e.Tokens.Last.NeedObjectName() { - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - if !e.Tokens.Last.isValidNamespace() { - return wrapSyntacticError(e, err, pos, +1) - } - if e.Tokens.Last.isActiveNamespace() && !e.Namespaces.Last().insertQuoted(b[pos:], isVerbatim) { - err = wrapWithObjectName(ErrDuplicateName, b[pos:]) - return wrapSyntacticError(e, err, pos, +1) - } - } - e.Names.ReplaceLastQuotedOffset(pos) // only replace if insertQuoted succeeds - } - if err := e.Tokens.appendString(); err != nil { - return wrapSyntacticError(e, err, pos, +1) - } - case '0': - if b, err = appendFn(b); err != nil { - return err - } - if err := e.Tokens.appendNumber(); err != nil { - return wrapSyntacticError(e, err, pos, +1) - } - default: - panic("BUG: invalid kind") - } - - // Finish off the buffer and store it back into e. - e.Buf = b - if e.NeedFlush() { - return e.Flush() - } - return nil -} - -// WriteValue writes the next raw value and advances the internal write offset. -// The Encoder does not simply copy the provided value verbatim, but -// parses it to ensure that it is syntactically valid and reformats it -// according to how the Encoder is configured to format whitespace and strings. -// If [AllowInvalidUTF8] is specified, then any invalid UTF-8 is mangled -// as the Unicode replacement character, U+FFFD. -// -// The provided value kind must be consistent with the JSON grammar -// (see examples on [Encoder.WriteToken]). If the provided value is invalid, -// then it reports a [SyntacticError] and the internal state remains unchanged. -// The offset reported in [SyntacticError] will be relative to the -// [Encoder.OutputOffset] plus the offset into v of any encountered syntax error. -func (e *Encoder) WriteValue(v Value) error { - return e.s.WriteValue(v) -} -func (e *encoderState) WriteValue(v Value) error { - e.maxValue |= len(v) // bitwise OR is a fast approximation of max - - k := v.Kind() - b := e.Buf // use local variable to avoid mutating e in case of error - - // Append any delimiters or optional whitespace. - b = e.Tokens.MayAppendDelim(b, k) - if e.Flags.Get(jsonflags.AnyWhitespace) { - b = e.appendWhitespace(b, k) - } - pos := len(b) // offset before the value - - // Append the value the output. - var n int - n += jsonwire.ConsumeWhitespace(v[n:]) - b, m, err := e.reformatValue(b, v[n:], e.Tokens.Depth()) - if err != nil { - return wrapSyntacticError(e, err, pos+n+m, +1) - } - n += m - n += jsonwire.ConsumeWhitespace(v[n:]) - if len(v) > n { - err = jsonwire.NewInvalidCharacterError(v[n:], "after top-level value") - return wrapSyntacticError(e, err, pos+n, 0) - } - - // Append the kind to the state machine. - switch k { - case 'n', 'f', 't': - err = e.Tokens.appendLiteral() - case '"': - if e.Tokens.Last.NeedObjectName() { - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - if !e.Tokens.Last.isValidNamespace() { - err = errInvalidNamespace - break - } - if e.Tokens.Last.isActiveNamespace() && !e.Namespaces.Last().insertQuoted(b[pos:], false) { - err = wrapWithObjectName(ErrDuplicateName, b[pos:]) - break - } - } - e.Names.ReplaceLastQuotedOffset(pos) // only replace if insertQuoted succeeds - } - err = e.Tokens.appendString() - case '0': - err = e.Tokens.appendNumber() - case '{': - if err = e.Tokens.pushObject(); err != nil { - break - } - if err = e.Tokens.popObject(); err != nil { - panic("BUG: popObject should never fail immediately after pushObject: " + err.Error()) - } - if e.Flags.Get(jsonflags.ReorderRawObjects) { - mustReorderObjects(b[pos:]) - } - case '[': - if err = e.Tokens.pushArray(); err != nil { - break - } - if err = e.Tokens.popArray(); err != nil { - panic("BUG: popArray should never fail immediately after pushArray: " + err.Error()) - } - if e.Flags.Get(jsonflags.ReorderRawObjects) { - mustReorderObjects(b[pos:]) - } - } - if err != nil { - return wrapSyntacticError(e, err, pos, +1) - } - - // Finish off the buffer and store it back into e. - e.Buf = b - if e.NeedFlush() { - return e.Flush() - } - return nil -} - -// CountNextDelimWhitespace counts the number of bytes of delimiter and -// whitespace bytes assuming the upcoming token is a JSON value. -// This method is used for error reporting at the semantic layer. -func (e *encoderState) CountNextDelimWhitespace() (n int) { - const next = Kind('"') // arbitrary kind as next JSON value - delim := e.Tokens.needDelim(next) - if delim > 0 { - n += len(",") | len(":") - } - if delim == ':' { - if e.Flags.Get(jsonflags.SpaceAfterColon) { - n += len(" ") - } - } else { - if delim == ',' && e.Flags.Get(jsonflags.SpaceAfterComma) { - n += len(" ") - } - if e.Flags.Get(jsonflags.Multiline) { - if m := e.Tokens.NeedIndent(next); m > 0 { - n += len("\n") + len(e.IndentPrefix) + (m-1)*len(e.Indent) - } - } - } - return n -} - -// appendWhitespace appends whitespace that immediately precedes the next token. -func (e *encoderState) appendWhitespace(b []byte, next Kind) []byte { - if delim := e.Tokens.needDelim(next); delim == ':' { - if e.Flags.Get(jsonflags.SpaceAfterColon) { - b = append(b, ' ') - } - } else { - if delim == ',' && e.Flags.Get(jsonflags.SpaceAfterComma) { - b = append(b, ' ') - } - if e.Flags.Get(jsonflags.Multiline) { - b = e.AppendIndent(b, e.Tokens.NeedIndent(next)) - } - } - return b -} - -// AppendIndent appends the appropriate number of indentation characters -// for the current nested level, n. -func (e *encoderState) AppendIndent(b []byte, n int) []byte { - if n == 0 { - return b - } - b = append(b, '\n') - b = append(b, e.IndentPrefix...) - for ; n > 1; n-- { - b = append(b, e.Indent...) - } - return b -} - -// reformatValue parses a JSON value from the start of src and -// appends it to the end of dst, reformatting whitespace and strings as needed. -// It returns the extended dst buffer and the number of consumed input bytes. -func (e *encoderState) reformatValue(dst []byte, src Value, depth int) ([]byte, int, error) { - // TODO: Should this update ValueFlags as input? - if len(src) == 0 { - return dst, 0, io.ErrUnexpectedEOF - } - switch k := Kind(src[0]).normalize(); k { - case 'n': - if jsonwire.ConsumeNull(src) == 0 { - n, err := jsonwire.ConsumeLiteral(src, "null") - return dst, n, err - } - return append(dst, "null"...), len("null"), nil - case 'f': - if jsonwire.ConsumeFalse(src) == 0 { - n, err := jsonwire.ConsumeLiteral(src, "false") - return dst, n, err - } - return append(dst, "false"...), len("false"), nil - case 't': - if jsonwire.ConsumeTrue(src) == 0 { - n, err := jsonwire.ConsumeLiteral(src, "true") - return dst, n, err - } - return append(dst, "true"...), len("true"), nil - case '"': - if n := jsonwire.ConsumeSimpleString(src); n > 0 { - dst = append(dst, src[:n]...) // copy simple strings verbatim - return dst, n, nil - } - return jsonwire.ReformatString(dst, src, &e.Flags) - case '0': - if n := jsonwire.ConsumeSimpleNumber(src); n > 0 && !e.Flags.Get(jsonflags.CanonicalizeNumbers) { - dst = append(dst, src[:n]...) // copy simple numbers verbatim - return dst, n, nil - } - return jsonwire.ReformatNumber(dst, src, &e.Flags) - case '{': - return e.reformatObject(dst, src, depth) - case '[': - return e.reformatArray(dst, src, depth) - default: - return dst, 0, jsonwire.NewInvalidCharacterError(src, "at start of value") - } -} - -// reformatObject parses a JSON object from the start of src and -// appends it to the end of src, reformatting whitespace and strings as needed. -// It returns the extended dst buffer and the number of consumed input bytes. -func (e *encoderState) reformatObject(dst []byte, src Value, depth int) ([]byte, int, error) { - // Append object begin. - if len(src) == 0 || src[0] != '{' { - panic("BUG: reformatObject must be called with a buffer that starts with '{'") - } else if depth == maxNestingDepth+1 { - return dst, 0, errMaxDepth - } - dst = append(dst, '{') - n := len("{") - - // Append (possible) object end. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, io.ErrUnexpectedEOF - } - if src[n] == '}' { - dst = append(dst, '}') - n += len("}") - return dst, n, nil - } - - var err error - var names *objectNamespace - if !e.Flags.Get(jsonflags.AllowDuplicateNames) { - e.Namespaces.push() - defer e.Namespaces.pop() - names = e.Namespaces.Last() - } - depth++ - for { - // Append optional newline and indentation. - if e.Flags.Get(jsonflags.Multiline) { - dst = e.AppendIndent(dst, depth) - } - - // Append object name. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, io.ErrUnexpectedEOF - } - m := jsonwire.ConsumeSimpleString(src[n:]) - isVerbatim := m > 0 - if isVerbatim { - dst = append(dst, src[n:n+m]...) - } else { - dst, m, err = jsonwire.ReformatString(dst, src[n:], &e.Flags) - if err != nil { - return dst, n + m, err - } - } - quotedName := src[n : n+m] - if !e.Flags.Get(jsonflags.AllowDuplicateNames) && !names.insertQuoted(quotedName, isVerbatim) { - return dst, n, wrapWithObjectName(ErrDuplicateName, quotedName) - } - n += m - - // Append colon. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, wrapWithObjectName(io.ErrUnexpectedEOF, quotedName) - } - if src[n] != ':' { - err = jsonwire.NewInvalidCharacterError(src[n:], "after object name (expecting ':')") - return dst, n, wrapWithObjectName(err, quotedName) - } - dst = append(dst, ':') - n += len(":") - if e.Flags.Get(jsonflags.SpaceAfterColon) { - dst = append(dst, ' ') - } - - // Append object value. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, wrapWithObjectName(io.ErrUnexpectedEOF, quotedName) - } - dst, m, err = e.reformatValue(dst, src[n:], depth) - if err != nil { - return dst, n + m, wrapWithObjectName(err, quotedName) - } - n += m - - // Append comma or object end. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, io.ErrUnexpectedEOF - } - switch src[n] { - case ',': - dst = append(dst, ',') - if e.Flags.Get(jsonflags.SpaceAfterComma) { - dst = append(dst, ' ') - } - n += len(",") - continue - case '}': - if e.Flags.Get(jsonflags.Multiline) { - dst = e.AppendIndent(dst, depth-1) - } - dst = append(dst, '}') - n += len("}") - return dst, n, nil - default: - return dst, n, jsonwire.NewInvalidCharacterError(src[n:], "after object value (expecting ',' or '}')") - } - } -} - -// reformatArray parses a JSON array from the start of src and -// appends it to the end of dst, reformatting whitespace and strings as needed. -// It returns the extended dst buffer and the number of consumed input bytes. -func (e *encoderState) reformatArray(dst []byte, src Value, depth int) ([]byte, int, error) { - // Append array begin. - if len(src) == 0 || src[0] != '[' { - panic("BUG: reformatArray must be called with a buffer that starts with '['") - } else if depth == maxNestingDepth+1 { - return dst, 0, errMaxDepth - } - dst = append(dst, '[') - n := len("[") - - // Append (possible) array end. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, io.ErrUnexpectedEOF - } - if src[n] == ']' { - dst = append(dst, ']') - n += len("]") - return dst, n, nil - } - - var idx int64 - var err error - depth++ - for { - // Append optional newline and indentation. - if e.Flags.Get(jsonflags.Multiline) { - dst = e.AppendIndent(dst, depth) - } - - // Append array value. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, io.ErrUnexpectedEOF - } - var m int - dst, m, err = e.reformatValue(dst, src[n:], depth) - if err != nil { - return dst, n + m, wrapWithArrayIndex(err, idx) - } - n += m - - // Append comma or array end. - n += jsonwire.ConsumeWhitespace(src[n:]) - if uint(len(src)) <= uint(n) { - return dst, n, io.ErrUnexpectedEOF - } - switch src[n] { - case ',': - dst = append(dst, ',') - if e.Flags.Get(jsonflags.SpaceAfterComma) { - dst = append(dst, ' ') - } - n += len(",") - idx++ - continue - case ']': - if e.Flags.Get(jsonflags.Multiline) { - dst = e.AppendIndent(dst, depth-1) - } - dst = append(dst, ']') - n += len("]") - return dst, n, nil - default: - return dst, n, jsonwire.NewInvalidCharacterError(src[n:], "after array value (expecting ',' or ']')") - } - } -} - -// OutputOffset returns the current output byte offset. It gives the location -// of the next byte immediately after the most recently written token or value. -// The number of bytes actually written to the underlying [io.Writer] may be less -// than this offset due to internal buffering effects. -func (e *Encoder) OutputOffset() int64 { - return e.s.previousOffsetEnd() -} - -// AvailableBuffer returns a zero-length buffer with a possible non-zero capacity. -// This buffer is intended to be used to populate a [Value] -// being passed to an immediately succeeding [Encoder.WriteValue] call. -// -// Example usage: -// -// b := d.AvailableBuffer() -// b = append(b, '"') -// b = appendString(b, v) // append the string formatting of v -// b = append(b, '"') -// ... := d.WriteValue(b) -// -// It is the user's responsibility to ensure that the value is valid JSON. -func (e *Encoder) AvailableBuffer() []byte { - // NOTE: We don't return e.buf[len(e.buf):cap(e.buf)] since WriteValue would - // need to take special care to avoid mangling the data while reformatting. - // WriteValue can't easily identify whether the input Value aliases e.buf - // without using unsafe.Pointer. Thus, we just return a different buffer. - // Should this ever alias e.buf, we need to consider how it operates with - // the specialized performance optimization for bytes.Buffer. - n := 1 << bits.Len(uint(e.s.maxValue|63)) // fast approximation for max length - if cap(e.s.availBuffer) < n { - e.s.availBuffer = make([]byte, 0, n) - } - return e.s.availBuffer -} - -// StackDepth returns the depth of the state machine for written JSON data. -// Each level on the stack represents a nested JSON object or array. -// It is incremented whenever an [BeginObject] or [BeginArray] token is encountered -// and decremented whenever an [EndObject] or [EndArray] token is encountered. -// The depth is zero-indexed, where zero represents the top-level JSON value. -func (e *Encoder) StackDepth() int { - // NOTE: Keep in sync with Decoder.StackDepth. - return e.s.Tokens.Depth() - 1 -} - -// StackIndex returns information about the specified stack level. -// It must be a number between 0 and [Encoder.StackDepth], inclusive. -// For each level, it reports the kind: -// -// - 0 for a level of zero, -// - '{' for a level representing a JSON object, and -// - '[' for a level representing a JSON array. -// -// It also reports the length of that JSON object or array. -// Each name and value in a JSON object is counted separately, -// so the effective number of members would be half the length. -// A complete JSON object must have an even length. -func (e *Encoder) StackIndex(i int) (Kind, int64) { - // NOTE: Keep in sync with Decoder.StackIndex. - switch s := e.s.Tokens.index(i); { - case i > 0 && s.isObject(): - return '{', s.Length() - case i > 0 && s.isArray(): - return '[', s.Length() - default: - return 0, s.Length() - } -} - -// StackPointer returns a JSON Pointer (RFC 6901) to the most recently written value. -func (e *Encoder) StackPointer() Pointer { - return Pointer(e.s.AppendStackPointer(nil, -1)) -} - -func (e *encoderState) AppendStackPointer(b []byte, where int) []byte { - e.Names.copyQuotedBuffer(e.Buf) - return e.state.appendStackPointer(b, where) -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/errors.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/errors.go deleted file mode 100644 index 1af86d5b6..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/errors.go +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "bytes" - "io" - "strconv" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -const errorPrefix = "jsontext: " - -type ioError struct { - action string // either "read" or "write" - err error -} - -func (e *ioError) Error() string { - return errorPrefix + e.action + " error: " + e.err.Error() -} -func (e *ioError) Unwrap() error { - return e.err -} - -// SyntacticError is a description of a syntactic error that occurred when -// encoding or decoding JSON according to the grammar. -// -// The contents of this error as produced by this package may change over time. -type SyntacticError struct { - requireKeyedLiterals - nonComparable - - // ByteOffset indicates that an error occurred after this byte offset. - ByteOffset int64 - // JSONPointer indicates that an error occurred within this JSON value - // as indicated using the JSON Pointer notation (see RFC 6901). - JSONPointer Pointer - - // Err is the underlying error. - Err error -} - -// wrapSyntacticError wraps an error and annotates it with a precise location -// using the provided [encoderState] or [decoderState]. -// If err is an [ioError] or [io.EOF], then it is not wrapped. -// -// It takes a relative offset pos that can be resolved into -// an absolute offset using state.offsetAt. -// -// It takes a where that specify how the JSON pointer is derived. -// If the underlying error is a [pointerSuffixError], -// then the suffix is appended to the derived pointer. -func wrapSyntacticError(state interface { - offsetAt(pos int) int64 - AppendStackPointer(b []byte, where int) []byte -}, err error, pos, where int) error { - if _, ok := err.(*ioError); err == io.EOF || ok { - return err - } - offset := state.offsetAt(pos) - ptr := state.AppendStackPointer(nil, where) - if serr, ok := err.(*pointerSuffixError); ok { - ptr = serr.appendPointer(ptr) - err = serr.error - } - if d, ok := state.(*decoderState); ok && err == errMismatchDelim { - where := "at start of value" - if len(d.Tokens.Stack) > 0 && d.Tokens.Last.Length() > 0 { - switch { - case d.Tokens.Last.isArray(): - where = "after array element (expecting ',' or ']')" - ptr = []byte(Pointer(ptr).Parent()) // problem is with parent array - case d.Tokens.Last.isObject(): - where = "after object value (expecting ',' or '}')" - ptr = []byte(Pointer(ptr).Parent()) // problem is with parent object - } - } - err = jsonwire.NewInvalidCharacterError(d.buf[pos:], where) - } - return &SyntacticError{ByteOffset: offset, JSONPointer: Pointer(ptr), Err: err} -} - -func (e *SyntacticError) Error() string { - pointer := e.JSONPointer - offset := e.ByteOffset - b := []byte(errorPrefix) - if e.Err != nil { - b = append(b, e.Err.Error()...) - if e.Err == ErrDuplicateName { - b = strconv.AppendQuote(append(b, ' '), pointer.LastToken()) - pointer = pointer.Parent() - offset = 0 // not useful to print offset for duplicate names - } - } else { - b = append(b, "syntactic error"...) - } - if pointer != "" { - b = strconv.AppendQuote(append(b, " within "...), jsonwire.TruncatePointer(string(pointer), 100)) - } - if offset > 0 { - b = strconv.AppendInt(append(b, " after offset "...), offset, 10) - } - return string(b) -} - -func (e *SyntacticError) Unwrap() error { - return e.Err -} - -// pointerSuffixError represents a JSON pointer suffix to be appended -// to [SyntacticError.JSONPointer]. It is an internal error type -// used within this package and does not appear in the public API. -// -// This type is primarily used to annotate errors in Encoder.WriteValue -// and Decoder.ReadValue with precise positions. -// At the time WriteValue or ReadValue is called, a JSON pointer to the -// upcoming value can be constructed using the Encoder/Decoder state. -// However, tracking pointers within values during normal operation -// would incur a performance penalty in the error-free case. -// -// To provide precise error locations without this overhead, -// the error is wrapped with object names or array indices -// as the call stack is popped when an error occurs. -// Since this happens in reverse order, pointerSuffixError holds -// the pointer in reverse and is only later reversed when appending to -// the pointer prefix. -// -// For example, if the encoder is at "/alpha/bravo/charlie" -// and an error occurs in WriteValue at "/xray/yankee/zulu", then -// the final pointer should be "/alpha/bravo/charlie/xray/yankee/zulu". -// -// As pointerSuffixError is populated during the error return path, -// it first contains "/zulu", then "/zulu/yankee", -// and finally "/zulu/yankee/xray". -// These tokens are reversed and concatenated to "/alpha/bravo/charlie" -// to form the full pointer. -type pointerSuffixError struct { - error - - // reversePointer is a JSON pointer, but with each token in reverse order. - reversePointer []byte -} - -// wrapWithObjectName wraps err with a JSON object name access, -// which must be a valid quoted JSON string. -func wrapWithObjectName(err error, quotedName []byte) error { - serr, _ := err.(*pointerSuffixError) - if serr == nil { - serr = &pointerSuffixError{error: err} - } - name := jsonwire.UnquoteMayCopy(quotedName, false) - serr.reversePointer = appendEscapePointerName(append(serr.reversePointer, '/'), name) - return serr -} - -// wrapWithArrayIndex wraps err with a JSON array index access. -func wrapWithArrayIndex(err error, index int64) error { - serr, _ := err.(*pointerSuffixError) - if serr == nil { - serr = &pointerSuffixError{error: err} - } - serr.reversePointer = strconv.AppendUint(append(serr.reversePointer, '/'), uint64(index), 10) - return serr -} - -// appendPointer appends the path encoded in e to the end of pointer. -func (e *pointerSuffixError) appendPointer(pointer []byte) []byte { - // Copy each token in reversePointer to the end of pointer in reverse order. - // Double reversal means that the appended suffix is now in forward order. - bi, bo := e.reversePointer, pointer - for len(bi) > 0 { - i := bytes.LastIndexByte(bi, '/') - bi, bo = bi[:i], append(bo, bi[i:]...) - } - return bo -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/export.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/export.go deleted file mode 100644 index b30bb99ed..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/export.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "io" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" -) - -// Internal is for internal use only. -// This is exempt from the Go compatibility agreement. -var Internal exporter - -type exporter struct{} - -// Export exposes internal functionality from "jsontext" to "json". -// This cannot be dynamically called by other packages since -// they cannot obtain a reference to the internal.AllowInternalUse value. -func (exporter) Export(p *internal.NotForPublicUse) export { - if p != &internal.AllowInternalUse { - panic("unauthorized call to Export") - } - return export{} -} - -// The export type exposes functionality to packages with visibility to -// the internal.AllowInternalUse variable. The "json" package uses this -// to modify low-level state in the Encoder and Decoder types. -// It mutates the state directly instead of calling ReadToken or WriteToken -// since this is more performant. The public APIs need to track state to ensure -// that users are constructing a valid JSON value, but the "json" implementation -// guarantees that it emits valid JSON by the structure of the code itself. -type export struct{} - -// Encoder returns a pointer to the underlying encoderState. -func (export) Encoder(e *Encoder) *encoderState { return &e.s } - -// Decoder returns a pointer to the underlying decoderState. -func (export) Decoder(d *Decoder) *decoderState { return &d.s } - -func (export) GetBufferedEncoder(o ...Options) *Encoder { - return getBufferedEncoder(o...) -} -func (export) PutBufferedEncoder(e *Encoder) { - putBufferedEncoder(e) -} - -func (export) GetStreamingEncoder(w io.Writer, o ...Options) *Encoder { - return getStreamingEncoder(w, o...) -} -func (export) PutStreamingEncoder(e *Encoder) { - putStreamingEncoder(e) -} - -func (export) GetBufferedDecoder(b []byte, o ...Options) *Decoder { - return getBufferedDecoder(b, o...) -} -func (export) PutBufferedDecoder(d *Decoder) { - putBufferedDecoder(d) -} - -func (export) GetStreamingDecoder(r io.Reader, o ...Options) *Decoder { - return getStreamingDecoder(r, o...) -} -func (export) PutStreamingDecoder(d *Decoder) { - putStreamingDecoder(d) -} - -func (export) IsIOError(err error) bool { - _, ok := err.(*ioError) - return ok -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/options.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/options.go deleted file mode 100644 index e973b58d6..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/options.go +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "strings" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// Options configures [NewEncoder], [Encoder.Reset], [NewDecoder], -// and [Decoder.Reset] with specific features. -// Each function takes in a variadic list of options, where properties -// set in latter options override the value of previously set properties. -// -// There is a single Options type, which is used with both encoding and decoding. -// Some options affect both operations, while others only affect one operation: -// -// - [AllowDuplicateNames] affects encoding and decoding -// - [AllowInvalidUTF8] affects encoding and decoding -// - [EscapeForHTML] affects encoding only -// - [EscapeForJS] affects encoding only -// - [PreserveRawStrings] affects encoding only -// - [CanonicalizeRawInts] affects encoding only -// - [CanonicalizeRawFloats] affects encoding only -// - [ReorderRawObjects] affects encoding only -// - [SpaceAfterColon] affects encoding only -// - [SpaceAfterComma] affects encoding only -// - [Multiline] affects encoding only -// - [WithIndent] affects encoding only -// - [WithIndentPrefix] affects encoding only -// -// Options that do not affect a particular operation are ignored. -// -// The Options type is identical to [encoding/json.Options] and -// [encoding/json/v2.Options]. Options from the other packages may -// be passed to functionality in this package, but are ignored. -// Options from this package may be used with the other packages. -type Options = jsonopts.Options - -// AllowDuplicateNames specifies that JSON objects may contain -// duplicate member names. Disabling the duplicate name check may provide -// performance benefits, but breaks compliance with RFC 7493, section 2.3. -// The input or output will still be compliant with RFC 8259, -// which leaves the handling of duplicate names as unspecified behavior. -// -// This affects either encoding or decoding. -func AllowDuplicateNames(v bool) Options { - if v { - return jsonflags.AllowDuplicateNames | 1 - } else { - return jsonflags.AllowDuplicateNames | 0 - } -} - -// AllowInvalidUTF8 specifies that JSON strings may contain invalid UTF-8, -// which will be mangled as the Unicode replacement character, U+FFFD. -// This causes the encoder or decoder to break compliance with -// RFC 7493, section 2.1, and RFC 8259, section 8.1. -// -// This affects either encoding or decoding. -func AllowInvalidUTF8(v bool) Options { - if v { - return jsonflags.AllowInvalidUTF8 | 1 - } else { - return jsonflags.AllowInvalidUTF8 | 0 - } -} - -// EscapeForHTML specifies that '<', '>', and '&' characters within JSON strings -// should be escaped as a hexadecimal Unicode codepoint (e.g., \u003c) so that -// the output is safe to embed within HTML. -// -// This only affects encoding and is ignored when decoding. -func EscapeForHTML(v bool) Options { - if v { - return jsonflags.EscapeForHTML | 1 - } else { - return jsonflags.EscapeForHTML | 0 - } -} - -// EscapeForJS specifies that U+2028 and U+2029 characters within JSON strings -// should be escaped as a hexadecimal Unicode codepoint (e.g., \u2028) so that -// the output is valid to embed within JavaScript. See RFC 8259, section 12. -// -// This only affects encoding and is ignored when decoding. -func EscapeForJS(v bool) Options { - if v { - return jsonflags.EscapeForJS | 1 - } else { - return jsonflags.EscapeForJS | 0 - } -} - -// PreserveRawStrings specifies that when encoding a raw JSON string in a -// [Token] or [Value], pre-escaped sequences -// in a JSON string are preserved to the output. -// However, raw strings still respect [EscapeForHTML] and [EscapeForJS] -// such that the relevant characters are escaped. -// If [AllowInvalidUTF8] is enabled, bytes of invalid UTF-8 -// are preserved to the output. -// -// This only affects encoding and is ignored when decoding. -func PreserveRawStrings(v bool) Options { - if v { - return jsonflags.PreserveRawStrings | 1 - } else { - return jsonflags.PreserveRawStrings | 0 - } -} - -// CanonicalizeRawInts specifies that when encoding a raw JSON -// integer number (i.e., a number without a fraction and exponent) in a -// [Token] or [Value], the number is canonicalized -// according to RFC 8785, section 3.2.2.3. As a special case, -// the number -0 is canonicalized as 0. -// -// JSON numbers are treated as IEEE 754 double precision numbers. -// Any numbers with precision beyond what is representable by that form -// will lose their precision when canonicalized. For example, -// integer values beyond ±2⁵³ will lose their precision. -// For example, 1234567890123456789 is formatted as 1234567890123456800. -// -// This only affects encoding and is ignored when decoding. -func CanonicalizeRawInts(v bool) Options { - if v { - return jsonflags.CanonicalizeRawInts | 1 - } else { - return jsonflags.CanonicalizeRawInts | 0 - } -} - -// CanonicalizeRawFloats specifies that when encoding a raw JSON -// floating-point number (i.e., a number with a fraction or exponent) in a -// [Token] or [Value], the number is canonicalized -// according to RFC 8785, section 3.2.2.3. As a special case, -// the number -0 is canonicalized as 0. -// -// JSON numbers are treated as IEEE 754 double precision numbers. -// It is safe to canonicalize a serialized single precision number and -// parse it back as a single precision number and expect the same value. -// If a number exceeds ±1.7976931348623157e+308, which is the maximum -// finite number, then it saturated at that value and formatted as such. -// -// This only affects encoding and is ignored when decoding. -func CanonicalizeRawFloats(v bool) Options { - if v { - return jsonflags.CanonicalizeRawFloats | 1 - } else { - return jsonflags.CanonicalizeRawFloats | 0 - } -} - -// ReorderRawObjects specifies that when encoding a raw JSON object in a -// [Value], the object members are reordered according to -// RFC 8785, section 3.2.3. -// -// This only affects encoding and is ignored when decoding. -func ReorderRawObjects(v bool) Options { - if v { - return jsonflags.ReorderRawObjects | 1 - } else { - return jsonflags.ReorderRawObjects | 0 - } -} - -// SpaceAfterColon specifies that the JSON output should emit a space character -// after each colon separator following a JSON object name. -// If false, then no space character appears after the colon separator. -// -// This only affects encoding and is ignored when decoding. -func SpaceAfterColon(v bool) Options { - if v { - return jsonflags.SpaceAfterColon | 1 - } else { - return jsonflags.SpaceAfterColon | 0 - } -} - -// SpaceAfterComma specifies that the JSON output should emit a space character -// after each comma separator following a JSON object value or array element. -// If false, then no space character appears after the comma separator. -// -// This only affects encoding and is ignored when decoding. -func SpaceAfterComma(v bool) Options { - if v { - return jsonflags.SpaceAfterComma | 1 - } else { - return jsonflags.SpaceAfterComma | 0 - } -} - -// Multiline specifies that the JSON output should expand to multiple lines, -// where every JSON object member or JSON array element appears on -// a new, indented line according to the nesting depth. -// -// If [SpaceAfterColon] is not specified, then the default is true. -// If [SpaceAfterComma] is not specified, then the default is false. -// If [WithIndent] is not specified, then the default is "\t". -// -// If set to false, then the output is a single-line, -// where the only whitespace emitted is determined by the current -// values of [SpaceAfterColon] and [SpaceAfterComma]. -// -// This only affects encoding and is ignored when decoding. -func Multiline(v bool) Options { - if v { - return jsonflags.Multiline | 1 - } else { - return jsonflags.Multiline | 0 - } -} - -// WithIndent specifies that the encoder should emit multiline output -// where each element in a JSON object or array begins on a new, indented line -// beginning with the indent prefix (see [WithIndentPrefix]) -// followed by one or more copies of indent according to the nesting depth. -// The indent must only be composed of space or tab characters. -// -// If the intent to emit indented output without a preference for -// the particular indent string, then use [Multiline] instead. -// -// This only affects encoding and is ignored when decoding. -// Use of this option implies [Multiline] being set to true. -func WithIndent(indent string) Options { - // Fast-path: Return a constant for common indents, which avoids allocating. - // These are derived from analyzing the Go module proxy on 2023-07-01. - switch indent { - case "\t": - return jsonopts.Indent("\t") // ~14k usages - case " ": - return jsonopts.Indent(" ") // ~18k usages - case " ": - return jsonopts.Indent(" ") // ~1.7k usages - case " ": - return jsonopts.Indent(" ") // ~52k usages - case " ": - return jsonopts.Indent(" ") // ~12k usages - case "": - return jsonopts.Indent("") // ~1.5k usages - } - - // Otherwise, allocate for this unique value. - if s := strings.Trim(indent, " \t"); len(s) > 0 { - panic("json: invalid character " + jsonwire.QuoteRune(s) + " in indent") - } - return jsonopts.Indent(indent) -} - -// WithIndentPrefix specifies that the encoder should emit multiline output -// where each element in a JSON object or array begins on a new, indented line -// beginning with the indent prefix followed by one or more copies of indent -// (see [WithIndent]) according to the nesting depth. -// The prefix must only be composed of space or tab characters. -// -// This only affects encoding and is ignored when decoding. -// Use of this option implies [Multiline] being set to true. -func WithIndentPrefix(prefix string) Options { - if s := strings.Trim(prefix, " \t"); len(s) > 0 { - panic("json: invalid character " + jsonwire.QuoteRune(s) + " in indent prefix") - } - return jsonopts.IndentPrefix(prefix) -} - -/* -// TODO(https://go.dev/issue/56733): Implement WithByteLimit and WithDepthLimit. -// Remember to also update the "Security Considerations" section. - -// WithByteLimit sets a limit on the number of bytes of input or output bytes -// that may be consumed or produced for each top-level JSON value. -// If a [Decoder] or [Encoder] method call would need to consume/produce -// more than a total of n bytes to make progress on the top-level JSON value, -// then the call will report an error. -// Whitespace before and within the top-level value are counted against the limit. -// Whitespace after a top-level value are counted against the limit -// for the next top-level value. -// -// A non-positive limit is equivalent to no limit at all. -// If unspecified, the default limit is no limit at all. -// This affects either encoding or decoding. -func WithByteLimit(n int64) Options { - return jsonopts.ByteLimit(max(n, 0)) -} - -// WithDepthLimit sets a limit on the maximum depth of JSON nesting -// that may be consumed or produced for each top-level JSON value. -// If a [Decoder] or [Encoder] method call would need to consume or produce -// a depth greater than n to make progress on the top-level JSON value, -// then the call will report an error. -// -// A non-positive limit is equivalent to no limit at all. -// If unspecified, the default limit is 10000. -// This affects either encoding or decoding. -func WithDepthLimit(n int) Options { - return jsonopts.DepthLimit(max(n, 0)) -} -*/ diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/pools.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/pools.go deleted file mode 100644 index 63941baac..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/pools.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "bytes" - "io" - "math/bits" - "sync" -) - -// TODO(https://go.dev/issue/47657): Use sync.PoolOf. - -var ( - // This owns the internal buffer since there is no io.Writer to output to. - // Since the buffer can get arbitrarily large in normal usage, - // there is statistical tracking logic to determine whether to recycle - // the internal buffer or not based on a history of utilization. - bufferedEncoderPool = &sync.Pool{New: func() any { return new(Encoder) }} - - // This owns the internal buffer, but it is only used to temporarily store - // buffered JSON before flushing it to the underlying io.Writer. - // In a sufficiently efficient streaming mode, we do not expect the buffer - // to grow arbitrarily large. Thus, we avoid recycling large buffers. - streamingEncoderPool = &sync.Pool{New: func() any { return new(Encoder) }} - - // This does not own the internal buffer since - // it is taken directly from the provided bytes.Buffer. - bytesBufferEncoderPool = &sync.Pool{New: func() any { return new(Encoder) }} -) - -// bufferStatistics is statistics to track buffer utilization. -// It is used to determine whether to recycle a buffer or not -// to avoid https://go.dev/issue/23199. -type bufferStatistics struct { - strikes int // number of times the buffer was under-utilized - prevLen int // length of previous buffer -} - -func getBufferedEncoder(opts ...Options) *Encoder { - e := bufferedEncoderPool.Get().(*Encoder) - if e.s.Buf == nil { - // Round up to nearest 2ⁿ to make best use of malloc size classes. - // See runtime/sizeclasses.go on Go1.15. - // Logical OR with 63 to ensure 64 as the minimum buffer size. - n := 1 << bits.Len(uint(e.s.bufStats.prevLen|63)) - e.s.Buf = make([]byte, 0, n) - } - e.s.reset(e.s.Buf[:0], nil, opts...) - return e -} -func putBufferedEncoder(e *Encoder) { - // Recycle large buffers only if sufficiently utilized. - // If a buffer is under-utilized enough times sequentially, - // then it is discarded, ensuring that a single large buffer - // won't be kept alive by a continuous stream of small usages. - // - // The worst case utilization is computed as: - // MIN_UTILIZATION_THRESHOLD / (1 + MAX_NUM_STRIKES) - // - // For the constants chosen below, this is (25%)/(1+4) ⇒ 5%. - // This may seem low, but it ensures a lower bound on - // the absolute worst-case utilization. Without this check, - // this would be theoretically 0%, which is infinitely worse. - // - // See https://go.dev/issue/27735. - switch { - case cap(e.s.Buf) <= 4<<10: // always recycle buffers smaller than 4KiB - e.s.bufStats.strikes = 0 - case cap(e.s.Buf)/4 <= len(e.s.Buf): // at least 25% utilization - e.s.bufStats.strikes = 0 - case e.s.bufStats.strikes < 4: // at most 4 strikes - e.s.bufStats.strikes++ - default: // discard the buffer; too large and too often under-utilized - e.s.bufStats.strikes = 0 - e.s.bufStats.prevLen = len(e.s.Buf) // heuristic for size to allocate next time - e.s.Buf = nil - } - bufferedEncoderPool.Put(e) -} - -func getStreamingEncoder(w io.Writer, opts ...Options) *Encoder { - if _, ok := w.(*bytes.Buffer); ok { - e := bytesBufferEncoderPool.Get().(*Encoder) - e.s.reset(nil, w, opts...) // buffer taken from bytes.Buffer - return e - } else { - e := streamingEncoderPool.Get().(*Encoder) - e.s.reset(e.s.Buf[:0], w, opts...) // preserve existing buffer - return e - } -} -func putStreamingEncoder(e *Encoder) { - if _, ok := e.s.wr.(*bytes.Buffer); ok { - bytesBufferEncoderPool.Put(e) - } else { - if cap(e.s.Buf) > 64<<10 { - e.s.Buf = nil // avoid pinning arbitrarily large amounts of memory - } - streamingEncoderPool.Put(e) - } -} - -var ( - // This does not own the internal buffer since it is externally provided. - bufferedDecoderPool = &sync.Pool{New: func() any { return new(Decoder) }} - - // This owns the internal buffer, but it is only used to temporarily store - // buffered JSON fetched from the underlying io.Reader. - // In a sufficiently efficient streaming mode, we do not expect the buffer - // to grow arbitrarily large. Thus, we avoid recycling large buffers. - streamingDecoderPool = &sync.Pool{New: func() any { return new(Decoder) }} - - // This does not own the internal buffer since - // it is taken directly from the provided bytes.Buffer. - bytesBufferDecoderPool = bufferedDecoderPool -) - -func getBufferedDecoder(b []byte, opts ...Options) *Decoder { - d := bufferedDecoderPool.Get().(*Decoder) - d.s.reset(b, nil, opts...) - return d -} -func putBufferedDecoder(d *Decoder) { - bufferedDecoderPool.Put(d) -} - -func getStreamingDecoder(r io.Reader, opts ...Options) *Decoder { - if _, ok := r.(*bytes.Buffer); ok { - d := bytesBufferDecoderPool.Get().(*Decoder) - d.s.reset(nil, r, opts...) // buffer taken from bytes.Buffer - return d - } else { - d := streamingDecoderPool.Get().(*Decoder) - d.s.reset(d.s.buf[:0], r, opts...) // preserve existing buffer - return d - } -} -func putStreamingDecoder(d *Decoder) { - if _, ok := d.s.rd.(*bytes.Buffer); ok { - bytesBufferDecoderPool.Put(d) - } else { - if cap(d.s.buf) > 64<<10 { - d.s.buf = nil // avoid pinning arbitrarily large amounts of memory - } - streamingDecoderPool.Put(d) - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/quote.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/quote.go deleted file mode 100644 index 77897b43f..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/quote.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// AppendQuote appends a double-quoted JSON string literal representing src -// to dst and returns the extended buffer. -// It uses the minimal string representation per RFC 8785, section 3.2.2.2. -// Invalid UTF-8 bytes are replaced with the Unicode replacement character -// and an error is returned at the end indicating the presence of invalid UTF-8. -// The dst must not overlap with the src. -func AppendQuote[Bytes ~[]byte | ~string](dst []byte, src Bytes) ([]byte, error) { - dst, err := jsonwire.AppendQuote(dst, src, &jsonflags.Flags{}) - if err != nil { - err = &SyntacticError{Err: err} - } - return dst, err -} - -// AppendUnquote appends the decoded interpretation of src as a -// double-quoted JSON string literal to dst and returns the extended buffer. -// The input src must be a JSON string without any surrounding whitespace. -// Invalid UTF-8 bytes are replaced with the Unicode replacement character -// and an error is returned at the end indicating the presence of invalid UTF-8. -// Any trailing bytes after the JSON string literal results in an error. -// The dst must not overlap with the src. -func AppendUnquote[Bytes ~[]byte | ~string](dst []byte, src Bytes) ([]byte, error) { - dst, err := jsonwire.AppendUnquote(dst, src) - if err != nil { - err = &SyntacticError{Err: err} - } - return dst, err -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/state.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/state.go deleted file mode 100644 index fdbfd5d3d..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/state.go +++ /dev/null @@ -1,826 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "errors" - "iter" - "math" - "strconv" - "strings" - "unicode/utf8" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// ErrDuplicateName indicates that a JSON token could not be -// encoded or decoded because it results in a duplicate JSON object name. -// This error is directly wrapped within a [SyntacticError] when produced. -// -// The name of a duplicate JSON object member can be extracted as: -// -// err := ... -// var serr jsontext.SyntacticError -// if errors.As(err, &serr) && serr.Err == jsontext.ErrDuplicateName { -// ptr := serr.JSONPointer // JSON pointer to duplicate name -// name := ptr.LastToken() // duplicate name itself -// ... -// } -// -// This error is only returned if [AllowDuplicateNames] is false. -var ErrDuplicateName = errors.New("duplicate object member name") - -// ErrNonStringName indicates that a JSON token could not be -// encoded or decoded because it is not a string, -// as required for JSON object names according to RFC 8259, section 4. -// This error is directly wrapped within a [SyntacticError] when produced. -var ErrNonStringName = errors.New("object member name must be a string") - -var ( - errMissingValue = errors.New("missing value after object name") - errMismatchDelim = errors.New("mismatching structural token for object or array") - errMaxDepth = errors.New("exceeded max depth") - - errInvalidNamespace = errors.New("object namespace is in an invalid state") -) - -// Per RFC 8259, section 9, implementations may enforce a maximum depth. -// Such a limit is necessary to prevent stack overflows. -const maxNestingDepth = 10000 - -type state struct { - // Tokens validates whether the next token kind is valid. - Tokens stateMachine - - // Names is a stack of object names. - Names objectNameStack - - // Namespaces is a stack of object namespaces. - // For performance reasons, Encoder or Decoder may not update this - // if Marshal or Unmarshal is able to track names in a more efficient way. - // See makeMapArshaler and makeStructArshaler. - // Not used if AllowDuplicateNames is true. - Namespaces objectNamespaceStack -} - -// needObjectValue reports whether the next token should be an object value. -// This method is used by [wrapSyntacticError]. -func (s *state) needObjectValue() bool { - return s.Tokens.Last.needObjectValue() -} - -func (s *state) reset() { - s.Tokens.reset() - s.Names.reset() - s.Namespaces.reset() -} - -// Pointer is a JSON Pointer (RFC 6901) that references a particular JSON value -// relative to the root of the top-level JSON value. -// -// A Pointer is a slash-separated list of tokens, where each token is -// either a JSON object name or an index to a JSON array element -// encoded as a base-10 integer value. -// It is impossible to distinguish between an array index and an object name -// (that happens to be an base-10 encoded integer) without also knowing -// the structure of the top-level JSON value that the pointer refers to. -// -// There is exactly one representation of a pointer to a particular value, -// so comparability of Pointer values is equivalent to checking whether -// they both point to the exact same value. -type Pointer string - -// IsValid reports whether p is a valid JSON Pointer according to RFC 6901. -// Note that the concatenation of two valid pointers produces a valid pointer. -func (p Pointer) IsValid() bool { - for i, r := range p { - switch { - case r == '~' && (i+1 == len(p) || (p[i+1] != '0' && p[i+1] != '1')): - return false // invalid escape - case r == '\ufffd' && !strings.HasPrefix(string(p[i:]), "\ufffd"): - return false // invalid UTF-8 - } - } - return len(p) == 0 || p[0] == '/' -} - -// Contains reports whether the JSON value that p points to -// is equal to or contains the JSON value that pc points to. -func (p Pointer) Contains(pc Pointer) bool { - // Invariant: len(p) <= len(pc) if p.Contains(pc) - suffix, ok := strings.CutPrefix(string(pc), string(p)) - return ok && (suffix == "" || suffix[0] == '/') -} - -// Parent strips off the last token and returns the remaining pointer. -// The parent of an empty p is an empty string. -func (p Pointer) Parent() Pointer { - return p[:max(strings.LastIndexByte(string(p), '/'), 0)] -} - -// LastToken returns the last token in the pointer. -// The last token of an empty p is an empty string. -func (p Pointer) LastToken() string { - last := p[max(strings.LastIndexByte(string(p), '/'), 0):] - return unescapePointerToken(strings.TrimPrefix(string(last), "/")) -} - -// AppendToken appends a token to the end of p and returns the full pointer. -func (p Pointer) AppendToken(tok string) Pointer { - return Pointer(appendEscapePointerName([]byte(p+"/"), tok)) -} - -// TODO: Add Pointer.AppendTokens, -// but should this take in a ...string or an iter.Seq[string]? - -// Tokens returns an iterator over the reference tokens in the JSON pointer, -// starting from the first token until the last token (unless stopped early). -func (p Pointer) Tokens() iter.Seq[string] { - return func(yield func(string) bool) { - for len(p) > 0 { - p = Pointer(strings.TrimPrefix(string(p), "/")) - i := min(uint(strings.IndexByte(string(p), '/')), uint(len(p))) - if !yield(unescapePointerToken(string(p)[:i])) { - return - } - p = p[i:] - } - } -} - -func unescapePointerToken(token string) string { - if strings.Contains(token, "~") { - // Per RFC 6901, section 3, unescape '~' and '/' characters. - token = strings.ReplaceAll(token, "~1", "/") - token = strings.ReplaceAll(token, "~0", "~") - } - return token -} - -// appendStackPointer appends a JSON Pointer (RFC 6901) to the current value. -// -// - If where is -1, then it points to the previously processed token. -// -// - If where is 0, then it points to the parent JSON object or array, -// or an object member if in-between an object member key and value. -// This is useful when the position is ambiguous whether -// we are interested in the previous or next token, or -// when we are uncertain whether the next token -// continues or terminates the current object or array. -// -// - If where is +1, then it points to the next expected value, -// assuming that it continues the current JSON object or array. -// As a special case, if the next token is a JSON object name, -// then it points to the parent JSON object. -// -// Invariant: Must call s.names.copyQuotedBuffer beforehand. -func (s state) appendStackPointer(b []byte, where int) []byte { - var objectDepth int - for i := 1; i < s.Tokens.Depth(); i++ { - e := s.Tokens.index(i) - arrayDelta := -1 // by default point to previous array element - if isLast := i == s.Tokens.Depth()-1; isLast { - switch { - case where < 0 && e.Length() == 0 || where == 0 && !e.needObjectValue() || where > 0 && e.NeedObjectName(): - return b - case where > 0 && e.isArray(): - arrayDelta = 0 // point to next array element - } - } - switch { - case e.isObject(): - b = appendEscapePointerName(append(b, '/'), s.Names.getUnquoted(objectDepth)) - objectDepth++ - case e.isArray(): - b = strconv.AppendUint(append(b, '/'), uint64(e.Length()+int64(arrayDelta)), 10) - } - } - return b -} - -func appendEscapePointerName[Bytes ~[]byte | ~string](b []byte, name Bytes) []byte { - for _, r := range string(name) { - // Per RFC 6901, section 3, escape '~' and '/' characters. - switch r { - case '~': - b = append(b, "~0"...) - case '/': - b = append(b, "~1"...) - default: - b = utf8.AppendRune(b, r) - } - } - return b -} - -// stateMachine is a push-down automaton that validates whether -// a sequence of tokens is valid or not according to the JSON grammar. -// It is useful for both encoding and decoding. -// -// It is a stack where each entry represents a nested JSON object or array. -// The stack has a minimum depth of 1 where the first level is a -// virtual JSON array to handle a stream of top-level JSON values. -// The top-level virtual JSON array is special in that it doesn't require commas -// between each JSON value. -// -// For performance, most methods are carefully written to be inlinable. -// The zero value is a valid state machine ready for use. -type stateMachine struct { - Stack []stateEntry - Last stateEntry -} - -// reset resets the state machine. -// The machine always starts with a minimum depth of 1. -func (m *stateMachine) reset() { - m.Stack = m.Stack[:0] - if cap(m.Stack) > 1<<10 { - m.Stack = nil - } - m.Last = stateTypeArray -} - -// Depth is the current nested depth of JSON objects and arrays. -// It is one-indexed (i.e., top-level values have a depth of 1). -func (m stateMachine) Depth() int { - return len(m.Stack) + 1 -} - -// index returns a reference to the ith entry. -// It is only valid until the next push method call. -func (m *stateMachine) index(i int) *stateEntry { - if i == len(m.Stack) { - return &m.Last - } - return &m.Stack[i] -} - -// DepthLength reports the current nested depth and -// the length of the last JSON object or array. -func (m stateMachine) DepthLength() (int, int64) { - return m.Depth(), m.Last.Length() -} - -// appendLiteral appends a JSON literal as the next token in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) appendLiteral() error { - switch { - case m.Last.NeedObjectName(): - return ErrNonStringName - case !m.Last.isValidNamespace(): - return errInvalidNamespace - default: - m.Last.Increment() - return nil - } -} - -// appendString appends a JSON string as the next token in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) appendString() error { - switch { - case !m.Last.isValidNamespace(): - return errInvalidNamespace - default: - m.Last.Increment() - return nil - } -} - -// appendNumber appends a JSON number as the next token in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) appendNumber() error { - return m.appendLiteral() -} - -// pushObject appends a JSON begin object token as next in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) pushObject() error { - switch { - case m.Last.NeedObjectName(): - return ErrNonStringName - case !m.Last.isValidNamespace(): - return errInvalidNamespace - case len(m.Stack) == maxNestingDepth: - return errMaxDepth - default: - m.Last.Increment() - m.Stack = append(m.Stack, m.Last) - m.Last = stateTypeObject - return nil - } -} - -// popObject appends a JSON end object token as next in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) popObject() error { - switch { - case !m.Last.isObject(): - return errMismatchDelim - case m.Last.needObjectValue(): - return errMissingValue - case !m.Last.isValidNamespace(): - return errInvalidNamespace - default: - m.Last = m.Stack[len(m.Stack)-1] - m.Stack = m.Stack[:len(m.Stack)-1] - return nil - } -} - -// pushArray appends a JSON begin array token as next in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) pushArray() error { - switch { - case m.Last.NeedObjectName(): - return ErrNonStringName - case !m.Last.isValidNamespace(): - return errInvalidNamespace - case len(m.Stack) == maxNestingDepth: - return errMaxDepth - default: - m.Last.Increment() - m.Stack = append(m.Stack, m.Last) - m.Last = stateTypeArray - return nil - } -} - -// popArray appends a JSON end array token as next in the sequence. -// If an error is returned, the state is not mutated. -func (m *stateMachine) popArray() error { - switch { - case !m.Last.isArray() || len(m.Stack) == 0: // forbid popping top-level virtual JSON array - return errMismatchDelim - case !m.Last.isValidNamespace(): - return errInvalidNamespace - default: - m.Last = m.Stack[len(m.Stack)-1] - m.Stack = m.Stack[:len(m.Stack)-1] - return nil - } -} - -// NeedIndent reports whether indent whitespace should be injected. -// A zero value means that no whitespace should be injected. -// A positive value means '\n', indentPrefix, and (n-1) copies of indentBody -// should be appended to the output immediately before the next token. -func (m stateMachine) NeedIndent(next Kind) (n int) { - willEnd := next == '}' || next == ']' - switch { - case m.Depth() == 1: - return 0 // top-level values are never indented - case m.Last.Length() == 0 && willEnd: - return 0 // an empty object or array is never indented - case m.Last.Length() == 0 || m.Last.needImplicitComma(next): - return m.Depth() - case willEnd: - return m.Depth() - 1 - default: - return 0 - } -} - -// MayAppendDelim appends a colon or comma that may precede the next token. -func (m stateMachine) MayAppendDelim(b []byte, next Kind) []byte { - switch { - case m.Last.needImplicitColon(): - return append(b, ':') - case m.Last.needImplicitComma(next) && len(m.Stack) != 0: // comma not needed for top-level values - return append(b, ',') - default: - return b - } -} - -// needDelim reports whether a colon or comma token should be implicitly emitted -// before the next token of the specified kind. -// A zero value means no delimiter should be emitted. -func (m stateMachine) needDelim(next Kind) (delim byte) { - switch { - case m.Last.needImplicitColon(): - return ':' - case m.Last.needImplicitComma(next) && len(m.Stack) != 0: // comma not needed for top-level values - return ',' - default: - return 0 - } -} - -// InvalidateDisabledNamespaces marks all disabled namespaces as invalid. -// -// For efficiency, Marshal and Unmarshal may disable namespaces since there are -// more efficient ways to track duplicate names. However, if an error occurs, -// the namespaces in Encoder or Decoder will be left in an inconsistent state. -// Mark the namespaces as invalid so that future method calls on -// Encoder or Decoder will return an error. -func (m *stateMachine) InvalidateDisabledNamespaces() { - for i := range m.Depth() { - e := m.index(i) - if !e.isActiveNamespace() { - e.invalidateNamespace() - } - } -} - -// stateEntry encodes several artifacts within a single unsigned integer: -// - whether this represents a JSON object or array, -// - whether this object should check for duplicate names, and -// - how many elements are in this JSON object or array. -type stateEntry uint64 - -const ( - // The type mask (1 bit) records whether this is a JSON object or array. - stateTypeMask stateEntry = 0x8000_0000_0000_0000 - stateTypeObject stateEntry = 0x8000_0000_0000_0000 - stateTypeArray stateEntry = 0x0000_0000_0000_0000 - - // The name check mask (2 bit) records whether to update - // the namespaces for the current JSON object and - // whether the namespace is valid. - stateNamespaceMask stateEntry = 0x6000_0000_0000_0000 - stateDisableNamespace stateEntry = 0x4000_0000_0000_0000 - stateInvalidNamespace stateEntry = 0x2000_0000_0000_0000 - - // The count mask (61 bits) records the number of elements. - stateCountMask stateEntry = 0x1fff_ffff_ffff_ffff - stateCountLSBMask stateEntry = 0x0000_0000_0000_0001 - stateCountOdd stateEntry = 0x0000_0000_0000_0001 - stateCountEven stateEntry = 0x0000_0000_0000_0000 -) - -// Length reports the number of elements in the JSON object or array. -// Each name and value in an object entry is treated as a separate element. -func (e stateEntry) Length() int64 { - return int64(e & stateCountMask) -} - -// isObject reports whether this is a JSON object. -func (e stateEntry) isObject() bool { - return e&stateTypeMask == stateTypeObject -} - -// isArray reports whether this is a JSON array. -func (e stateEntry) isArray() bool { - return e&stateTypeMask == stateTypeArray -} - -// NeedObjectName reports whether the next token must be a JSON string, -// which is necessary for JSON object names. -func (e stateEntry) NeedObjectName() bool { - return e&(stateTypeMask|stateCountLSBMask) == stateTypeObject|stateCountEven -} - -// needImplicitColon reports whether an colon should occur next, -// which always occurs after JSON object names. -func (e stateEntry) needImplicitColon() bool { - return e.needObjectValue() -} - -// needObjectValue reports whether the next token must be a JSON value, -// which is necessary after every JSON object name. -func (e stateEntry) needObjectValue() bool { - return e&(stateTypeMask|stateCountLSBMask) == stateTypeObject|stateCountOdd -} - -// needImplicitComma reports whether an comma should occur next, -// which always occurs after a value in a JSON object or array -// before the next value (or name). -func (e stateEntry) needImplicitComma(next Kind) bool { - return !e.needObjectValue() && e.Length() > 0 && next != '}' && next != ']' -} - -// Increment increments the number of elements for the current object or array. -// This assumes that overflow won't practically be an issue since -// 1< 0. -func (e *stateEntry) decrement() { - (*e)-- -} - -// DisableNamespace disables the JSON object namespace such that the -// Encoder or Decoder no longer updates the namespace. -func (e *stateEntry) DisableNamespace() { - *e |= stateDisableNamespace -} - -// isActiveNamespace reports whether the JSON object namespace is actively -// being updated and used for duplicate name checks. -func (e stateEntry) isActiveNamespace() bool { - return e&(stateDisableNamespace) == 0 -} - -// invalidateNamespace marks the JSON object namespace as being invalid. -func (e *stateEntry) invalidateNamespace() { - *e |= stateInvalidNamespace -} - -// isValidNamespace reports whether the JSON object namespace is valid. -func (e stateEntry) isValidNamespace() bool { - return e&(stateInvalidNamespace) == 0 -} - -// objectNameStack is a stack of names when descending into a JSON object. -// In contrast to objectNamespaceStack, this only has to remember a single name -// per JSON object. -// -// This data structure may contain offsets to encodeBuffer or decodeBuffer. -// It violates clean abstraction of layers, but is significantly more efficient. -// This ensures that popping and pushing in the common case is a trivial -// push/pop of an offset integer. -// -// The zero value is an empty names stack ready for use. -type objectNameStack struct { - // offsets is a stack of offsets for each name. - // A non-negative offset is the ending offset into the local names buffer. - // A negative offset is the bit-wise inverse of a starting offset into - // a remote buffer (e.g., encodeBuffer or decodeBuffer). - // A math.MinInt offset at the end implies that the last object is empty. - // Invariant: Positive offsets always occur before negative offsets. - offsets []int - // unquotedNames is a back-to-back concatenation of names. - unquotedNames []byte -} - -func (ns *objectNameStack) reset() { - ns.offsets = ns.offsets[:0] - ns.unquotedNames = ns.unquotedNames[:0] - if cap(ns.offsets) > 1<<6 { - ns.offsets = nil // avoid pinning arbitrarily large amounts of memory - } - if cap(ns.unquotedNames) > 1<<10 { - ns.unquotedNames = nil // avoid pinning arbitrarily large amounts of memory - } -} - -func (ns *objectNameStack) length() int { - return len(ns.offsets) -} - -// getUnquoted retrieves the ith unquoted name in the stack. -// It returns an empty string if the last object is empty. -// -// Invariant: Must call copyQuotedBuffer beforehand. -func (ns *objectNameStack) getUnquoted(i int) []byte { - ns.ensureCopiedBuffer() - if i == 0 { - return ns.unquotedNames[:ns.offsets[0]] - } else { - return ns.unquotedNames[ns.offsets[i-1]:ns.offsets[i-0]] - } -} - -// invalidOffset indicates that the last JSON object currently has no name. -const invalidOffset = math.MinInt - -// push descends into a nested JSON object. -func (ns *objectNameStack) push() { - ns.offsets = append(ns.offsets, invalidOffset) -} - -// ReplaceLastQuotedOffset replaces the last name with the starting offset -// to the quoted name in some remote buffer. All offsets provided must be -// relative to the same buffer until copyQuotedBuffer is called. -func (ns *objectNameStack) ReplaceLastQuotedOffset(i int) { - // Use bit-wise inversion instead of naive multiplication by -1 to avoid - // ambiguity regarding zero (which is a valid offset into the names field). - // Bit-wise inversion is mathematically equivalent to -i-1, - // such that 0 becomes -1, 1 becomes -2, and so forth. - // This ensures that remote offsets are always negative. - ns.offsets[len(ns.offsets)-1] = ^i -} - -// replaceLastUnquotedName replaces the last name with the provided name. -// -// Invariant: Must call copyQuotedBuffer beforehand. -func (ns *objectNameStack) replaceLastUnquotedName(s string) { - ns.ensureCopiedBuffer() - var startOffset int - if len(ns.offsets) > 1 { - startOffset = ns.offsets[len(ns.offsets)-2] - } - ns.unquotedNames = append(ns.unquotedNames[:startOffset], s...) - ns.offsets[len(ns.offsets)-1] = len(ns.unquotedNames) -} - -// clearLast removes any name in the last JSON object. -// It is semantically equivalent to ns.push followed by ns.pop. -func (ns *objectNameStack) clearLast() { - ns.offsets[len(ns.offsets)-1] = invalidOffset -} - -// pop ascends out of a nested JSON object. -func (ns *objectNameStack) pop() { - ns.offsets = ns.offsets[:len(ns.offsets)-1] -} - -// copyQuotedBuffer copies names from the remote buffer into the local names -// buffer so that there are no more offset references into the remote buffer. -// This allows the remote buffer to change contents without affecting -// the names that this data structure is trying to remember. -func (ns *objectNameStack) copyQuotedBuffer(b []byte) { - // Find the first negative offset. - var i int - for i = len(ns.offsets) - 1; i >= 0 && ns.offsets[i] < 0; i-- { - continue - } - - // Copy each name from the remote buffer into the local buffer. - for i = i + 1; i < len(ns.offsets); i++ { - if i == len(ns.offsets)-1 && ns.offsets[i] == invalidOffset { - if i == 0 { - ns.offsets[i] = 0 - } else { - ns.offsets[i] = ns.offsets[i-1] - } - break // last JSON object had a push without any names - } - - // As a form of Hyrum proofing, we write an invalid character into the - // buffer to make misuse of Decoder.ReadToken more obvious. - // We need to undo that mutation here. - quotedName := b[^ns.offsets[i]:] - if quotedName[0] == invalidateBufferByte { - quotedName[0] = '"' - } - - // Append the unquoted name to the local buffer. - var startOffset int - if i > 0 { - startOffset = ns.offsets[i-1] - } - if n := jsonwire.ConsumeSimpleString(quotedName); n > 0 { - ns.unquotedNames = append(ns.unquotedNames[:startOffset], quotedName[len(`"`):n-len(`"`)]...) - } else { - ns.unquotedNames, _ = jsonwire.AppendUnquote(ns.unquotedNames[:startOffset], quotedName) - } - ns.offsets[i] = len(ns.unquotedNames) - } -} - -func (ns *objectNameStack) ensureCopiedBuffer() { - if len(ns.offsets) > 0 && ns.offsets[len(ns.offsets)-1] < 0 { - panic("BUG: copyQuotedBuffer not called beforehand") - } -} - -// objectNamespaceStack is a stack of object namespaces. -// This data structure assists in detecting duplicate names. -type objectNamespaceStack []objectNamespace - -// reset resets the object namespace stack. -func (nss *objectNamespaceStack) reset() { - if cap(*nss) > 1<<10 { - *nss = nil - } - *nss = (*nss)[:0] -} - -// push starts a new namespace for a nested JSON object. -func (nss *objectNamespaceStack) push() { - if cap(*nss) > len(*nss) { - *nss = (*nss)[:len(*nss)+1] - nss.Last().reset() - } else { - *nss = append(*nss, objectNamespace{}) - } -} - -// Last returns a pointer to the last JSON object namespace. -func (nss objectNamespaceStack) Last() *objectNamespace { - return &nss[len(nss)-1] -} - -// pop terminates the namespace for a nested JSON object. -func (nss *objectNamespaceStack) pop() { - *nss = (*nss)[:len(*nss)-1] -} - -// objectNamespace is the namespace for a JSON object. -// In contrast to objectNameStack, this needs to remember a all names -// per JSON object. -// -// The zero value is an empty namespace ready for use. -type objectNamespace struct { - // It relies on a linear search over all the names before switching - // to use a Go map for direct lookup. - - // endOffsets is a list of offsets to the end of each name in buffers. - // The length of offsets is the number of names in the namespace. - endOffsets []uint - // allUnquotedNames is a back-to-back concatenation of every name in the namespace. - allUnquotedNames []byte - // mapNames is a Go map containing every name in the namespace. - // Only valid if non-nil. - mapNames map[string]struct{} -} - -// reset resets the namespace to be empty. -func (ns *objectNamespace) reset() { - ns.endOffsets = ns.endOffsets[:0] - ns.allUnquotedNames = ns.allUnquotedNames[:0] - ns.mapNames = nil - if cap(ns.endOffsets) > 1<<6 { - ns.endOffsets = nil // avoid pinning arbitrarily large amounts of memory - } - if cap(ns.allUnquotedNames) > 1<<10 { - ns.allUnquotedNames = nil // avoid pinning arbitrarily large amounts of memory - } -} - -// length reports the number of names in the namespace. -func (ns *objectNamespace) length() int { - return len(ns.endOffsets) -} - -// getUnquoted retrieves the ith unquoted name in the namespace. -func (ns *objectNamespace) getUnquoted(i int) []byte { - if i == 0 { - return ns.allUnquotedNames[:ns.endOffsets[0]] - } else { - return ns.allUnquotedNames[ns.endOffsets[i-1]:ns.endOffsets[i-0]] - } -} - -// lastUnquoted retrieves the last name in the namespace. -func (ns *objectNamespace) lastUnquoted() []byte { - return ns.getUnquoted(ns.length() - 1) -} - -// insertQuoted inserts a name and reports whether it was inserted, -// which only occurs if name is not already in the namespace. -// The provided name must be a valid JSON string. -func (ns *objectNamespace) insertQuoted(name []byte, isVerbatim bool) bool { - if isVerbatim { - name = name[len(`"`) : len(name)-len(`"`)] - } - return ns.insert(name, !isVerbatim) -} -func (ns *objectNamespace) InsertUnquoted(name []byte) bool { - return ns.insert(name, false) -} -func (ns *objectNamespace) insert(name []byte, quoted bool) bool { - var allNames []byte - if quoted { - allNames, _ = jsonwire.AppendUnquote(ns.allUnquotedNames, name) - } else { - allNames = append(ns.allUnquotedNames, name...) - } - name = allNames[len(ns.allUnquotedNames):] - - // Switch to a map if the buffer is too large for linear search. - // This does not add the current name to the map. - if ns.mapNames == nil && (ns.length() > 64 || len(ns.allUnquotedNames) > 1024) { - ns.mapNames = make(map[string]struct{}) - var startOffset uint - for _, endOffset := range ns.endOffsets { - name := ns.allUnquotedNames[startOffset:endOffset] - ns.mapNames[string(name)] = struct{}{} // allocates a new string - startOffset = endOffset - } - } - - if ns.mapNames == nil { - // Perform linear search over the buffer to find matching names. - // It provides O(n) lookup, but does not require any allocations. - var startOffset uint - for _, endOffset := range ns.endOffsets { - if string(ns.allUnquotedNames[startOffset:endOffset]) == string(name) { - return false - } - startOffset = endOffset - } - } else { - // Use the map if it is populated. - // It provides O(1) lookup, but requires a string allocation per name. - if _, ok := ns.mapNames[string(name)]; ok { - return false - } - ns.mapNames[string(name)] = struct{}{} // allocates a new string - } - - ns.allUnquotedNames = allNames - ns.endOffsets = append(ns.endOffsets, uint(len(ns.allUnquotedNames))) - return true -} - -// removeLast removes the last name in the namespace. -func (ns *objectNamespace) removeLast() { - if ns.mapNames != nil { - delete(ns.mapNames, string(ns.lastUnquoted())) - } - if ns.length()-1 == 0 { - ns.endOffsets = ns.endOffsets[:0] - ns.allUnquotedNames = ns.allUnquotedNames[:0] - } else { - ns.endOffsets = ns.endOffsets[:ns.length()-1] - ns.allUnquotedNames = ns.allUnquotedNames[:ns.endOffsets[ns.length()-1]] - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/token.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/token.go deleted file mode 100644 index ea8c30eb5..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/token.go +++ /dev/null @@ -1,525 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "bytes" - "errors" - "math" - "strconv" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// NOTE: Token is analogous to v1 json.Token. - -const ( - maxInt64 = math.MaxInt64 - minInt64 = math.MinInt64 - maxUint64 = math.MaxUint64 - minUint64 = 0 // for consistency and readability purposes - - invalidTokenPanic = "invalid jsontext.Token; it has been voided by a subsequent json.Decoder call" -) - -var errInvalidToken = errors.New("invalid jsontext.Token") - -// Token represents a lexical JSON token, which may be one of the following: -// - a JSON literal (i.e., null, true, or false) -// - a JSON string (e.g., "hello, world!") -// - a JSON number (e.g., 123.456) -// - a begin or end delimiter for a JSON object (i.e., { or } ) -// - a begin or end delimiter for a JSON array (i.e., [ or ] ) -// -// A Token cannot represent entire array or object values, while a [Value] can. -// There is no Token to represent commas and colons since -// these structural tokens can be inferred from the surrounding context. -type Token struct { - nonComparable - - // Tokens can exist in either a "raw" or an "exact" form. - // Tokens produced by the Decoder are in the "raw" form. - // Tokens returned by constructors are usually in the "exact" form. - // The Encoder accepts Tokens in either the "raw" or "exact" form. - // - // The following chart shows the possible values for each Token type: - // ╔═════════════════╦════════════╤════════════╤════════════╗ - // ║ Token type ║ raw field │ str field │ num field ║ - // ╠═════════════════╬════════════╪════════════╪════════════╣ - // ║ null (raw) ║ "null" │ "" │ 0 ║ - // ║ false (raw) ║ "false" │ "" │ 0 ║ - // ║ true (raw) ║ "true" │ "" │ 0 ║ - // ║ string (raw) ║ non-empty │ "" │ offset ║ - // ║ string (string) ║ nil │ non-empty │ 0 ║ - // ║ number (raw) ║ non-empty │ "" │ offset ║ - // ║ number (float) ║ nil │ "f" │ non-zero ║ - // ║ number (int64) ║ nil │ "i" │ non-zero ║ - // ║ number (uint64) ║ nil │ "u" │ non-zero ║ - // ║ object (delim) ║ "{" or "}" │ "" │ 0 ║ - // ║ array (delim) ║ "[" or "]" │ "" │ 0 ║ - // ╚═════════════════╩════════════╧════════════╧════════════╝ - // - // Notes: - // - For tokens stored in "raw" form, the num field contains the - // absolute offset determined by raw.previousOffsetStart(). - // The buffer itself is stored in raw.previousBuffer(). - // - JSON literals and structural characters are always in the "raw" form. - // - JSON strings and numbers can be in either "raw" or "exact" forms. - // - The exact zero value of JSON strings and numbers in the "exact" forms - // have ambiguous representation. Thus, they are always represented - // in the "raw" form. - - // raw contains a reference to the raw decode buffer. - // If non-nil, then its value takes precedence over str and num. - // It is only valid if num == raw.previousOffsetStart(). - raw *decodeBuffer - - // str is the unescaped JSON string if num is zero. - // Otherwise, it is "f", "i", or "u" if num should be interpreted - // as a float64, int64, or uint64, respectively. - str string - - // num is a float64, int64, or uint64 stored as a uint64 value. - // It is non-zero for any JSON number in the "exact" form. - num uint64 -} - -// TODO: Does representing 1-byte delimiters as *decodeBuffer cause performance issues? - -var ( - Null Token = rawToken("null") - False Token = rawToken("false") - True Token = rawToken("true") - - BeginObject Token = rawToken("{") - EndObject Token = rawToken("}") - BeginArray Token = rawToken("[") - EndArray Token = rawToken("]") - - zeroString Token = rawToken(`""`) - zeroNumber Token = rawToken(`0`) - - nanString Token = String("NaN") - pinfString Token = String("Infinity") - ninfString Token = String("-Infinity") -) - -func rawToken(s string) Token { - return Token{raw: &decodeBuffer{buf: []byte(s), prevStart: 0, prevEnd: len(s)}} -} - -// Bool constructs a Token representing a JSON boolean. -func Bool(b bool) Token { - if b { - return True - } - return False -} - -// String constructs a Token representing a JSON string. -// The provided string should contain valid UTF-8, otherwise invalid characters -// may be mangled as the Unicode replacement character. -func String(s string) Token { - if len(s) == 0 { - return zeroString - } - return Token{str: s} -} - -// Float constructs a Token representing a JSON number. -// The values NaN, +Inf, and -Inf will be represented -// as a JSON string with the values "NaN", "Infinity", and "-Infinity". -func Float(n float64) Token { - switch { - case math.Float64bits(n) == 0: - return zeroNumber - case math.IsNaN(n): - return nanString - case math.IsInf(n, +1): - return pinfString - case math.IsInf(n, -1): - return ninfString - } - return Token{str: "f", num: math.Float64bits(n)} -} - -// Int constructs a Token representing a JSON number from an int64. -func Int(n int64) Token { - if n == 0 { - return zeroNumber - } - return Token{str: "i", num: uint64(n)} -} - -// Uint constructs a Token representing a JSON number from a uint64. -func Uint(n uint64) Token { - if n == 0 { - return zeroNumber - } - return Token{str: "u", num: uint64(n)} -} - -// Clone makes a copy of the Token such that its value remains valid -// even after a subsequent [Decoder.Read] call. -func (t Token) Clone() Token { - // TODO: Allow caller to avoid any allocations? - if raw := t.raw; raw != nil { - // Avoid copying globals. - if t.raw.prevStart == 0 { - switch t.raw { - case Null.raw: - return Null - case False.raw: - return False - case True.raw: - return True - case BeginObject.raw: - return BeginObject - case EndObject.raw: - return EndObject - case BeginArray.raw: - return BeginArray - case EndArray.raw: - return EndArray - } - } - - if uint64(raw.previousOffsetStart()) != t.num { - panic(invalidTokenPanic) - } - buf := bytes.Clone(raw.previousBuffer()) - return Token{raw: &decodeBuffer{buf: buf, prevStart: 0, prevEnd: len(buf)}} - } - return t -} - -// Bool returns the value for a JSON boolean. -// It panics if the token kind is not a JSON boolean. -func (t Token) Bool() bool { - switch t.raw { - case True.raw: - return true - case False.raw: - return false - default: - panic("invalid JSON token kind: " + t.Kind().String()) - } -} - -// appendString appends a JSON string to dst and returns it. -// It panics if t is not a JSON string. -func (t Token) appendString(dst []byte, flags *jsonflags.Flags) ([]byte, error) { - if raw := t.raw; raw != nil { - // Handle raw string value. - buf := raw.previousBuffer() - if Kind(buf[0]) == '"' { - if jsonwire.ConsumeSimpleString(buf) == len(buf) { - return append(dst, buf...), nil - } - dst, _, err := jsonwire.ReformatString(dst, buf, flags) - return dst, err - } - } else if len(t.str) != 0 && t.num == 0 { - // Handle exact string value. - return jsonwire.AppendQuote(dst, t.str, flags) - } - - panic("invalid JSON token kind: " + t.Kind().String()) -} - -// String returns the unescaped string value for a JSON string. -// For other JSON kinds, this returns the raw JSON representation. -func (t Token) String() string { - // This is inlinable to take advantage of "function outlining". - // This avoids an allocation for the string(b) conversion - // if the caller does not use the string in an escaping manner. - // See https://blog.filippo.io/efficient-go-apis-with-the-inliner/ - s, b := t.string() - if len(b) > 0 { - return string(b) - } - return s -} -func (t Token) string() (string, []byte) { - if raw := t.raw; raw != nil { - if uint64(raw.previousOffsetStart()) != t.num { - panic(invalidTokenPanic) - } - buf := raw.previousBuffer() - if buf[0] == '"' { - // TODO: Preserve ValueFlags in Token? - isVerbatim := jsonwire.ConsumeSimpleString(buf) == len(buf) - return "", jsonwire.UnquoteMayCopy(buf, isVerbatim) - } - // Handle tokens that are not JSON strings for fmt.Stringer. - return "", buf - } - if len(t.str) != 0 && t.num == 0 { - return t.str, nil - } - // Handle tokens that are not JSON strings for fmt.Stringer. - if t.num > 0 { - switch t.str[0] { - case 'f': - return string(jsonwire.AppendFloat(nil, math.Float64frombits(t.num), 64)), nil - case 'i': - return strconv.FormatInt(int64(t.num), 10), nil - case 'u': - return strconv.FormatUint(uint64(t.num), 10), nil - } - } - return "", nil -} - -// appendNumber appends a JSON number to dst and returns it. -// It panics if t is not a JSON number. -func (t Token) appendNumber(dst []byte, flags *jsonflags.Flags) ([]byte, error) { - if raw := t.raw; raw != nil { - // Handle raw number value. - buf := raw.previousBuffer() - if Kind(buf[0]).normalize() == '0' { - dst, _, err := jsonwire.ReformatNumber(dst, buf, flags) - return dst, err - } - } else if t.num != 0 { - // Handle exact number value. - switch t.str[0] { - case 'f': - return jsonwire.AppendFloat(dst, math.Float64frombits(t.num), 64), nil - case 'i': - return strconv.AppendInt(dst, int64(t.num), 10), nil - case 'u': - return strconv.AppendUint(dst, uint64(t.num), 10), nil - } - } - - panic("invalid JSON token kind: " + t.Kind().String()) -} - -// Float returns the floating-point value for a JSON number. -// It returns a NaN, +Inf, or -Inf value for any JSON string -// with the values "NaN", "Infinity", or "-Infinity". -// It panics for all other cases. -func (t Token) Float() float64 { - if raw := t.raw; raw != nil { - // Handle raw number value. - if uint64(raw.previousOffsetStart()) != t.num { - panic(invalidTokenPanic) - } - buf := raw.previousBuffer() - if Kind(buf[0]).normalize() == '0' { - fv, _ := jsonwire.ParseFloat(buf, 64) - return fv - } - } else if t.num != 0 { - // Handle exact number value. - switch t.str[0] { - case 'f': - return math.Float64frombits(t.num) - case 'i': - return float64(int64(t.num)) - case 'u': - return float64(uint64(t.num)) - } - } - - // Handle string values with "NaN", "Infinity", or "-Infinity". - if t.Kind() == '"' { - switch t.String() { - case "NaN": - return math.NaN() - case "Infinity": - return math.Inf(+1) - case "-Infinity": - return math.Inf(-1) - } - } - - panic("invalid JSON token kind: " + t.Kind().String()) -} - -// Int returns the signed integer value for a JSON number. -// The fractional component of any number is ignored (truncation toward zero). -// Any number beyond the representation of an int64 will be saturated -// to the closest representable value. -// It panics if the token kind is not a JSON number. -func (t Token) Int() int64 { - if raw := t.raw; raw != nil { - // Handle raw integer value. - if uint64(raw.previousOffsetStart()) != t.num { - panic(invalidTokenPanic) - } - neg := false - buf := raw.previousBuffer() - if len(buf) > 0 && buf[0] == '-' { - neg, buf = true, buf[1:] - } - if numAbs, ok := jsonwire.ParseUint(buf); ok { - if neg { - if numAbs > -minInt64 { - return minInt64 - } - return -1 * int64(numAbs) - } else { - if numAbs > +maxInt64 { - return maxInt64 - } - return +1 * int64(numAbs) - } - } - } else if t.num != 0 { - // Handle exact integer value. - switch t.str[0] { - case 'i': - return int64(t.num) - case 'u': - if t.num > maxInt64 { - return maxInt64 - } - return int64(t.num) - } - } - - // Handle JSON number that is a floating-point value. - if t.Kind() == '0' { - switch fv := t.Float(); { - case fv >= maxInt64: - return maxInt64 - case fv <= minInt64: - return minInt64 - default: - return int64(fv) // truncation toward zero - } - } - - panic("invalid JSON token kind: " + t.Kind().String()) -} - -// Uint returns the unsigned integer value for a JSON number. -// The fractional component of any number is ignored (truncation toward zero). -// Any number beyond the representation of an uint64 will be saturated -// to the closest representable value. -// It panics if the token kind is not a JSON number. -func (t Token) Uint() uint64 { - // NOTE: This accessor returns 0 for any negative JSON number, - // which might be surprising, but is at least consistent with the behavior - // of saturating out-of-bounds numbers to the closest representable number. - - if raw := t.raw; raw != nil { - // Handle raw integer value. - if uint64(raw.previousOffsetStart()) != t.num { - panic(invalidTokenPanic) - } - neg := false - buf := raw.previousBuffer() - if len(buf) > 0 && buf[0] == '-' { - neg, buf = true, buf[1:] - } - if num, ok := jsonwire.ParseUint(buf); ok { - if neg { - return minUint64 - } - return num - } - } else if t.num != 0 { - // Handle exact integer value. - switch t.str[0] { - case 'u': - return t.num - case 'i': - if int64(t.num) < minUint64 { - return minUint64 - } - return uint64(int64(t.num)) - } - } - - // Handle JSON number that is a floating-point value. - if t.Kind() == '0' { - switch fv := t.Float(); { - case fv >= maxUint64: - return maxUint64 - case fv <= minUint64: - return minUint64 - default: - return uint64(fv) // truncation toward zero - } - } - - panic("invalid JSON token kind: " + t.Kind().String()) -} - -// Kind returns the token kind. -func (t Token) Kind() Kind { - switch { - case t.raw != nil: - raw := t.raw - if uint64(raw.previousOffsetStart()) != t.num { - panic(invalidTokenPanic) - } - return Kind(t.raw.buf[raw.prevStart]).normalize() - case t.num != 0: - return '0' - case len(t.str) != 0: - return '"' - default: - return invalidKind - } -} - -// Kind represents each possible JSON token kind with a single byte, -// which is conveniently the first byte of that kind's grammar -// with the restriction that numbers always be represented with '0': -// -// - 'n': null -// - 'f': false -// - 't': true -// - '"': string -// - '0': number -// - '{': object begin -// - '}': object end -// - '[': array begin -// - ']': array end -// -// An invalid kind is usually represented using 0, -// but may be non-zero due to invalid JSON data. -type Kind byte - -const invalidKind Kind = 0 - -// String prints the kind in a humanly readable fashion. -func (k Kind) String() string { - switch k { - case 'n': - return "null" - case 'f': - return "false" - case 't': - return "true" - case '"': - return "string" - case '0': - return "number" - case '{': - return "{" - case '}': - return "}" - case '[': - return "[" - case ']': - return "]" - default: - return "" - } -} - -// normalize coalesces all possible starting characters of a number as just '0'. -func (k Kind) normalize() Kind { - if k == '-' || ('0' <= k && k <= '9') { - return '0' - } - return k -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/value.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/value.go deleted file mode 100644 index 3ea05d3a0..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext/value.go +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package jsontext - -import ( - "bytes" - "errors" - "io" - "slices" - "sync" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire" -) - -// NOTE: Value is analogous to v1 json.RawMessage. - -// AppendFormat formats the JSON value in src and appends it to dst -// according to the specified options. -// See [Value.Format] for more details about the formatting behavior. -// -// The dst and src may overlap. -// If an error is reported, then the entirety of src is appended to dst. -func AppendFormat(dst, src []byte, opts ...Options) ([]byte, error) { - e := getBufferedEncoder(opts...) - defer putBufferedEncoder(e) - e.s.Flags.Set(jsonflags.OmitTopLevelNewline | 1) - if err := e.s.WriteValue(src); err != nil { - return append(dst, src...), err - } - return append(dst, e.s.Buf...), nil -} - -// Value represents a single raw JSON value, which may be one of the following: -// - a JSON literal (i.e., null, true, or false) -// - a JSON string (e.g., "hello, world!") -// - a JSON number (e.g., 123.456) -// - an entire JSON object (e.g., {"fizz":"buzz"} ) -// - an entire JSON array (e.g., [1,2,3] ) -// -// Value can represent entire array or object values, while [Token] cannot. -// Value may contain leading and/or trailing whitespace. -type Value []byte - -// Clone returns a copy of v. -func (v Value) Clone() Value { - return bytes.Clone(v) -} - -// String returns the string formatting of v. -func (v Value) String() string { - if v == nil { - return "null" - } - return string(v) -} - -// IsValid reports whether the raw JSON value is syntactically valid -// according to the specified options. -// -// By default (if no options are specified), it validates according to RFC 7493. -// It verifies whether the input is properly encoded as UTF-8, -// that escape sequences within strings decode to valid Unicode codepoints, and -// that all names in each object are unique. -// It does not verify whether numbers are representable within the limits -// of any common numeric type (e.g., float64, int64, or uint64). -// -// Relevant options include: -// - [AllowDuplicateNames] -// - [AllowInvalidUTF8] -// -// All other options are ignored. -func (v Value) IsValid(opts ...Options) bool { - // TODO: Document support for [WithByteLimit] and [WithDepthLimit]. - d := getBufferedDecoder(v, opts...) - defer putBufferedDecoder(d) - _, errVal := d.ReadValue() - _, errEOF := d.ReadToken() - return errVal == nil && errEOF == io.EOF -} - -// Format formats the raw JSON value in place. -// -// By default (if no options are specified), it validates according to RFC 7493 -// and produces the minimal JSON representation, where -// all whitespace is elided and JSON strings use the shortest encoding. -// -// Relevant options include: -// - [AllowDuplicateNames] -// - [AllowInvalidUTF8] -// - [EscapeForHTML] -// - [EscapeForJS] -// - [PreserveRawStrings] -// - [CanonicalizeRawInts] -// - [CanonicalizeRawFloats] -// - [ReorderRawObjects] -// - [SpaceAfterColon] -// - [SpaceAfterComma] -// - [Multiline] -// - [WithIndent] -// - [WithIndentPrefix] -// -// All other options are ignored. -// -// It is guaranteed to succeed if the value is valid according to the same options. -// If the value is already formatted, then the buffer is not mutated. -func (v *Value) Format(opts ...Options) error { - // TODO: Document support for [WithByteLimit] and [WithDepthLimit]. - return v.format(opts, nil) -} - -// format accepts two []Options to avoid the allocation appending them together. -// It is equivalent to v.Format(append(opts1, opts2...)...). -func (v *Value) format(opts1, opts2 []Options) error { - e := getBufferedEncoder(opts1...) - defer putBufferedEncoder(e) - e.s.Join(opts2...) - e.s.Flags.Set(jsonflags.OmitTopLevelNewline | 1) - if err := e.s.WriteValue(*v); err != nil { - return err - } - if !bytes.Equal(*v, e.s.Buf) { - *v = append((*v)[:0], e.s.Buf...) - } - return nil -} - -// Compact removes all whitespace from the raw JSON value. -// -// It does not reformat JSON strings or numbers to use any other representation. -// To maximize the set of JSON values that can be formatted, -// this permits values with duplicate names and invalid UTF-8. -// -// Compact is equivalent to calling [Value.Format] with the following options: -// - [AllowDuplicateNames](true) -// - [AllowInvalidUTF8](true) -// - [PreserveRawStrings](true) -// -// Any options specified by the caller are applied after the initial set -// and may deliberately override prior options. -func (v *Value) Compact(opts ...Options) error { - return v.format([]Options{ - AllowDuplicateNames(true), - AllowInvalidUTF8(true), - PreserveRawStrings(true), - }, opts) -} - -// Indent reformats the whitespace in the raw JSON value so that each element -// in a JSON object or array begins on a indented line according to the nesting. -// -// It does not reformat JSON strings or numbers to use any other representation. -// To maximize the set of JSON values that can be formatted, -// this permits values with duplicate names and invalid UTF-8. -// -// Indent is equivalent to calling [Value.Format] with the following options: -// - [AllowDuplicateNames](true) -// - [AllowInvalidUTF8](true) -// - [PreserveRawStrings](true) -// - [Multiline](true) -// -// Any options specified by the caller are applied after the initial set -// and may deliberately override prior options. -func (v *Value) Indent(opts ...Options) error { - return v.format([]Options{ - AllowDuplicateNames(true), - AllowInvalidUTF8(true), - PreserveRawStrings(true), - Multiline(true), - }, opts) -} - -// Canonicalize canonicalizes the raw JSON value according to the -// JSON Canonicalization Scheme (JCS) as defined by RFC 8785 -// where it produces a stable representation of a JSON value. -// -// JSON strings are formatted to use their minimal representation, -// JSON numbers are formatted as double precision numbers according -// to some stable serialization algorithm. -// JSON object members are sorted in ascending order by name. -// All whitespace is removed. -// -// The output stability is dependent on the stability of the application data -// (see RFC 8785, Appendix E). It cannot produce stable output from -// fundamentally unstable input. For example, if the JSON value -// contains ephemeral data (e.g., a frequently changing timestamp), -// then the value is still unstable regardless of whether this is called. -// -// Canonicalize is equivalent to calling [Value.Format] with the following options: -// - [CanonicalizeRawInts](true) -// - [CanonicalizeRawFloats](true) -// - [ReorderRawObjects](true) -// -// Any options specified by the caller are applied after the initial set -// and may deliberately override prior options. -// -// Note that JCS treats all JSON numbers as IEEE 754 double precision numbers. -// Any numbers with precision beyond what is representable by that form -// will lose their precision when canonicalized. For example, integer values -// beyond ±2⁵³ will lose their precision. To preserve the original representation -// of JSON integers, additionally set [CanonicalizeRawInts] to false: -// -// v.Canonicalize(jsontext.CanonicalizeRawInts(false)) -func (v *Value) Canonicalize(opts ...Options) error { - return v.format([]Options{ - CanonicalizeRawInts(true), - CanonicalizeRawFloats(true), - ReorderRawObjects(true), - }, opts) -} - -// MarshalJSON returns v as the JSON encoding of v. -// It returns the stored value as the raw JSON output without any validation. -// If v is nil, then this returns a JSON null. -func (v Value) MarshalJSON() ([]byte, error) { - // NOTE: This matches the behavior of v1 json.RawMessage.MarshalJSON. - if v == nil { - return []byte("null"), nil - } - return v, nil -} - -// UnmarshalJSON sets v as the JSON encoding of b. -// It stores a copy of the provided raw JSON input without any validation. -func (v *Value) UnmarshalJSON(b []byte) error { - // NOTE: This matches the behavior of v1 json.RawMessage.UnmarshalJSON. - if v == nil { - return errors.New("jsontext.Value: UnmarshalJSON on nil pointer") - } - *v = append((*v)[:0], b...) - return nil -} - -// Kind returns the starting token kind. -// For a valid value, this will never include '}' or ']'. -func (v Value) Kind() Kind { - if v := v[jsonwire.ConsumeWhitespace(v):]; len(v) > 0 { - return Kind(v[0]).normalize() - } - return invalidKind -} - -const commaAndWhitespace = ", \n\r\t" - -type objectMember struct { - // name is the unquoted name. - name []byte // e.g., "name" - // buffer is the entirety of the raw JSON object member - // starting from right after the previous member (or opening '{') - // until right after the member value. - buffer []byte // e.g., `, \n\r\t"name": "value"` -} - -func (x objectMember) Compare(y objectMember) int { - if c := jsonwire.CompareUTF16(x.name, y.name); c != 0 { - return c - } - // With [AllowDuplicateNames] or [AllowInvalidUTF8], - // names could be identical, so also sort using the member value. - return jsonwire.CompareUTF16( - bytes.TrimLeft(x.buffer, commaAndWhitespace), - bytes.TrimLeft(y.buffer, commaAndWhitespace)) -} - -var objectMemberPool = sync.Pool{New: func() any { return new([]objectMember) }} - -func getObjectMembers() *[]objectMember { - ns := objectMemberPool.Get().(*[]objectMember) - *ns = (*ns)[:0] - return ns -} -func putObjectMembers(ns *[]objectMember) { - if cap(*ns) < 1<<10 { - clear(*ns) // avoid pinning name and buffer - objectMemberPool.Put(ns) - } -} - -// mustReorderObjects reorders in-place all object members in a JSON value, -// which must be valid otherwise it panics. -func mustReorderObjects(b []byte) { - // Obtain a buffered encoder just to use its internal buffer as - // a scratch buffer for reordering object members. - e2 := getBufferedEncoder() - defer putBufferedEncoder(e2) - - // Disable unnecessary checks to syntactically parse the JSON value. - d := getBufferedDecoder(b) - defer putBufferedDecoder(d) - d.s.Flags.Set(jsonflags.AllowDuplicateNames | jsonflags.AllowInvalidUTF8 | 1) - mustReorderObjectsFromDecoder(d, &e2.s.Buf) // per RFC 8785, section 3.2.3 -} - -// mustReorderObjectsFromDecoder recursively reorders all object members in place -// according to the ordering specified in RFC 8785, section 3.2.3. -// -// Pre-conditions: -// - The value is valid (i.e., no decoder errors should ever occur). -// - Initial call is provided a Decoder reading from the start of v. -// -// Post-conditions: -// - Exactly one JSON value is read from the Decoder. -// - All fully-parsed JSON objects are reordered by directly moving -// the members in the value buffer. -// -// The runtime is approximately O(n·log(n)) + O(m·log(m)), -// where n is len(v) and m is the total number of object members. -func mustReorderObjectsFromDecoder(d *Decoder, scratch *[]byte) { - switch tok, err := d.ReadToken(); tok.Kind() { - case '{': - // Iterate and collect the name and offsets for every object member. - members := getObjectMembers() - defer putObjectMembers(members) - var prevMember objectMember - isSorted := true - - beforeBody := d.InputOffset() // offset after '{' - for d.PeekKind() != '}' { - beforeName := d.InputOffset() - var flags jsonwire.ValueFlags - name, _ := d.s.ReadValue(&flags) - name = jsonwire.UnquoteMayCopy(name, flags.IsVerbatim()) - mustReorderObjectsFromDecoder(d, scratch) - afterValue := d.InputOffset() - - currMember := objectMember{name, d.s.buf[beforeName:afterValue]} - if isSorted && len(*members) > 0 { - isSorted = objectMember.Compare(prevMember, currMember) < 0 - } - *members = append(*members, currMember) - prevMember = currMember - } - afterBody := d.InputOffset() // offset before '}' - d.ReadToken() - - // Sort the members; return early if it's already sorted. - if isSorted { - return - } - firstBufferBeforeSorting := (*members)[0].buffer - slices.SortFunc(*members, objectMember.Compare) - firstBufferAfterSorting := (*members)[0].buffer - - // Append the reordered members to a new buffer, - // then copy the reordered members back over the original members. - // Avoid swapping in place since each member may be a different size - // where moving a member over a smaller member may corrupt the data - // for subsequent members before they have been moved. - // - // The following invariant must hold: - // sum([m.after-m.before for m in members]) == afterBody-beforeBody - commaAndWhitespacePrefix := func(b []byte) []byte { - return b[:len(b)-len(bytes.TrimLeft(b, commaAndWhitespace))] - } - sorted := (*scratch)[:0] - for i, member := range *members { - switch { - case i == 0 && &member.buffer[0] != &firstBufferBeforeSorting[0]: - // First member after sorting is not the first member before sorting, - // so use the prefix of the first member before sorting. - sorted = append(sorted, commaAndWhitespacePrefix(firstBufferBeforeSorting)...) - sorted = append(sorted, bytes.TrimLeft(member.buffer, commaAndWhitespace)...) - case i != 0 && &member.buffer[0] == &firstBufferBeforeSorting[0]: - // Later member after sorting is the first member before sorting, - // so use the prefix of the first member after sorting. - sorted = append(sorted, commaAndWhitespacePrefix(firstBufferAfterSorting)...) - sorted = append(sorted, bytes.TrimLeft(member.buffer, commaAndWhitespace)...) - default: - sorted = append(sorted, member.buffer...) - } - } - if int(afterBody-beforeBody) != len(sorted) { - panic("BUG: length invariant violated") - } - copy(d.s.buf[beforeBody:afterBody], sorted) - - // Update scratch buffer to the largest amount ever used. - if len(sorted) > len(*scratch) { - *scratch = sorted - } - case '[': - for d.PeekKind() != ']' { - mustReorderObjectsFromDecoder(d, scratch) - } - d.ReadToken() - default: - if err != nil { - panic("BUG: " + err.Error()) - } - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/migrate.sh b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/migrate.sh deleted file mode 100644 index 9c34f26eb..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/migrate.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -GOROOT=${1:-../go} -JSONROOT="." - -cp $JSONROOT/alias_gen.go $JSONROOT/alias_gen.go.bak -rm -r $JSONROOT/*.go $JSONROOT/internal $JSONROOT/jsontext $JSONROOT/v1 -mv $JSONROOT/alias_gen.go.bak $JSONROOT/alias_gen.go -cp -r $GOROOT/src/encoding/json/v2/*.go $JSONROOT/ -cp -r $GOROOT/src/encoding/json/internal/ $JSONROOT/internal/ -cp -r $GOROOT/src/encoding/json/jsontext/ $JSONROOT/jsontext/ -mkdir $JSONROOT/v1 -for X in $GOROOT/src/encoding/json/v2_*.go; do - cp $X $JSONROOT/v1/$(basename $X | sed "s/v2_//") -done -cd $JSONROOT -for X in $(git ls-files --cached --others --exclude-standard | grep ".*[.]go$"); do - if [ ! -e "$X" ]; then - continue - fi - sed -i 's/go:build goexperiment.jsonv2$/go:build !goexperiment.jsonv2 || !go1.25/' $X - sed -i 's|"encoding/json/v2"|"github.com/go-json-experiment/json"|' $X - sed -i 's|"encoding/json/internal"|"github.com/go-json-experiment/json/internal"|' $X - sed -i 's|"encoding/json/internal/jsonflags"|"github.com/go-json-experiment/json/internal/jsonflags"|' $X - sed -i 's|"encoding/json/internal/jsonopts"|"github.com/go-json-experiment/json/internal/jsonopts"|' $X - sed -i 's|"encoding/json/internal/jsontest"|"github.com/go-json-experiment/json/internal/jsontest"|' $X - sed -i 's|"encoding/json/internal/jsonwire"|"github.com/go-json-experiment/json/internal/jsonwire"|' $X - sed -i 's|"encoding/json/jsontext"|"github.com/go-json-experiment/json/jsontext"|' $X - sed -i 's|"encoding/json"|"github.com/go-json-experiment/json/v1"|' $X - sed -i 's|"internal/zstd"|"github.com/go-json-experiment/json/internal/zstd"|' $X - goimports -w $X -done -sed -i 's/v2[.]struct/json.struct/' $JSONROOT/errors_test.go -sed -i 's|jsonv1 "github.com/go-json-experiment/json/v1"|jsonv1 "encoding/json"|' $JSONROOT/bench_test.go - -# TODO(go1.25): Remove test that relies on "synctest" that is not available yet. -sed -i '/Issue #73733/,+17d' $JSONROOT/v1/encode_test.go -goimports -w $JSONROOT/v1/encode_test.go - -# Remove documentation that only makes sense within the stdlib. -sed -i '/This package .* is experimental/,+4d' $JSONROOT/doc.go -sed -i '/This package .* is experimental/,+4d' $JSONROOT/jsontext/doc.go - -git checkout internal/zstd # we still need local copy of zstd for testing - -go run alias_gen.go "encoding/json" $JSONROOT/v1 -go run alias_gen.go "encoding/json/v2" $JSONROOT -go run alias_gen.go "encoding/json/jsontext" $JSONROOT/jsontext diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/options.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/options.go deleted file mode 100644 index 2f4744980..000000000 --- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/options.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package json - -import ( - "fmt" - - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts" -) - -// Options configure [Marshal], [MarshalWrite], [MarshalEncode], -// [Unmarshal], [UnmarshalRead], and [UnmarshalDecode] with specific features. -// Each function takes in a variadic list of options, where properties -// set in later options override the value of previously set properties. -// -// The Options type is identical to [encoding/json.Options] and -// [encoding/json/jsontext.Options]. Options from the other packages can -// be used interchangeably with functionality in this package. -// -// Options represent either a singular option or a set of options. -// It can be functionally thought of as a Go map of option properties -// (even though the underlying implementation avoids Go maps for performance). -// -// The constructors (e.g., [Deterministic]) return a singular option value: -// -// opt := Deterministic(true) -// -// which is analogous to creating a single entry map: -// -// opt := Options{"Deterministic": true} -// -// [JoinOptions] composes multiple options values to together: -// -// out := JoinOptions(opts...) -// -// which is analogous to making a new map and copying the options over: -// -// out := make(Options) -// for _, m := range opts { -// for k, v := range m { -// out[k] = v -// } -// } -// -// [GetOption] looks up the value of options parameter: -// -// v, ok := GetOption(opts, Deterministic) -// -// which is analogous to a Go map lookup: -// -// v, ok := Options["Deterministic"] -// -// There is a single Options type, which is used with both marshal and unmarshal. -// Some options affect both operations, while others only affect one operation: -// -// - [StringifyNumbers] affects marshaling and unmarshaling -// - [Deterministic] affects marshaling only -// - [FormatNilSliceAsNull] affects marshaling only -// - [FormatNilMapAsNull] affects marshaling only -// - [OmitZeroStructFields] affects marshaling only -// - [MatchCaseInsensitiveNames] affects marshaling and unmarshaling -// - [DiscardUnknownMembers] affects marshaling only -// - [RejectUnknownMembers] affects unmarshaling only -// - [WithMarshalers] affects marshaling only -// - [WithUnmarshalers] affects unmarshaling only -// -// Options that do not affect a particular operation are ignored. -type Options = jsonopts.Options - -// JoinOptions coalesces the provided list of options into a single Options. -// Properties set in later options override the value of previously set properties. -func JoinOptions(srcs ...Options) Options { - var dst jsonopts.Struct - dst.Join(srcs...) - return &dst -} - -// GetOption returns the value stored in opts with the provided setter, -// reporting whether the value is present. -// -// Example usage: -// -// v, ok := json.GetOption(opts, json.Deterministic) -// -// Options are most commonly introspected to alter the JSON representation of -// [MarshalerTo.MarshalJSONTo] and [UnmarshalerFrom.UnmarshalJSONFrom] methods, and -// [MarshalToFunc] and [UnmarshalFromFunc] functions. -// In such cases, the presence bit should generally be ignored. -func GetOption[T any](opts Options, setter func(T) Options) (T, bool) { - return jsonopts.GetOption(opts, setter) -} - -// DefaultOptionsV2 is the full set of all options that define v2 semantics. -// It is equivalent to all options under [Options], [encoding/json.Options], -// and [encoding/json/jsontext.Options] being set to false or the zero value, -// except for the options related to whitespace formatting. -func DefaultOptionsV2() Options { - return &jsonopts.DefaultOptionsV2 -} - -// StringifyNumbers specifies that numeric Go types should be marshaled -// as a JSON string containing the equivalent JSON number value. -// When unmarshaling, numeric Go types are parsed from a JSON string -// containing the JSON number without any surrounding whitespace. -// -// According to RFC 8259, section 6, a JSON implementation may choose to -// limit the representation of a JSON number to an IEEE 754 binary64 value. -// This may cause decoders to lose precision for int64 and uint64 types. -// Quoting JSON numbers as a JSON string preserves the exact precision. -// -// This affects either marshaling or unmarshaling. -func StringifyNumbers(v bool) Options { - if v { - return jsonflags.StringifyNumbers | 1 - } else { - return jsonflags.StringifyNumbers | 0 - } -} - -// Deterministic specifies that the same input value will be serialized -// as the exact same output bytes. Different processes of -// the same program will serialize equal values to the same bytes, -// but different versions of the same program are not guaranteed -// to produce the exact same sequence of bytes. -// -// This only affects marshaling and is ignored when unmarshaling. -func Deterministic(v bool) Options { - if v { - return jsonflags.Deterministic | 1 - } else { - return jsonflags.Deterministic | 0 - } -} - -// FormatNilSliceAsNull specifies that a nil Go slice should marshal as a -// JSON null instead of the default representation as an empty JSON array -// (or an empty JSON string in the case of ~[]byte). -// Slice fields explicitly marked with `format:emitempty` still marshal -// as an empty JSON array. -// -// This only affects marshaling and is ignored when unmarshaling. -func FormatNilSliceAsNull(v bool) Options { - if v { - return jsonflags.FormatNilSliceAsNull | 1 - } else { - return jsonflags.FormatNilSliceAsNull | 0 - } -} - -// FormatNilMapAsNull specifies that a nil Go map should marshal as a -// JSON null instead of the default representation as an empty JSON object. -// Map fields explicitly marked with `format:emitempty` still marshal -// as an empty JSON object. -// -// This only affects marshaling and is ignored when unmarshaling. -func FormatNilMapAsNull(v bool) Options { - if v { - return jsonflags.FormatNilMapAsNull | 1 - } else { - return jsonflags.FormatNilMapAsNull | 0 - } -} - -// OmitZeroStructFields specifies that a Go struct should marshal in such a way -// that all struct fields that are zero are omitted from the marshaled output -// if the value is zero as determined by the "IsZero() bool" method if present, -// otherwise based on whether the field is the zero Go value. -// This is semantically equivalent to specifying the `omitzero` tag option -// on every field in a Go struct. -// -// This only affects marshaling and is ignored when unmarshaling. -func OmitZeroStructFields(v bool) Options { - if v { - return jsonflags.OmitZeroStructFields | 1 - } else { - return jsonflags.OmitZeroStructFields | 0 - } -} - -// MatchCaseInsensitiveNames specifies that JSON object members are matched -// against Go struct fields using a case-insensitive match of the name. -// Go struct fields explicitly marked with `case:strict` or `case:ignore` -// always use case-sensitive (or case-insensitive) name matching, -// regardless of the value of this option. -// -// This affects either marshaling or unmarshaling. -// For marshaling, this option may alter the detection of duplicate names -// (assuming [jsontext.AllowDuplicateNames] is false) from inlined fields -// if it matches one of the declared fields in the Go struct. -func MatchCaseInsensitiveNames(v bool) Options { - if v { - return jsonflags.MatchCaseInsensitiveNames | 1 - } else { - return jsonflags.MatchCaseInsensitiveNames | 0 - } -} - -// DiscardUnknownMembers specifies that marshaling should ignore any -// JSON object members stored in Go struct fields dedicated to storing -// unknown JSON object members. -// -// This only affects marshaling and is ignored when unmarshaling. -func DiscardUnknownMembers(v bool) Options { - if v { - return jsonflags.DiscardUnknownMembers | 1 - } else { - return jsonflags.DiscardUnknownMembers | 0 - } -} - -// RejectUnknownMembers specifies that unknown members should be rejected -// when unmarshaling a JSON object, regardless of whether there is a field -// to store unknown members. -// -// This only affects unmarshaling and is ignored when marshaling. -func RejectUnknownMembers(v bool) Options { - if v { - return jsonflags.RejectUnknownMembers | 1 - } else { - return jsonflags.RejectUnknownMembers | 0 - } -} - -// WithMarshalers specifies a list of type-specific marshalers to use, -// which can be used to override the default marshal behavior for values -// of particular types. -// -// This only affects marshaling and is ignored when unmarshaling. -func WithMarshalers(v *Marshalers) Options { - return (*marshalersOption)(v) -} - -// WithUnmarshalers specifies a list of type-specific unmarshalers to use, -// which can be used to override the default unmarshal behavior for values -// of particular types. -// -// This only affects unmarshaling and is ignored when marshaling. -func WithUnmarshalers(v *Unmarshalers) Options { - return (*unmarshalersOption)(v) -} - -// These option types are declared here instead of "jsonopts" -// to avoid a dependency on "reflect" from "jsonopts". -type ( - marshalersOption Marshalers - unmarshalersOption Unmarshalers -) - -func (*marshalersOption) JSONOptions(internal.NotForPublicUse) {} -func (*unmarshalersOption) JSONOptions(internal.NotForPublicUse) {} - -// Inject support into "jsonopts" to handle these types. -func init() { - jsonopts.GetUnknownOption = func(src jsonopts.Struct, zero jsonopts.Options) (any, bool) { - switch zero.(type) { - case *marshalersOption: - if !src.Flags.Has(jsonflags.Marshalers) { - return (*Marshalers)(nil), false - } - return src.Marshalers.(*Marshalers), true - case *unmarshalersOption: - if !src.Flags.Has(jsonflags.Unmarshalers) { - return (*Unmarshalers)(nil), false - } - return src.Unmarshalers.(*Unmarshalers), true - default: - panic(fmt.Sprintf("unknown option %T", zero)) - } - } - jsonopts.JoinUnknownOption = func(dst jsonopts.Struct, src jsonopts.Options) jsonopts.Struct { - switch src := src.(type) { - case *marshalersOption: - dst.Flags.Set(jsonflags.Marshalers | 1) - dst.Marshalers = (*Marshalers)(src) - case *unmarshalersOption: - dst.Flags.Set(jsonflags.Unmarshalers | 1) - dst.Unmarshalers = (*Unmarshalers)(src) - default: - panic(fmt.Sprintf("unknown option %T", src)) - } - return dst - } -} diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go index 06bcf0c37..8f4e8f227 100644 --- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go +++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go @@ -21,8 +21,9 @@ import ( "path" "strings" + "sigs.k8s.io/structured-merge-diff/v7/schema" + "k8s.io/kube-openapi/pkg/validation/spec" - "sigs.k8s.io/structured-merge-diff/v6/schema" ) // ToSchemaFromOpenAPI converts a directory of OpenAPI schemas to an smd Schema. diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go index 6a8b9f44a..36695b32b 100644 --- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go +++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go @@ -21,8 +21,9 @@ import ( "path" "strings" + "sigs.k8s.io/structured-merge-diff/v7/schema" + "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v6/schema" ) // ToSchema converts openapi definitions into a schema suitable for structured diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go index c4a083cb4..c2fb1d524 100644 --- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go +++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go @@ -20,7 +20,7 @@ import ( "fmt" "sort" - "sigs.k8s.io/structured-merge-diff/v6/schema" + "sigs.k8s.io/structured-merge-diff/v7/schema" ) const ( diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go b/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go index 1b3dfff1d..62ae6d314 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -33,24 +31,13 @@ type Encoding struct { // MarshalJSON is a custom marshal function that knows how to encode Encoding as JSON func (e *Encoding) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(e) - } - b1, err := json.Marshal(e.EncodingProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(e.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(e) } func (e *Encoding) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - EncodingProps encodingPropsOmitZero `json:",inline"` - Extensions spec.Extensions `json:",inline"` + EncodingProps encodingPropsOmitZero `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Extensions = internal.SanitizeExtensions(e.Extensions) x.EncodingProps = encodingPropsOmitZero(e.EncodingProps) @@ -58,21 +45,12 @@ func (e *Encoding) MarshalJSONTo(enc *jsontext.Encoder) error { } func (e *Encoding) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, e) - } - if err := json.Unmarshal(data, &e.EncodingProps); err != nil { - return err - } - if err := json.Unmarshal(data, &e.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, e) } func (e *Encoding) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` EncodingProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/example.go b/vendor/k8s.io/kube-openapi/pkg/spec3/example.go index 3edb10492..a06b8399e 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/example.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/example.go @@ -17,13 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" - "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -37,28 +34,13 @@ type Example struct { // MarshalJSON is a custom marshal function that knows how to encode RequestBody as JSON func (e *Example) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(e) - } - b1, err := json.Marshal(e.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(e.ExampleProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(e.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(e) } func (e *Example) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - ExampleProps `json:",inline"` - Extensions spec.Extensions `json:",inline"` + ExampleProps `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Ref = e.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(e.Extensions) @@ -67,24 +49,12 @@ func (e *Example) MarshalJSONTo(enc *jsontext.Encoder) error { } func (e *Example) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, e) - } - if err := json.Unmarshal(data, &e.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &e.ExampleProps); err != nil { - return err - } - if err := json.Unmarshal(data, &e.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, e) } func (e *Example) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` ExampleProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go b/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go index 7a83c53c0..2c4b7e2dc 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -40,24 +38,13 @@ type ExternalDocumentationProps struct { // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON func (e *ExternalDocumentation) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(e) - } - b1, err := json.Marshal(e.ExternalDocumentationProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(e.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(e) } func (e *ExternalDocumentation) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - ExternalDocumentationProps `json:",inline"` - Extensions spec.Extensions `json:",inline"` + ExternalDocumentationProps `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Extensions = internal.SanitizeExtensions(e.Extensions) x.ExternalDocumentationProps = e.ExternalDocumentationProps @@ -65,21 +52,12 @@ func (e *ExternalDocumentation) MarshalJSONTo(enc *jsontext.Encoder) error { } func (e *ExternalDocumentation) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, e) - } - if err := json.Unmarshal(data, &e.ExternalDocumentationProps); err != nil { - return err - } - if err := json.Unmarshal(data, &e.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, e) } func (e *ExternalDocumentation) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` ExternalDocumentationProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/header.go b/vendor/k8s.io/kube-openapi/pkg/spec3/header.go index 475817f66..0cf70aebd 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/header.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/header.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -37,29 +35,14 @@ type Header struct { // MarshalJSON is a custom marshal function that knows how to encode Header as JSON func (h *Header) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(h) - } - b1, err := json.Marshal(h.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(h.HeaderProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(h.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(h) } func (h *Header) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - HeaderProps headerPropsOmitZero `json:",inline"` - Extensions spec.Extensions `json:",inline"` + HeaderProps headerPropsOmitZero `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Ref = h.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(h.Extensions) @@ -68,25 +51,12 @@ func (h *Header) MarshalJSONTo(enc *jsontext.Encoder) error { } func (h *Header) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, h) - } - if err := json.Unmarshal(data, &h.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &h.HeaderProps); err != nil { - return err - } - if err := json.Unmarshal(data, &h.VendorExtensible); err != nil { - return err - } - - return nil + return jsonv2.Unmarshal(data, h) } func (h *Header) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` HeaderProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go b/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go index c9062b238..9b6883b30 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -36,24 +34,13 @@ type MediaType struct { // MarshalJSON is a custom marshal function that knows how to encode MediaType as JSON func (m *MediaType) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(m) - } - b1, err := json.Marshal(m.MediaTypeProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(m.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(m) } func (e *MediaType) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - MediaTypeProps mediaTypePropsOmitZero `json:",inline"` - Extensions spec.Extensions `json:",inline"` + MediaTypeProps mediaTypePropsOmitZero `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Extensions = internal.SanitizeExtensions(e.Extensions) x.MediaTypeProps = mediaTypePropsOmitZero(e.MediaTypeProps) @@ -61,21 +48,12 @@ func (e *MediaType) MarshalJSONTo(enc *jsontext.Encoder) error { } func (m *MediaType) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, m) - } - if err := json.Unmarshal(data, &m.MediaTypeProps); err != nil { - return err - } - if err := json.Unmarshal(data, &m.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, m) } func (m *MediaType) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` MediaTypeProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go b/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go index 8219b29d0..f84d8ad2d 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -36,24 +34,13 @@ type Operation struct { // MarshalJSON is a custom marshal function that knows how to encode Operation as JSON func (o *Operation) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(o) - } - b1, err := json.Marshal(o.OperationProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(o.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(o) } func (o *Operation) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` - OperationProps operationPropsOmitZero `json:",inline"` + Extensions spec.Extensions `json:",embed"` + OperationProps operationPropsOmitZero `json:",embed"` } x.Extensions = internal.SanitizeExtensions(o.Extensions) x.OperationProps = operationPropsOmitZero(o.OperationProps) @@ -62,18 +49,12 @@ func (o *Operation) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON hydrates this items instance with the data from JSON func (o *Operation) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, o) - } - if err := json.Unmarshal(data, &o.OperationProps); err != nil { - return err - } - return json.Unmarshal(data, &o.VendorExtensible) + return jsonv2.Unmarshal(data, o) } func (o *Operation) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` OperationProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go b/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go index a5e7d46c4..7a8f7650b 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -37,29 +35,14 @@ type Parameter struct { // MarshalJSON is a custom marshal function that knows how to encode Parameter as JSON func (p *Parameter) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(p) - } - b1, err := json.Marshal(p.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(p.ParameterProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(p.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(p) } func (p *Parameter) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - ParameterProps parameterPropsOmitZero `json:",inline"` - Extensions spec.Extensions `json:",inline"` + ParameterProps parameterPropsOmitZero `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Ref = p.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(p.Extensions) @@ -68,26 +51,12 @@ func (p *Parameter) MarshalJSONTo(enc *jsontext.Encoder) error { } func (p *Parameter) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, p) - } - - if err := json.Unmarshal(data, &p.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &p.ParameterProps); err != nil { - return err - } - if err := json.Unmarshal(data, &p.VendorExtensible); err != nil { - return err - } - - return nil + return jsonv2.Unmarshal(data, p) } func (p *Parameter) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` ParameterProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/path.go b/vendor/k8s.io/kube-openapi/pkg/spec3/path.go index cb04cf0f9..f9767de4e 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/path.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/path.go @@ -17,14 +17,12 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "fmt" "strings" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -36,26 +34,7 @@ type Paths struct { // MarshalJSON is a custom marshal function that knows how to encode Paths as JSON func (p *Paths) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(p) - } - b1, err := json.Marshal(p.VendorExtensible) - if err != nil { - return nil, err - } - - pths := make(map[string]*Path) - for k, v := range p.Paths { - if strings.HasPrefix(k, "/") { - pths[k] = v - } - } - b2, err := json.Marshal(pths) - if err != nil { - return nil, err - } - concated := swag.ConcatJSON(b1, b2) - return concated, nil + return internal.DeterministicMarshal(p) } func (p *Paths) MarshalJSONTo(enc *jsontext.Encoder) error { @@ -75,36 +54,7 @@ func (p *Paths) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON hydrates this items instance with the data from JSON func (p *Paths) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, p) - } - var res map[string]json.RawMessage - if err := json.Unmarshal(data, &res); err != nil { - return err - } - for k, v := range res { - if strings.HasPrefix(strings.ToLower(k), "x-") { - if p.Extensions == nil { - p.Extensions = make(map[string]interface{}) - } - var d interface{} - if err := json.Unmarshal(v, &d); err != nil { - return err - } - p.Extensions[k] = d - } - if strings.HasPrefix(k, "/") { - if p.Paths == nil { - p.Paths = make(map[string]*Path) - } - var pi *Path - if err := json.Unmarshal(v, &pi); err != nil { - return err - } - p.Paths[k] = pi - } - } - return nil + return jsonv2.Unmarshal(data, p) } func (p *Paths) UnmarshalJSONFrom(dec *jsontext.Decoder) error { @@ -171,28 +121,13 @@ type Path struct { // MarshalJSON is a custom marshal function that knows how to encode Path as JSON func (p *Path) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(p) - } - b1, err := json.Marshal(p.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(p.PathProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(p.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(p) } func (p *Path) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` PathProps } x.Ref = p.Refable.Ref.String() @@ -202,24 +137,12 @@ func (p *Path) MarshalJSONTo(enc *jsontext.Encoder) error { } func (p *Path) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, p) - } - if err := json.Unmarshal(data, &p.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &p.PathProps); err != nil { - return err - } - if err := json.Unmarshal(data, &p.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, p) } func (p *Path) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` PathProps } diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go b/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go index b39c0d4fe..0c65c1504 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -37,29 +35,14 @@ type RequestBody struct { // MarshalJSON is a custom marshal function that knows how to encode RequestBody as JSON func (r *RequestBody) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(r) - } - b1, err := json.Marshal(r.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(r.RequestBodyProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(r.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(r) } func (r *RequestBody) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - RequestBodyProps requestBodyPropsOmitZero `json:",inline"` - Extensions spec.Extensions `json:",inline"` + RequestBodyProps requestBodyPropsOmitZero `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Ref = r.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(r.Extensions) @@ -68,19 +51,7 @@ func (r *RequestBody) MarshalJSONTo(enc *jsontext.Encoder) error { } func (r *RequestBody) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, r) - } - if err := json.Unmarshal(data, &r.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &r.RequestBodyProps); err != nil { - return err - } - if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, r) } // RequestBodyProps describes a single request body, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#requestBodyObject @@ -101,7 +72,7 @@ type requestBodyPropsOmitZero struct { func (r *RequestBody) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` RequestBodyProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/response.go b/vendor/k8s.io/kube-openapi/pkg/spec3/response.go index 72ad9882d..571439c6f 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/response.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/response.go @@ -18,13 +18,12 @@ package spec3 import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "fmt" "strconv" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -38,24 +37,13 @@ type Responses struct { // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON func (r *Responses) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(r) - } - b1, err := json.Marshal(r.ResponsesProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(r.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(r) } func (r Responses) MarshalJSONTo(enc *jsontext.Encoder) error { type ArbitraryKeys map[string]interface{} var x struct { - ArbitraryKeys ArbitraryKeys `json:",inline"` + ArbitraryKeys ArbitraryKeys `json:",embed"` Default *Response `json:"default,omitzero"` } x.ArbitraryKeys = make(map[string]any, len(r.Extensions)+len(r.StatusCodeResponses)) @@ -72,16 +60,7 @@ func (r Responses) MarshalJSONTo(enc *jsontext.Encoder) error { } func (r *Responses) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, r) - } - if err := json.Unmarshal(data, &r.ResponsesProps); err != nil { - return err - } - if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, r) } // ResponsesProps holds the list of possible responses as they are returned from executing this operation @@ -106,35 +85,7 @@ func (r ResponsesProps) MarshalJSON() ([]byte, error) { // UnmarshalJSON unmarshals responses from JSON func (r *ResponsesProps) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, r) - } - var res map[string]json.RawMessage - if err := json.Unmarshal(data, &res); err != nil { - return err - } - if v, ok := res["default"]; ok { - value := Response{} - if err := json.Unmarshal(v, &value); err != nil { - return err - } - r.Default = &value - delete(res, "default") - } - for k, v := range res { - // Take all integral keys - if nk, err := strconv.Atoi(k); err == nil { - if r.StatusCodeResponses == nil { - r.StatusCodeResponses = map[int]*Response{} - } - value := Response{} - if err := json.Unmarshal(v, &value); err != nil { - return err - } - r.StatusCodeResponses[nk] = &value - } - } - return nil + return jsonv2.Unmarshal(data, r) } func (r *Responses) UnmarshalJSONFrom(dec *jsontext.Decoder) (err error) { @@ -202,29 +153,14 @@ type Response struct { // MarshalJSON is a custom marshal function that knows how to encode Response as JSON func (r *Response) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(r) - } - b1, err := json.Marshal(r.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(r.ResponseProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(r.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(r) } func (r Response) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - Extensions spec.Extensions `json:",inline"` - ResponseProps `json:",inline"` + Extensions spec.Extensions `json:",embed"` + ResponseProps `json:",embed"` } x.Ref = r.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(r.Extensions) @@ -233,24 +169,12 @@ func (r Response) MarshalJSONTo(enc *jsontext.Encoder) error { } func (r *Response) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, r) - } - if err := json.Unmarshal(data, &r.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &r.ResponseProps); err != nil { - return err - } - if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, r) } func (r *Response) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` ResponseProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { @@ -285,29 +209,14 @@ type Link struct { // MarshalJSON is a custom marshal function that knows how to encode Link as JSON func (r *Link) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(r) - } - b1, err := json.Marshal(r.Refable) - if err != nil { - return nil, err - } - b2, err := json.Marshal(r.LinkProps) - if err != nil { - return nil, err - } - b3, err := json.Marshal(r.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(r) } func (r *Link) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - Extensions spec.Extensions `json:",inline"` - LinkProps `json:",inline"` + Extensions spec.Extensions `json:",embed"` + LinkProps `json:",embed"` } x.Ref = r.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(r.Extensions) @@ -316,25 +225,12 @@ func (r *Link) MarshalJSONTo(enc *jsontext.Encoder) error { } func (r *Link) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, r) - } - if err := json.Unmarshal(data, &r.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &r.LinkProps); err != nil { - return err - } - if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { - return err - } - - return nil + return jsonv2.Unmarshal(data, r) } func (l *Link) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` LinkProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go b/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go index 9bc180eaf..78109fb4d 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go @@ -18,11 +18,12 @@ package spec3 import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" + + "github.com/go-openapi/swag/jsonutils" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -35,29 +36,14 @@ type SecurityScheme struct { // MarshalJSON is a custom marshal function that knows how to encode SecurityScheme as JSON func (s *SecurityScheme) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(s) - } - b1, err := json.Marshal(s.SecuritySchemeProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(s.VendorExtensible) - if err != nil { - return nil, err - } - b3, err := json.Marshal(s.Refable) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(s) } func (s *SecurityScheme) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - SecuritySchemeProps `json:",inline"` - Extensions spec.Extensions `json:",inline"` + SecuritySchemeProps `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Ref = s.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(s.Extensions) @@ -112,7 +98,7 @@ func (o *OAuthFlow) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return swag.ConcatJSON(b1, b2), nil + return jsonutils.ConcatJSON(b1, b2), nil } // UnmarshalJSON hydrates this items instance with the data from JSON diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/server.go b/vendor/k8s.io/kube-openapi/pkg/spec3/server.go index 3037fbce4..7c789f9fb 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/server.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/server.go @@ -17,12 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -42,24 +40,13 @@ type ServerProps struct { // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON func (s *Server) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(s) - } - b1, err := json.Marshal(s.ServerProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(s.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(s) } func (s *Server) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - ServerProps `json:",inline"` - Extensions spec.Extensions `json:",inline"` + ServerProps `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Extensions = internal.SanitizeExtensions(s.Extensions) x.ServerProps = s.ServerProps @@ -67,22 +54,12 @@ func (s *Server) MarshalJSONTo(enc *jsontext.Encoder) error { } func (s *Server) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, s) - } - - if err := json.Unmarshal(data, &s.ServerProps); err != nil { - return err - } - if err := json.Unmarshal(data, &s.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, s) } func (s *Server) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` ServerProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { @@ -110,24 +87,13 @@ type ServerVariableProps struct { // MarshalJSON is a custom marshal function that knows how to encode Responses as JSON func (s *ServerVariable) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(s) - } - b1, err := json.Marshal(s.ServerVariableProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(s.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(s) } func (s *ServerVariable) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - ServerVariableProps `json:",inline"` - Extensions spec.Extensions `json:",inline"` + ServerVariableProps `json:",embed"` + Extensions spec.Extensions `json:",embed"` } x.Extensions = internal.SanitizeExtensions(s.Extensions) x.ServerVariableProps = s.ServerVariableProps @@ -135,21 +101,12 @@ func (s *ServerVariable) MarshalJSONTo(enc *jsontext.Encoder) error { } func (s *ServerVariable) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, s) - } - if err := json.Unmarshal(data, &s.ServerVariableProps); err != nil { - return err - } - if err := json.Unmarshal(data, &s.VendorExtensible); err != nil { - return err - } - return nil + return jsonv2.Unmarshal(data, s) } func (s *ServerVariable) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions spec.Extensions `json:",inline"` + Extensions spec.Extensions `json:",embed"` ServerVariableProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go b/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go index 91b1ae333..1d37a7de9 100644 --- a/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go +++ b/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go @@ -17,11 +17,10 @@ limitations under the License. package spec3 import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -46,19 +45,11 @@ type OpenAPI struct { func (o *OpenAPI) UnmarshalJSON(data []byte) error { type OpenAPIWithNoFunctions OpenAPI p := (*OpenAPIWithNoFunctions)(o) - if internal.UseOptimizedJSONUnmarshalingV3 { - return jsonv2.Unmarshal(data, &p) - } - return json.Unmarshal(data, &p) + return jsonv2.Unmarshal(data, &p) } func (o *OpenAPI) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshalingV3 { - return internal.DeterministicMarshal(o) - } - type OpenAPIWithNoFunctions OpenAPI - p := (*OpenAPIWithNoFunctions)(o) - return json.Marshal(&p) + return internal.DeterministicMarshal(o) } func (o *OpenAPI) MarshalJSONTo(enc *jsontext.Encoder) error { diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go index 5aa66ae25..5f8504144 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go @@ -15,12 +15,10 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) const ( @@ -44,33 +42,14 @@ type Header struct { // MarshalJSON marshal this to JSON func (h Header) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(h) - } - b1, err := json.Marshal(h.CommonValidations) - if err != nil { - return nil, err - } - b2, err := json.Marshal(h.SimpleSchema) - if err != nil { - return nil, err - } - b3, err := json.Marshal(h.HeaderProps) - if err != nil { - return nil, err - } - b4, err := json.Marshal(h.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3, b4), nil + return internal.DeterministicMarshal(h) } func (h Header) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - CommonValidations commonValidationsOmitZero `json:",inline"` - SimpleSchema simpleSchemaOmitZero `json:",inline"` - Extensions Extensions `json:",inline"` + CommonValidations commonValidationsOmitZero `json:",embed"` + SimpleSchema simpleSchemaOmitZero `json:",embed"` + Extensions Extensions `json:",embed"` HeaderProps } x.CommonValidations = commonValidationsOmitZero(h.CommonValidations) @@ -82,27 +61,14 @@ func (h Header) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON unmarshals this header from JSON func (h *Header) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, h) - } - - if err := json.Unmarshal(data, &h.CommonValidations); err != nil { - return err - } - if err := json.Unmarshal(data, &h.SimpleSchema); err != nil { - return err - } - if err := json.Unmarshal(data, &h.VendorExtensible); err != nil { - return err - } - return json.Unmarshal(data, &h.HeaderProps) + return jsonv2.Unmarshal(data, h) } func (h *Header) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { CommonValidations SimpleSchema - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` HeaderProps } diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go index 8d002a1c5..b426f9e15 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go @@ -16,12 +16,11 @@ package spec import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "strings" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // Extensions vendor specific extensions @@ -170,23 +169,12 @@ type Info struct { // MarshalJSON marshal this to JSON func (i Info) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(i) - } - b1, err := json.Marshal(i.InfoProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(i.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(i) } func (i Info) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` InfoProps } x.Extensions = i.Extensions @@ -196,19 +184,12 @@ func (i Info) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON marshal this from JSON func (i *Info) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, i) - } - - if err := json.Unmarshal(data, &i.InfoProps); err != nil { - return err - } - return json.Unmarshal(data, &i.VendorExtensible) + return jsonv2.Unmarshal(data, i) } func (i *Info) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` InfoProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go index 6fbb19a46..48b8e4775 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go @@ -15,12 +15,10 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) const ( @@ -96,38 +94,14 @@ type Items struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (i *Items) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, i) - } - - var validations CommonValidations - if err := json.Unmarshal(data, &validations); err != nil { - return err - } - var ref Refable - if err := json.Unmarshal(data, &ref); err != nil { - return err - } - var simpleSchema SimpleSchema - if err := json.Unmarshal(data, &simpleSchema); err != nil { - return err - } - var vendorExtensible VendorExtensible - if err := json.Unmarshal(data, &vendorExtensible); err != nil { - return err - } - i.Refable = ref - i.CommonValidations = validations - i.SimpleSchema = simpleSchema - i.VendorExtensible = vendorExtensible - return nil + return jsonv2.Unmarshal(data, i) } func (i *Items) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { CommonValidations SimpleSchema - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { return err @@ -144,34 +118,15 @@ func (i *Items) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // MarshalJSON converts this items object to JSON func (i Items) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(i) - } - b1, err := json.Marshal(i.CommonValidations) - if err != nil { - return nil, err - } - b2, err := json.Marshal(i.SimpleSchema) - if err != nil { - return nil, err - } - b3, err := json.Marshal(i.Refable) - if err != nil { - return nil, err - } - b4, err := json.Marshal(i.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b4, b3, b1, b2), nil + return internal.DeterministicMarshal(i) } func (i Items) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - CommonValidations commonValidationsOmitZero `json:",inline"` - SimpleSchema simpleSchemaOmitZero `json:",inline"` + CommonValidations commonValidationsOmitZero `json:",embed"` + SimpleSchema simpleSchemaOmitZero `json:",embed"` Ref string `json:"$ref,omitempty"` - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` } x.CommonValidations = commonValidationsOmitZero(i.CommonValidations) x.SimpleSchema = simpleSchemaOmitZero(i.SimpleSchema) diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go index 99b620f94..6e30e933d 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go @@ -16,11 +16,10 @@ package spec import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // OperationProps describes an operation @@ -95,20 +94,13 @@ type Operation struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (o *Operation) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, o) - } - - if err := json.Unmarshal(data, &o.OperationProps); err != nil { - return err - } - return json.Unmarshal(data, &o.VendorExtensible) + return jsonv2.Unmarshal(data, o) } func (o *Operation) UnmarshalJSONFrom(dec *jsontext.Decoder) error { type OperationPropsNoMethods OperationProps // strip MarshalJSON method var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` OperationPropsNoMethods } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { @@ -121,25 +113,13 @@ func (o *Operation) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // MarshalJSON converts this items object to JSON func (o Operation) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(o) - } - b1, err := json.Marshal(o.OperationProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(o.VendorExtensible) - if err != nil { - return nil, err - } - concated := swag.ConcatJSON(b1, b2) - return concated, nil + return internal.DeterministicMarshal(o) } func (o Operation) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - Extensions Extensions `json:",inline"` - OperationProps operationPropsOmitZero `json:",inline"` + Extensions Extensions `json:",embed"` + OperationProps operationPropsOmitZero `json:",embed"` } x.Extensions = internal.SanitizeExtensions(o.Extensions) x.OperationProps = operationPropsOmitZero(o.OperationProps) diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go index f2e61a721..27bf90dc0 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go @@ -15,12 +15,10 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // ParamProps describes the specific attributes of an operation parameter @@ -89,30 +87,14 @@ type Parameter struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (p *Parameter) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, p) - } - - if err := json.Unmarshal(data, &p.CommonValidations); err != nil { - return err - } - if err := json.Unmarshal(data, &p.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &p.SimpleSchema); err != nil { - return err - } - if err := json.Unmarshal(data, &p.VendorExtensible); err != nil { - return err - } - return json.Unmarshal(data, &p.ParamProps) + return jsonv2.Unmarshal(data, p) } func (p *Parameter) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { CommonValidations SimpleSchema - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` ParamProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { @@ -130,39 +112,16 @@ func (p *Parameter) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // MarshalJSON converts this items object to JSON func (p Parameter) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(p) - } - b1, err := json.Marshal(p.CommonValidations) - if err != nil { - return nil, err - } - b2, err := json.Marshal(p.SimpleSchema) - if err != nil { - return nil, err - } - b3, err := json.Marshal(p.Refable) - if err != nil { - return nil, err - } - b4, err := json.Marshal(p.VendorExtensible) - if err != nil { - return nil, err - } - b5, err := json.Marshal(p.ParamProps) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b3, b1, b2, b4, b5), nil + return internal.DeterministicMarshal(p) } func (p Parameter) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - CommonValidations commonValidationsOmitZero `json:",inline"` - SimpleSchema simpleSchemaOmitZero `json:",inline"` - ParamProps paramPropsOmitZero `json:",inline"` + CommonValidations commonValidationsOmitZero `json:",embed"` + SimpleSchema simpleSchemaOmitZero `json:",embed"` + ParamProps paramPropsOmitZero `json:",embed"` Ref string `json:"$ref,omitempty"` - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` } x.CommonValidations = commonValidationsOmitZero(p.CommonValidations) x.SimpleSchema = simpleSchemaOmitZero(p.SimpleSchema) diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go index f2a0d9542..24cd5e431 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go @@ -15,12 +15,10 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // PathItemProps the path item specific properties @@ -49,22 +47,12 @@ type PathItem struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (p *PathItem) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, p) - } - - if err := json.Unmarshal(data, &p.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &p.VendorExtensible); err != nil { - return err - } - return json.Unmarshal(data, &p.PathItemProps) + return jsonv2.Unmarshal(data, p) } func (p *PathItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` PathItemProps } @@ -82,29 +70,13 @@ func (p *PathItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // MarshalJSON converts this items object to JSON func (p PathItem) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(p) - } - b3, err := json.Marshal(p.Refable) - if err != nil { - return nil, err - } - b4, err := json.Marshal(p.VendorExtensible) - if err != nil { - return nil, err - } - b5, err := json.Marshal(p.PathItemProps) - if err != nil { - return nil, err - } - concated := swag.ConcatJSON(b3, b4, b5) - return concated, nil + return internal.DeterministicMarshal(p) } func (p PathItem) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` PathItemProps } x.Ref = p.Refable.Ref.String() diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go index 23b72ccce..c495163e0 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go @@ -15,14 +15,12 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "fmt" "strings" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // Paths holds the relative paths to the individual endpoints. @@ -38,37 +36,7 @@ type Paths struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (p *Paths) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, p) - } - - var res map[string]json.RawMessage - if err := json.Unmarshal(data, &res); err != nil { - return err - } - for k, v := range res { - if strings.HasPrefix(strings.ToLower(k), "x-") { - if p.Extensions == nil { - p.Extensions = make(map[string]interface{}) - } - var d interface{} - if err := json.Unmarshal(v, &d); err != nil { - return err - } - p.Extensions[k] = d - } - if strings.HasPrefix(k, "/") { - if p.Paths == nil { - p.Paths = make(map[string]PathItem) - } - var pi PathItem - if err := json.Unmarshal(v, &pi); err != nil { - return err - } - p.Paths[k] = pi - } - } - return nil + return jsonv2.Unmarshal(data, p) } func (p *Paths) UnmarshalJSONFrom(dec *jsontext.Decoder) error { @@ -127,26 +95,7 @@ func (p *Paths) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // MarshalJSON converts this items object to JSON func (p Paths) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(p) - } - b1, err := json.Marshal(p.VendorExtensible) - if err != nil { - return nil, err - } - - pths := make(map[string]PathItem) - for k, v := range p.Paths { - if strings.HasPrefix(k, "/") { - pths[k] = v - } - } - b2, err := json.Marshal(pths) - if err != nil { - return nil, err - } - concated := swag.ConcatJSON(b1, b2) - return concated, nil + return internal.DeterministicMarshal(p) } func (p Paths) MarshalJSONTo(enc *jsontext.Encoder) error { diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go index 585a93acc..9886fe598 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go @@ -15,12 +15,10 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // ResponseProps properties specific to a response @@ -51,27 +49,13 @@ type Response struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (r *Response) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, r) - } - - if err := json.Unmarshal(data, &r.ResponseProps); err != nil { - return err - } - if err := json.Unmarshal(data, &r.Refable); err != nil { - return err - } - if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { - return err - } - - return nil + return jsonv2.Unmarshal(data, r) } func (r *Response) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { ResponseProps - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { @@ -89,29 +73,14 @@ func (r *Response) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // MarshalJSON converts this items object to JSON func (r Response) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(r) - } - b1, err := json.Marshal(r.ResponseProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(r.Refable) - if err != nil { - return nil, err - } - b3, err := json.Marshal(r.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3), nil + return internal.DeterministicMarshal(r) } func (r Response) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { Ref string `json:"$ref,omitempty"` - Extensions Extensions `json:",inline"` - ResponseProps responsePropsOmitZero `json:",inline"` + Extensions Extensions `json:",embed"` + ResponseProps responsePropsOmitZero `json:",embed"` } x.Ref = r.Refable.Ref.String() x.Extensions = internal.SanitizeExtensions(r.Extensions) diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go index a1a3d0fd5..dbddd62f6 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go @@ -16,14 +16,12 @@ package spec import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "fmt" - "reflect" "strconv" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // Responses is a container for the expected responses of an operation. @@ -46,43 +44,18 @@ type Responses struct { // UnmarshalJSON hydrates this items instance with the data from JSON func (r *Responses) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, r) - } - - if err := json.Unmarshal(data, &r.ResponsesProps); err != nil { - return err - } - if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { - return err - } - if reflect.DeepEqual(ResponsesProps{}, r.ResponsesProps) { - r.ResponsesProps = ResponsesProps{} - } - return nil + return jsonv2.Unmarshal(data, r) } // MarshalJSON converts this items object to JSON func (r Responses) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(r) - } - b1, err := json.Marshal(r.ResponsesProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(r.VendorExtensible) - if err != nil { - return nil, err - } - concated := swag.ConcatJSON(b1, b2) - return concated, nil + return internal.DeterministicMarshal(r) } func (r Responses) MarshalJSONTo(enc *jsontext.Encoder) error { type ArbitraryKeys map[string]interface{} var x struct { - ArbitraryKeys ArbitraryKeys `json:",inline"` + ArbitraryKeys ArbitraryKeys `json:",embed"` Default *Response `json:"default,omitempty"` } x.ArbitraryKeys = make(map[string]any, len(r.Extensions)+len(r.StatusCodeResponses)) @@ -120,35 +93,7 @@ func (r ResponsesProps) MarshalJSON() ([]byte, error) { // UnmarshalJSON unmarshals responses from JSON func (r *ResponsesProps) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, r) - } - var res map[string]json.RawMessage - if err := json.Unmarshal(data, &res); err != nil { - return err - } - if v, ok := res["default"]; ok { - value := Response{} - if err := json.Unmarshal(v, &value); err != nil { - return err - } - r.Default = &value - delete(res, "default") - } - for k, v := range res { - // Take all integral keys - if nk, err := strconv.Atoi(k); err == nil { - if r.StatusCodeResponses == nil { - r.StatusCodeResponses = map[int]Response{} - } - value := Response{} - if err := json.Unmarshal(v, &value); err != nil { - return err - } - r.StatusCodeResponses[nk] = value - } - } - return nil + return jsonv2.Unmarshal(data, r) } func (r *Responses) UnmarshalJSONFrom(dec *jsontext.Decoder) (err error) { diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go index 6c0c6fc14..c282e1c8a 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go @@ -16,14 +16,11 @@ package spec import ( "encoding/json" - "fmt" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "net/url" - "strings" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // BooleanProperty creates a boolean property @@ -484,121 +481,44 @@ func (s *Schema) WithExternalDocs(description, url string) *Schema { // MarshalJSON marshal this to JSON func (s Schema) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(s) - } - b1, err := json.Marshal(s.SchemaProps) - if err != nil { - return nil, fmt.Errorf("schema props %v", err) - } - b2, err := json.Marshal(s.VendorExtensible) - if err != nil { - return nil, fmt.Errorf("vendor props %v", err) - } - b3, err := s.Ref.MarshalJSON() - if err != nil { - return nil, fmt.Errorf("ref prop %v", err) - } - b4, err := s.Schema.MarshalJSON() - if err != nil { - return nil, fmt.Errorf("schema prop %v", err) - } - b5, err := json.Marshal(s.SwaggerSchemaProps) - if err != nil { - return nil, fmt.Errorf("common validations %v", err) - } - var b6 []byte - if s.ExtraProps != nil { - jj, err := json.Marshal(s.ExtraProps) - if err != nil { - return nil, fmt.Errorf("extra props %v", err) - } - b6 = jj - } - return swag.ConcatJSON(b1, b2, b3, b4, b5, b6), nil + return internal.DeterministicMarshal(s) } func (s Schema) MarshalJSONTo(enc *jsontext.Encoder) error { type ArbitraryKeys map[string]interface{} var x struct { - ArbitraryKeys ArbitraryKeys `json:",inline"` - SchemaProps schemaPropsOmitZero `json:",inline"` - SwaggerSchemaProps swaggerSchemaPropsOmitZero `json:",inline"` + ArbitraryKeys ArbitraryKeys `json:",embed"` + SchemaProps schemaPropsOmitZero `json:",embed"` + SwaggerSchemaProps swaggerSchemaPropsOmitZero `json:",embed"` Schema string `json:"$schema,omitempty"` Ref string `json:"$ref,omitempty"` } - x.ArbitraryKeys = make(map[string]any, len(s.Extensions)+len(s.ExtraProps)) - for k, v := range s.Extensions { - if internal.IsExtensionKey(k) { + if len(s.Extensions) > 0 || len(s.ExtraProps) > 0 { + x.ArbitraryKeys = make(map[string]any, len(s.Extensions)+len(s.ExtraProps)) + for k, v := range s.Extensions { + if internal.IsExtensionKey(k) { + x.ArbitraryKeys[k] = v + } + } + for k, v := range s.ExtraProps { x.ArbitraryKeys[k] = v } } - for k, v := range s.ExtraProps { - x.ArbitraryKeys[k] = v - } x.SchemaProps = schemaPropsOmitZero(s.SchemaProps) x.SwaggerSchemaProps = swaggerSchemaPropsOmitZero(s.SwaggerSchemaProps) x.Ref = s.Ref.String() x.Schema = string(s.Schema) - return jsonv2.MarshalEncode(enc, x) + return jsonv2.MarshalEncode(enc, &x) } // UnmarshalJSON marshal this from JSON func (s *Schema) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, s) - } - - props := struct { - SchemaProps - SwaggerSchemaProps - }{} - if err := json.Unmarshal(data, &props); err != nil { - return err - } - - sch := Schema{ - SchemaProps: props.SchemaProps, - SwaggerSchemaProps: props.SwaggerSchemaProps, - } - - var d map[string]interface{} - if err := json.Unmarshal(data, &d); err != nil { - return err - } - - _ = sch.Ref.fromMap(d) - _ = sch.Schema.fromMap(d) - - delete(d, "$ref") - delete(d, "$schema") - for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) { - delete(d, pn) - } - - for k, vv := range d { - lk := strings.ToLower(k) - if strings.HasPrefix(lk, "x-") { - if sch.Extensions == nil { - sch.Extensions = map[string]interface{}{} - } - sch.Extensions[k] = vv - continue - } - if sch.ExtraProps == nil { - sch.ExtraProps = map[string]interface{}{} - } - sch.ExtraProps[k] = vv - } - - *s = sch - - return nil + return jsonv2.Unmarshal(data, s) } func (s *Schema) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` SchemaProps SwaggerSchemaProps } @@ -617,9 +537,6 @@ func (s *Schema) UnmarshalJSONFrom(dec *jsontext.Decoder) error { delete(x.Extensions, "$ref") delete(x.Extensions, "$schema") - for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) { - delete(x.Extensions, pn) - } if len(x.Extensions) == 0 { x.Extensions = nil } diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go index 7c7b6bdd8..7f6bbda56 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go @@ -16,11 +16,10 @@ package spec import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // SecuritySchemeProps describes a swagger security scheme in the securityDefinitions section @@ -47,23 +46,12 @@ type SecurityScheme struct { // MarshalJSON marshal this to JSON func (s SecurityScheme) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(s) - } - b1, err := json.Marshal(s.SecuritySchemeProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(s.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(s) } func (s SecurityScheme) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` SecuritySchemeProps } x.Extensions = internal.SanitizeExtensions(s.Extensions) @@ -81,7 +69,7 @@ func (s *SecurityScheme) UnmarshalJSON(data []byte) error { func (s *SecurityScheme) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` SecuritySchemeProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go index 533b7cc83..690d6ff7d 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go @@ -16,12 +16,11 @@ package spec import ( "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" "fmt" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // Swagger this is the root document object for the API specification. @@ -36,24 +35,13 @@ type Swagger struct { // MarshalJSON marshals this swagger structure to json func (s Swagger) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(s) - } - b1, err := json.Marshal(s.SwaggerProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(s.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(s) } // MarshalJSON marshals this swagger structure to json func (s Swagger) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` SwaggerProps } x.Extensions = internal.SanitizeExtensions(s.Extensions) @@ -63,18 +51,7 @@ func (s Swagger) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON unmarshals a swagger spec from json func (s *Swagger) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, s) - } - var sw Swagger - if err := json.Unmarshal(data, &sw.SwaggerProps); err != nil { - return err - } - if err := json.Unmarshal(data, &sw.VendorExtensible); err != nil { - return err - } - *s = sw - return nil + return jsonv2.Unmarshal(data, s) } func (s *Swagger) UnmarshalJSONFrom(dec *jsontext.Decoder) error { @@ -82,7 +59,7 @@ func (s *Swagger) UnmarshalJSONFrom(dec *jsontext.Decoder) error { // optimize this and other usages of this pattern: // https://github.com/kubernetes/kube-openapi/pull/319#discussion_r983165948 var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` SwaggerProps } @@ -133,17 +110,7 @@ var jsFalse = []byte("false") // MarshalJSON convert this object to JSON func (s SchemaOrBool) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(s) - } - if s.Schema != nil { - return json.Marshal(s.Schema) - } - - if s.Schema == nil && !s.Allows { - return jsFalse, nil - } - return jsTrue, nil + return internal.DeterministicMarshal(s) } // MarshalJSON convert this object to JSON @@ -160,23 +127,7 @@ func (s SchemaOrBool) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON converts this bool or schema object from a JSON structure func (s *SchemaOrBool) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, s) - } - - var nw SchemaOrBool - if len(data) > 0 && data[0] == '{' { - var sch Schema - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - nw.Allows = true - } else { - json.Unmarshal(data, &nw.Allows) - } - *s = nw - return nil + return jsonv2.Unmarshal(data, s) } func (s *SchemaOrBool) UnmarshalJSONFrom(dec *jsontext.Decoder) error { @@ -207,16 +158,7 @@ type SchemaOrStringArray struct { // MarshalJSON converts this schema object or array into JSON structure func (s SchemaOrStringArray) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(s) - } - if len(s.Property) > 0 { - return json.Marshal(s.Property) - } - if s.Schema != nil { - return json.Marshal(s.Schema) - } - return []byte("null"), nil + return internal.DeterministicMarshal(s) } // MarshalJSON converts this schema object or array into JSON structure @@ -232,29 +174,7 @@ func (s SchemaOrStringArray) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON converts this schema object or array from a JSON structure func (s *SchemaOrStringArray) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, s) - } - - var first byte - if len(data) > 1 { - first = data[0] - } - var nw SchemaOrStringArray - if first == '{' { - var sch Schema - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - } - if first == '[' { - if err := json.Unmarshal(data, &nw.Property); err != nil { - return err - } - } - *s = nw - return nil + return jsonv2.Unmarshal(data, s) } func (s *SchemaOrStringArray) UnmarshalJSONFrom(dec *jsontext.Decoder) error { @@ -299,38 +219,7 @@ func (s StringOrArray) Contains(value string) bool { // UnmarshalJSON unmarshals this string or array object from a JSON array or JSON string func (s *StringOrArray) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, s) - } - - var first byte - if len(data) > 1 { - first = data[0] - } - - if first == '[' { - var parsed []string - if err := json.Unmarshal(data, &parsed); err != nil { - return err - } - *s = StringOrArray(parsed) - return nil - } - - var single interface{} - if err := json.Unmarshal(data, &single); err != nil { - return err - } - if single == nil { - return nil - } - switch v := single.(type) { - case string: - *s = StringOrArray([]string{v}) - return nil - default: - return fmt.Errorf("only string or array is allowed, not %T", single) - } + return jsonv2.Unmarshal(data, s) } func (s *StringOrArray) UnmarshalJSONFrom(dec *jsontext.Decoder) error { @@ -383,13 +272,7 @@ func (s *SchemaOrArray) ContainsType(name string) bool { // MarshalJSON converts this schema object or array into JSON structure func (s SchemaOrArray) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(s) - } - if s.Schemas != nil { - return json.Marshal(s.Schemas) - } - return json.Marshal(s.Schema) + return internal.DeterministicMarshal(s) } // MarshalJSON converts this schema object or array into JSON structure @@ -402,29 +285,7 @@ func (s SchemaOrArray) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON converts this schema object or array from a JSON structure func (s *SchemaOrArray) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, s) - } - - var nw SchemaOrArray - var first byte - if len(data) > 1 { - first = data[0] - } - if first == '{' { - var sch Schema - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - } - if first == '[' { - if err := json.Unmarshal(data, &nw.Schemas); err != nil { - return err - } - } - *s = nw - return nil + return jsonv2.Unmarshal(data, s) } func (s *SchemaOrArray) UnmarshalJSONFrom(dec *jsontext.Decoder) error { diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go index 89c3d0d82..b3b57c60c 100644 --- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go +++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go @@ -15,12 +15,10 @@ package spec import ( - "encoding/json" + "encoding/json/jsontext" + jsonv2 "encoding/json/v2" - "github.com/go-openapi/swag" "k8s.io/kube-openapi/pkg/internal" - jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" - "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext" ) // TagProps describe a tag entry in the top level tags section of a swagger spec @@ -42,23 +40,12 @@ type Tag struct { // MarshalJSON marshal this to JSON func (t Tag) MarshalJSON() ([]byte, error) { - if internal.UseOptimizedJSONMarshaling { - return internal.DeterministicMarshal(t) - } - b1, err := json.Marshal(t.TagProps) - if err != nil { - return nil, err - } - b2, err := json.Marshal(t.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2), nil + return internal.DeterministicMarshal(t) } func (t Tag) MarshalJSONTo(enc *jsontext.Encoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` TagProps } x.Extensions = internal.SanitizeExtensions(t.Extensions) @@ -68,19 +55,12 @@ func (t Tag) MarshalJSONTo(enc *jsontext.Encoder) error { // UnmarshalJSON marshal this from JSON func (t *Tag) UnmarshalJSON(data []byte) error { - if internal.UseOptimizedJSONUnmarshaling { - return jsonv2.Unmarshal(data, t) - } - - if err := json.Unmarshal(data, &t.TagProps); err != nil { - return err - } - return json.Unmarshal(data, &t.VendorExtensible) + return jsonv2.Unmarshal(data, t) } func (t *Tag) UnmarshalJSONFrom(dec *jsontext.Decoder) error { var x struct { - Extensions Extensions `json:",inline"` + Extensions Extensions `json:",embed"` TagProps } if err := jsonv2.UnmarshalDecode(dec, &x); err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 0aea88eaa..4a64b9a65 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -133,45 +133,21 @@ github.com/go-openapi/jsonpointer/jsonname ## explicit; go 1.25.0 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/swag v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag -# github.com/go-openapi/swag/cmdutils v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/cmdutils # github.com/go-openapi/swag/conv v0.27.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/conv -# github.com/go-openapi/swag/fileutils v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/fileutils # github.com/go-openapi/swag/jsonutils v0.27.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/jsonutils github.com/go-openapi/swag/jsonutils/adapters github.com/go-openapi/swag/jsonutils/adapters/ifaces github.com/go-openapi/swag/jsonutils/adapters/stdlib/json -# github.com/go-openapi/swag/loading v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/loading -# github.com/go-openapi/swag/mangling v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/mangling -# github.com/go-openapi/swag/netutils v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/netutils # github.com/go-openapi/swag/pools v0.27.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/pools -# github.com/go-openapi/swag/stringutils v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/stringutils # github.com/go-openapi/swag/typeutils v0.27.1 ## explicit; go 1.25.0 github.com/go-openapi/swag/typeutils -# github.com/go-openapi/swag/yamlutils v0.27.1 -## explicit; go 1.25.0 -github.com/go-openapi/swag/yamlutils # github.com/godbus/dbus/v5 v5.2.2 ## explicit; go 1.20 github.com/godbus/dbus/v5 @@ -233,8 +209,8 @@ github.com/kr/text # github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de ## explicit github.com/liggitt/tabwriter -# github.com/longhorn/go-common-libs v0.0.0-20260909075701-1a37e0e5083e -## explicit; go 1.25.10 +# github.com/longhorn/go-common-libs v0.0.0-20261028232656-6805a1f65080 +## explicit; go 1.26.0 github.com/longhorn/go-common-libs/exec github.com/longhorn/go-common-libs/io github.com/longhorn/go-common-libs/kubernetes @@ -938,18 +914,12 @@ k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler k8s.io/klog/v2/internal/verbosity k8s.io/klog/v2/textlogger -# k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad -## explicit; go 1.25.0 +# k8s.io/kube-openapi v0.0.0-20261001230523-97fa35140926 +## explicit; go 1.27.0 k8s.io/kube-openapi/pkg/cached k8s.io/kube-openapi/pkg/common k8s.io/kube-openapi/pkg/handler3 k8s.io/kube-openapi/pkg/internal -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonflags -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonopts -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/internal/jsonwire -k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/jsontext k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util @@ -993,8 +963,8 @@ k8s.io/streaming/pkg/httpstream k8s.io/streaming/pkg/httpstream/spdy k8s.io/streaming/pkg/httpstream/wsstream k8s.io/streaming/pkg/runtime -# k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 -## explicit; go 1.25 +# k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab +## explicit; go 1.26 k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/dump @@ -1057,8 +1027,8 @@ sigs.k8s.io/kustomize/api/provider sigs.k8s.io/kustomize/api/resmap sigs.k8s.io/kustomize/api/resource sigs.k8s.io/kustomize/api/types -# sigs.k8s.io/kustomize/kyaml v0.21.2 -## explicit; go 1.26.0 +# sigs.k8s.io/kustomize/kyaml v0.21.3 +## explicit; go 1.27.0 sigs.k8s.io/kustomize/kyaml/comments sigs.k8s.io/kustomize/kyaml/errors sigs.k8s.io/kustomize/kyaml/ext @@ -1098,6 +1068,9 @@ sigs.k8s.io/structured-merge-diff/v6/merge sigs.k8s.io/structured-merge-diff/v6/schema sigs.k8s.io/structured-merge-diff/v6/typed sigs.k8s.io/structured-merge-diff/v6/value +# sigs.k8s.io/structured-merge-diff/v7 v7.0.0 +## explicit; go 1.27 +sigs.k8s.io/structured-merge-diff/v7/schema # sigs.k8s.io/yaml v1.6.0 ## explicit; go 1.22 sigs.k8s.io/yaml diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil/functiontypes.go b/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil/functiontypes.go index cd6cb8e28..0adf7eb0e 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil/functiontypes.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil/functiontypes.go @@ -6,6 +6,7 @@ package runtimeutil import ( "fmt" "os" + "slices" "sort" "strings" @@ -73,12 +74,7 @@ func (ce *ContainerEnv) AddKeyValue(key, value string) { // HasExportedKey returns true if the key is a exported key func (ce *ContainerEnv) HasExportedKey(key string) bool { - for _, k := range ce.VarsToExport { - if k == key { - return true - } - } - return false + return slices.Contains(ce.VarsToExport, key) } // AddKey adds a key into the envs diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/kio/kioutil/kioutil.go b/vendor/sigs.k8s.io/kustomize/kyaml/kio/kioutil/kioutil.go index 818d6ca00..3394b795a 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/kio/kioutil/kioutil.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/kio/kioutil/kioutil.go @@ -6,6 +6,7 @@ package kioutil import ( "fmt" "path" + "slices" "sort" "strconv" "strings" @@ -338,7 +339,7 @@ func SortNodes(nodes []*yaml.RNode) error { func CopyInternalAnnotations(src *yaml.RNode, dst *yaml.RNode, exclusions ...AnnotationKey) error { srcAnnotations := GetInternalAnnotations(src) for k, v := range srcAnnotations { - if stringSliceContains(exclusions, k) { + if slices.Contains(exclusions, k) { continue } if err := dst.PipeE(yaml.SetAnnotation(k, v)); err != nil { @@ -359,7 +360,7 @@ func ConfirmInternalAnnotationUnchanged(r1 *yaml.RNode, r2 *yaml.RNode, exclusio diffAnnos := make(map[string]bool) for k, v1 := range r1Annotations { - if stringSliceContains(exclusions, k) { + if slices.Contains(exclusions, k) { continue } if v2, ok := r2Annotations[k]; !ok || v1 != v2 { @@ -368,7 +369,7 @@ func ConfirmInternalAnnotationUnchanged(r1 *yaml.RNode, r2 *yaml.RNode, exclusio } for k, v2 := range r2Annotations { - if stringSliceContains(exclusions, k) { + if slices.Contains(exclusions, k) { continue } if v1, ok := r1Annotations[k]; !ok || v2 != v1 { @@ -408,13 +409,3 @@ func GetInternalAnnotations(rn *yaml.RNode) map[string]string { } return result } - -// stringSliceContains returns true if the slice has the string. -func stringSliceContains(slice []string, str string) bool { - for _, s := range slice { - if s == str { - return true - } - } - return false -} diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/README.md b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/README.md index a265b519c..ae241d5c7 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/README.md +++ b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/README.md @@ -4,7 +4,7 @@ Kustomize embeds a compiled OpenAPI bundle for Kubernetes built-in types. The runtime artifact is: ``` -kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json.gz +kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json ``` The Kubernetes suffix identifies the newest Kubernetes schema represented by @@ -44,9 +44,10 @@ make -C kyaml/openapi generate ``` The compiler performs the protobuf-to-OpenAPI conversion, constructs the GVK -and scope index, validates local references, writes canonical JSON, and uses a -deterministic gzip header. The generated artifact must be byte-for-byte -reproducible. Verify it and run the OpenAPI tests with: +and scope index, validates local references, and writes deterministic, +formatted JSON. The generated artifact is stored as plain text so its contents +and changes can be reviewed. It must be byte-for-byte reproducible. Verify it +and run the OpenAPI tests with: ``` make -C kyaml/openapi verify diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/builtin_schema.go b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/builtin_schema.go index 0eee4ec0a..2a29ad23e 100644 --- a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/builtin_schema.go +++ b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/builtin_schema.go @@ -5,7 +5,7 @@ package openapi import _ "embed" -//go:generate go run ./cmd/openapi-bundle -input kubernetesapi/v1_21_2/swagger.pb.gz -output kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json.gz -kubernetes-version v1.21.2 +//go:generate go run ./cmd/openapi-bundle -input kubernetesapi/v1_21_2/swagger.pb.gz -output kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json -kubernetes-version v1.21.2 const ( // DefaultOpenAPI is the Kubernetes version represented by the built-in @@ -16,7 +16,7 @@ const ( BuiltinSchemaInfo = "{title:Kubernetes,version:" + DefaultOpenAPI + "}" ) -//go:embed kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json.gz +//go:embed kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json var builtinKubernetesOpenAPIBundle []byte //go:embed kustomizationapi/swagger.json diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json new file mode 100644 index 000000000..d736cdf8a --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json @@ -0,0 +1,20331 @@ +{ + "formatVersion": 1, + "coverage": { + "floor": "v1.21.2", + "ceiling": "v1.21.2" + }, + "selectionPolicy": "latest-wins-fill-missing", + "sources": [ + { + "kubernetesVersion": "v1.21.2", + "sha256": "5d171b55e9601912807a870d73ffe70bb306f5889a00e76986042a0f2d7b6bc2" + } + ], + "definitions": { + "io.k8s.api.admissionregistration.v1.MutatingWebhook": { + "description": "MutatingWebhook describes an admission webhook and the resources and operations it applies to.", + "type": "object", + "required": [ + "name", + "clientConfig", + "sideEffects", + "admissionReviewVersions" + ], + "properties": { + "admissionReviewVersions": { + "description": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", + "type": "array", + "items": { + "type": "string" + } + }, + "clientConfig": { + "description": "ClientConfig defines how to communicate with the hook. Required", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.WebhookClientConfig" + }, + "failurePolicy": { + "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.", + "type": "string" + }, + "matchPolicy": { + "description": "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"", + "type": "string" + }, + "name": { + "description": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + "type": "string" + }, + "namespaceSelector": { + "description": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "objectSelector": { + "description": "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "reinvocationPolicy": { + "description": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", + "type": "string" + }, + "rules": { + "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.RuleWithOperations" + } + }, + "sideEffects": { + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", + "type": "string" + }, + "timeoutSeconds": { + "description": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration": { + "description": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", + "type": "object", + "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": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "webhooks": { + "description": "Webhooks is a list of webhooks and the affected resources and operations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.MutatingWebhook" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1" + } + ] + }, + "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList": { + "description": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of MutatingWebhookConfiguration.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfigurationList", + "version": "v1" + } + ] + }, + "io.k8s.api.admissionregistration.v1.RuleWithOperations": { + "description": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", + "type": "object", + "properties": { + "apiGroups": { + "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "apiVersions": { + "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "operations": { + "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "scope": { + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" + } + } + }, + "io.k8s.api.admissionregistration.v1.ServiceReference": { + "description": "ServiceReference holds a reference to Service.legacy.k8s.io", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "`name` is the name of the service. Required", + "type": "string" + }, + "namespace": { + "description": "`namespace` is the namespace of the service. Required", + "type": "string" + }, + "path": { + "description": "`path` is an optional URL path which will be sent in any request to this service.", + "type": "string" + }, + "port": { + "description": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.admissionregistration.v1.ValidatingWebhook": { + "description": "ValidatingWebhook describes an admission webhook and the resources and operations it applies to.", + "type": "object", + "required": [ + "name", + "clientConfig", + "sideEffects", + "admissionReviewVersions" + ], + "properties": { + "admissionReviewVersions": { + "description": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", + "type": "array", + "items": { + "type": "string" + } + }, + "clientConfig": { + "description": "ClientConfig defines how to communicate with the hook. Required", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.WebhookClientConfig" + }, + "failurePolicy": { + "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.", + "type": "string" + }, + "matchPolicy": { + "description": "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"", + "type": "string" + }, + "name": { + "description": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + "type": "string" + }, + "namespaceSelector": { + "description": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "objectSelector": { + "description": "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "rules": { + "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.RuleWithOperations" + } + }, + "sideEffects": { + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", + "type": "string" + }, + "timeoutSeconds": { + "description": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration": { + "description": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", + "type": "object", + "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": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "webhooks": { + "description": "Webhooks is a list of webhooks and the affected resources and operations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.ValidatingWebhook" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1" + } + ] + }, + "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList": { + "description": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of ValidatingWebhookConfiguration.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfigurationList", + "version": "v1" + } + ] + }, + "io.k8s.api.admissionregistration.v1.WebhookClientConfig": { + "description": "WebhookClientConfig contains the information to make a TLS connection with the webhook", + "type": "object", + "properties": { + "caBundle": { + "description": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + "type": "string", + "format": "byte" + }, + "service": { + "description": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1.ServiceReference" + }, + "url": { + "description": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + "type": "string" + } + } + }, + "io.k8s.api.admissionregistration.v1beta1.MutatingWebhook": { + "description": "MutatingWebhook describes an admission webhook and the resources and operations it applies to.", + "type": "object", + "required": [ + "name", + "clientConfig" + ], + "properties": { + "admissionReviewVersions": { + "description": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", + "type": "array", + "items": { + "type": "string" + } + }, + "clientConfig": { + "description": "ClientConfig defines how to communicate with the hook. Required", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig" + }, + "failurePolicy": { + "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", + "type": "string" + }, + "matchPolicy": { + "description": "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Exact\"", + "type": "string" + }, + "name": { + "description": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + "type": "string" + }, + "namespaceSelector": { + "description": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "objectSelector": { + "description": "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "reinvocationPolicy": { + "description": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", + "type": "string" + }, + "rules": { + "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.RuleWithOperations" + } + }, + "sideEffects": { + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", + "type": "string" + }, + "timeoutSeconds": { + "description": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration": { + "description": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.", + "type": "object", + "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": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "webhooks": { + "description": "Webhooks is a list of webhooks and the affected resources and operations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.MutatingWebhook" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfiguration", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList": { + "description": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of MutatingWebhookConfiguration.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "MutatingWebhookConfigurationList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.admissionregistration.v1beta1.RuleWithOperations": { + "description": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", + "type": "object", + "properties": { + "apiGroups": { + "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "apiVersions": { + "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "operations": { + "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + "type": "array", + "items": { + "type": "string" + } + }, + "scope": { + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" + } + } + }, + "io.k8s.api.admissionregistration.v1beta1.ServiceReference": { + "description": "ServiceReference holds a reference to Service.legacy.k8s.io", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "`name` is the name of the service. Required", + "type": "string" + }, + "namespace": { + "description": "`namespace` is the namespace of the service. Required", + "type": "string" + }, + "path": { + "description": "`path` is an optional URL path which will be sent in any request to this service.", + "type": "string" + }, + "port": { + "description": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook": { + "description": "ValidatingWebhook describes an admission webhook and the resources and operations it applies to.", + "type": "object", + "required": [ + "name", + "clientConfig" + ], + "properties": { + "admissionReviewVersions": { + "description": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", + "type": "array", + "items": { + "type": "string" + } + }, + "clientConfig": { + "description": "ClientConfig defines how to communicate with the hook. Required", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig" + }, + "failurePolicy": { + "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", + "type": "string" + }, + "matchPolicy": { + "description": "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Exact\"", + "type": "string" + }, + "name": { + "description": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", + "type": "string" + }, + "namespaceSelector": { + "description": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "objectSelector": { + "description": "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "rules": { + "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.RuleWithOperations" + } + }, + "sideEffects": { + "description": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", + "type": "string" + }, + "timeoutSeconds": { + "description": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration": { + "description": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead.", + "type": "object", + "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": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "webhooks": { + "description": "Webhooks is a list of webhooks and the affected resources and operations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfiguration", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfigurationList": { + "description": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of ValidatingWebhookConfiguration.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "admissionregistration.k8s.io", + "kind": "ValidatingWebhookConfigurationList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig": { + "description": "WebhookClientConfig contains the information to make a TLS connection with the webhook", + "type": "object", + "properties": { + "caBundle": { + "description": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + "type": "string", + "format": "byte" + }, + "service": { + "description": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1beta1.ServiceReference" + }, + "url": { + "description": "`url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.ControllerRevision": { + "description": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", + "type": "object", + "required": [ + "revision" + ], + "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" + }, + "data": { + "description": "Data is the serialized representation of the state.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "revision": { + "description": "Revision indicates the revision of the state represented by Data.", + "type": "integer", + "format": "int64" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "ControllerRevision", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.ControllerRevisionList": { + "description": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of ControllerRevisions", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.ControllerRevision" + } + }, + "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": { + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "ControllerRevisionList", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.DaemonSet": { + "description": "DaemonSet represents the configuration of a daemon set.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.apps.v1.DaemonSetSpec" + }, + "status": { + "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.apps.v1.DaemonSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "DaemonSet", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.DaemonSetCondition": { + "description": "DaemonSetCondition describes the state of a DaemonSet at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of DaemonSet condition.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.DaemonSetList": { + "description": "DaemonSetList is a collection of daemon sets.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "A list of daemon sets.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.DaemonSet" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "DaemonSetList", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.DaemonSetSpec": { + "description": "DaemonSetSpec is the specification of a daemon set.", + "type": "object", + "required": [ + "selector", + "template" + ], + "properties": { + "minReadySeconds": { + "description": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "template": { + "description": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + }, + "updateStrategy": { + "description": "An update strategy to replace existing DaemonSet pods with new pods.", + "$ref": "#/definitions/io.k8s.api.apps.v1.DaemonSetUpdateStrategy" + } + } + }, + "io.k8s.api.apps.v1.DaemonSetStatus": { + "description": "DaemonSetStatus represents the current status of a daemon set.", + "type": "object", + "required": [ + "currentNumberScheduled", + "numberMisscheduled", + "desiredNumberScheduled", + "numberReady" + ], + "properties": { + "collisionCount": { + "description": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a DaemonSet's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.DaemonSetCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "currentNumberScheduled": { + "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + "type": "integer", + "format": "int32" + }, + "desiredNumberScheduled": { + "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + "type": "integer", + "format": "int32" + }, + "numberAvailable": { + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", + "type": "integer", + "format": "int32" + }, + "numberMisscheduled": { + "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", + "type": "integer", + "format": "int32" + }, + "numberReady": { + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + "type": "integer", + "format": "int32" + }, + "numberUnavailable": { + "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "The most recent generation observed by the daemon set controller.", + "type": "integer", + "format": "int64" + }, + "updatedNumberScheduled": { + "description": "The total number of nodes that are running updated daemon pod", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1.DaemonSetUpdateStrategy": { + "description": "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.", + "type": "object", + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if type = \"RollingUpdate\".", + "$ref": "#/definitions/io.k8s.api.apps.v1.RollingUpdateDaemonSet" + }, + "type": { + "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.Deployment": { + "description": "Deployment enables declarative updates for Pods and ReplicaSets.", + "type": "object", + "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": { + "description": "Standard object metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the Deployment.", + "$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentSpec" + }, + "status": { + "description": "Most recently observed status of the Deployment.", + "$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "Deployment", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.DeploymentCondition": { + "description": "DeploymentCondition describes the state of a deployment at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastUpdateTime": { + "description": "The last time this condition was updated.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of deployment condition.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.DeploymentList": { + "description": "DeploymentList is a list of Deployments.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of Deployments.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.Deployment" + } + }, + "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": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "DeploymentList", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.DeploymentSpec": { + "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "type": "object", + "required": [ + "selector", + "template" + ], + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "paused": { + "description": "Indicates that the deployment is paused.", + "type": "boolean" + }, + "progressDeadlineSeconds": { + "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "strategy": { + "description": "The deployment strategy to use to replace existing pods with new ones.", + "$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentStrategy", + "x-kubernetes-patch-strategy": "retainKeys" + }, + "template": { + "description": "Template describes the pods that will be created.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + } + }, + "io.k8s.api.apps.v1.DeploymentStatus": { + "description": "DeploymentStatus is the most recently observed status of the Deployment.", + "type": "object", + "properties": { + "availableReplicas": { + "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "collisionCount": { + "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a deployment's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.DeploymentCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "observedGeneration": { + "description": "The generation observed by the deployment controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "Total number of ready pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "type": "integer", + "format": "int32" + }, + "unavailableReplicas": { + "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1.DeploymentStrategy": { + "description": "DeploymentStrategy describes how to replace existing pods with new ones.", + "type": "object", + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + "$ref": "#/definitions/io.k8s.api.apps.v1.RollingUpdateDeployment" + }, + "type": { + "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.ReplicaSet": { + "description": "ReplicaSet ensures that a specified number of pod replicas are running at any given time.", + "type": "object", + "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": { + "description": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.apps.v1.ReplicaSetSpec" + }, + "status": { + "description": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.apps.v1.ReplicaSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "ReplicaSet", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.ReplicaSetCondition": { + "description": "ReplicaSetCondition describes the state of a replica set at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "The last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of replica set condition.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.ReplicaSetList": { + "description": "ReplicaSetList is a collection of ReplicaSets.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.ReplicaSet" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "ReplicaSetList", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.ReplicaSetSpec": { + "description": "ReplicaSetSpec is the specification of a ReplicaSet.", + "type": "object", + "required": [ + "selector" + ], + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the replica count. Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + } + }, + "io.k8s.api.apps.v1.ReplicaSetStatus": { + "description": "ReplicaSetStatus represents the current status of a ReplicaSet.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "availableReplicas": { + "description": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a replica set's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.ReplicaSetCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "fullyLabeledReplicas": { + "description": "The number of pods that have labels matching the labels of the pod template of the replicaset.", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "The number of ready replicas for this replica set.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1.RollingUpdateDaemonSet": { + "description": "Spec to control the desired behavior of daemon set rolling update.", + "type": "object", + "properties": { + "maxSurge": { + "description": "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is an alpha field and requires enabling DaemonSetUpdateSurge feature gate.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "maxUnavailable": { + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding down to a minimum of one. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.apps.v1.RollingUpdateDeployment": { + "description": "Spec to control the desired behavior of rolling update.", + "type": "object", + "properties": { + "maxSurge": { + "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "maxUnavailable": { + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy": { + "description": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + "type": "object", + "properties": { + "partition": { + "description": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1.StatefulSet": { + "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + "type": "object", + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired identities of pods in this set.", + "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetSpec" + }, + "status": { + "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "StatefulSet", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.StatefulSetCondition": { + "description": "StatefulSetCondition describes the state of a statefulset at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of statefulset condition.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1.StatefulSetList": { + "description": "StatefulSetList is a collection of StatefulSets.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSet" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "StatefulSetList", + "version": "v1" + } + ] + }, + "io.k8s.api.apps.v1.StatefulSetSpec": { + "description": "A StatefulSetSpec is the specification of a StatefulSet.", + "type": "object", + "required": [ + "selector", + "template", + "serviceName" + ], + "properties": { + "podManagementPolicy": { + "description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", + "type": "string" + }, + "replicas": { + "description": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "selector is a label query over pods that should match the replica count. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "serviceName": { + "description": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + "type": "string" + }, + "template": { + "description": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + }, + "updateStrategy": { + "description": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetUpdateStrategy" + }, + "volumeClaimTemplates": { + "description": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" + } + } + } + }, + "io.k8s.api.apps.v1.StatefulSetStatus": { + "description": "StatefulSetStatus represents the current state of a StatefulSet.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "collisionCount": { + "description": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a statefulset's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "currentReplicas": { + "description": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", + "type": "integer", + "format": "int32" + }, + "currentRevision": { + "description": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "replicas is the number of Pods created by the StatefulSet controller.", + "type": "integer", + "format": "int32" + }, + "updateRevision": { + "description": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", + "type": "string" + }, + "updatedReplicas": { + "description": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1.StatefulSetUpdateStrategy": { + "description": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + "type": "object", + "properties": { + "rollingUpdate": { + "description": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", + "$ref": "#/definitions/io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy" + }, + "type": { + "description": "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", + "type": "string" + } + } + }, + "io.k8s.api.authentication.v1.BoundObjectReference": { + "description": "BoundObjectReference is a reference to an object that a token is bound to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "kind": { + "description": "Kind of the referent. Valid kinds are 'Pod' and 'Secret'.", + "type": "string" + }, + "name": { + "description": "Name of the referent.", + "type": "string" + }, + "uid": { + "description": "UID of the referent.", + "type": "string" + } + } + }, + "io.k8s.api.authentication.v1.TokenRequest": { + "description": "TokenRequest requests a token for a given service account.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenRequestSpec" + }, + "status": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenRequestStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authentication.k8s.io", + "kind": "TokenRequest", + "version": "v1" + } + ] + }, + "io.k8s.api.authentication.v1.TokenRequestSpec": { + "description": "TokenRequestSpec contains client provided parameters of a token request.", + "type": "object", + "required": [ + "audiences" + ], + "properties": { + "audiences": { + "description": "Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.", + "type": "array", + "items": { + "type": "string" + } + }, + "boundObjectRef": { + "description": "BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.", + "$ref": "#/definitions/io.k8s.api.authentication.v1.BoundObjectReference" + }, + "expirationSeconds": { + "description": "ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.authentication.v1.TokenRequestStatus": { + "description": "TokenRequestStatus is the result of a token request.", + "type": "object", + "required": [ + "token", + "expirationTimestamp" + ], + "properties": { + "expirationTimestamp": { + "description": "ExpirationTimestamp is the time of expiration of the returned token.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "token": { + "description": "Token is the opaque bearer token.", + "type": "string" + } + } + }, + "io.k8s.api.authentication.v1.TokenReview": { + "description": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request can be authenticated.", + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authentication.k8s.io", + "kind": "TokenReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authentication.v1.TokenReviewSpec": { + "description": "TokenReviewSpec is a description of the token authentication request.", + "type": "object", + "properties": { + "audiences": { + "description": "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "description": "Token is the opaque bearer token.", + "type": "string" + } + } + }, + "io.k8s.api.authentication.v1.TokenReviewStatus": { + "description": "TokenReviewStatus is the result of the token authentication request.", + "type": "object", + "properties": { + "audiences": { + "description": "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", + "type": "array", + "items": { + "type": "string" + } + }, + "authenticated": { + "description": "Authenticated indicates that the token was associated with a known user.", + "type": "boolean" + }, + "error": { + "description": "Error indicates that the token couldn't be checked", + "type": "string" + }, + "user": { + "description": "User is the UserInfo associated with the provided token.", + "$ref": "#/definitions/io.k8s.api.authentication.v1.UserInfo" + } + } + }, + "io.k8s.api.authentication.v1.UserInfo": { + "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", + "type": "object", + "properties": { + "extra": { + "description": "Any additional information provided by the authenticator.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "The names of groups this user is a part of.", + "type": "array", + "items": { + "type": "string" + } + }, + "uid": { + "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + "type": "string" + }, + "username": { + "description": "The name that uniquely identifies this user among all active users.", + "type": "string" + } + } + }, + "io.k8s.api.authentication.v1beta1.TokenReview": { + "description": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request can be authenticated.", + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authentication.k8s.io", + "kind": "TokenReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authentication.v1beta1.TokenReviewSpec": { + "description": "TokenReviewSpec is a description of the token authentication request.", + "type": "object", + "properties": { + "audiences": { + "description": "Audiences is a list of the identifiers that the resource server presented with the token identifies as. Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.", + "type": "array", + "items": { + "type": "string" + } + }, + "token": { + "description": "Token is the opaque bearer token.", + "type": "string" + } + } + }, + "io.k8s.api.authentication.v1beta1.TokenReviewStatus": { + "description": "TokenReviewStatus is the result of the token authentication request.", + "type": "object", + "properties": { + "audiences": { + "description": "Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is \"true\", the token is valid against the audience of the Kubernetes API server.", + "type": "array", + "items": { + "type": "string" + } + }, + "authenticated": { + "description": "Authenticated indicates that the token was associated with a known user.", + "type": "boolean" + }, + "error": { + "description": "Error indicates that the token couldn't be checked", + "type": "string" + }, + "user": { + "description": "User is the UserInfo associated with the provided token.", + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.UserInfo" + } + } + }, + "io.k8s.api.authentication.v1beta1.UserInfo": { + "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", + "type": "object", + "properties": { + "extra": { + "description": "Any additional information provided by the authenticator.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "The names of groups this user is a part of.", + "type": "array", + "items": { + "type": "string" + } + }, + "uid": { + "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + "type": "string" + }, + "username": { + "description": "The name that uniquely identifies this user among all active users.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.LocalSubjectAccessReview": { + "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "LocalSubjectAccessReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.NonResourceAttributes": { + "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "type": "object", + "properties": { + "path": { + "description": "Path is the URL path of the request", + "type": "string" + }, + "verb": { + "description": "Verb is the standard HTTP verb", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.NonResourceRule": { + "description": "NonResourceRule holds information that describes a rule for the non-resource", + "type": "object", + "required": [ + "verbs" + ], + "properties": { + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.authorization.v1.ResourceAttributes": { + "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "type": "object", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "type": "string" + }, + "resource": { + "description": "Resource is one of the existing resource types. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is one of the existing resource types. \"\" means none.", + "type": "string" + }, + "verb": { + "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.ResourceRule": { + "description": "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + "type": "object", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.authorization.v1.SelfSubjectAccessReview": { + "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. user and groups must be empty", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SelfSubjectAccessReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec": { + "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" + } + } + }, + "io.k8s.api.authorization.v1.SelfSubjectRulesReview": { + "description": "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated.", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates the set of actions a user can perform.", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectRulesReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SelfSubjectRulesReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec": { + "type": "object", + "properties": { + "namespace": { + "description": "Namespace to evaluate rules for. Required.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.SubjectAccessReview": { + "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SubjectAccessReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.SubjectAccessReviewSpec": { + "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "extra": { + "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "Groups is the groups you're testing for.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" + }, + "uid": { + "description": "UID information about the requesting user.", + "type": "string" + }, + "user": { + "description": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.SubjectAccessReviewStatus": { + "description": "SubjectAccessReviewStatus", + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "description": "Allowed is required. True if the action would be allowed, false otherwise.", + "type": "boolean" + }, + "denied": { + "description": "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", + "type": "boolean" + }, + "evaluationError": { + "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + "type": "string" + }, + "reason": { + "description": "Reason is optional. It indicates why a request was allowed or denied.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.SubjectRulesReviewStatus": { + "description": "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", + "type": "object", + "required": [ + "resourceRules", + "nonResourceRules", + "incomplete" + ], + "properties": { + "evaluationError": { + "description": "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", + "type": "string" + }, + "incomplete": { + "description": "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", + "type": "boolean" + }, + "nonResourceRules": { + "description": "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceRule" + } + }, + "resourceRules": { + "description": "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceRule" + } + } + } + }, + "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview": { + "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "LocalSubjectAccessReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.NonResourceAttributes": { + "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "type": "object", + "properties": { + "path": { + "description": "Path is the URL path of the request", + "type": "string" + }, + "verb": { + "description": "Verb is the standard HTTP verb", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.NonResourceRule": { + "description": "NonResourceRule holds information that describes a rule for the non-resource", + "type": "object", + "required": [ + "verbs" + ], + "properties": { + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.authorization.v1beta1.ResourceAttributes": { + "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "type": "object", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "type": "string" + }, + "resource": { + "description": "Resource is one of the existing resource types. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is one of the existing resource types. \"\" means none.", + "type": "string" + }, + "verb": { + "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.ResourceRule": { + "description": "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + "type": "object", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. \"*\" means all in the specified apiGroups.\n \"*/foo\" represents the subresource 'foo' for all resources in the specified apiGroups.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview": { + "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. user and groups must be empty", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SelfSubjectAccessReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec": { + "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" + } + } + }, + "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview": { + "description": "SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated.", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates the set of actions a user can perform.", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SelfSubjectRulesReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec": { + "type": "object", + "properties": { + "namespace": { + "description": "Namespace to evaluate rules for. Required.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.SubjectAccessReview": { + "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SubjectAccessReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec": { + "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "extra": { + "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "group": { + "description": "Groups is the groups you're testing for.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" + }, + "uid": { + "description": "UID information about the requesting user.", + "type": "string" + }, + "user": { + "description": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus": { + "description": "SubjectAccessReviewStatus", + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "description": "Allowed is required. True if the action would be allowed, false otherwise.", + "type": "boolean" + }, + "denied": { + "description": "Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true.", + "type": "boolean" + }, + "evaluationError": { + "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + "type": "string" + }, + "reason": { + "description": "Reason is optional. It indicates why a request was allowed or denied.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus": { + "description": "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", + "type": "object", + "required": [ + "resourceRules", + "nonResourceRules", + "incomplete" + ], + "properties": { + "evaluationError": { + "description": "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", + "type": "string" + }, + "incomplete": { + "description": "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", + "type": "boolean" + }, + "nonResourceRules": { + "description": "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceRule" + } + }, + "resourceRules": { + "description": "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceRule" + } + } + } + }, + "io.k8s.api.autoscaling.v1.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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/sig-architecture/api-conventions.md#types-kinds\"", + "type": "string" + }, + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler": { + "description": "configuration of a horizontal pod autoscaler.", + "type": "object", + "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": { + "description": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec" + }, + "status": { + "description": "current information about the autoscaler.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + ] + }, + "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList": { + "description": "list of horizontal pod autoscaler objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "list of horizontal pod autoscaler objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "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": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "HorizontalPodAutoscalerList", + "version": "v1" + } + ] + }, + "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec": { + "description": "specification of a horizontal pod autoscaler.", + "type": "object", + "required": [ + "scaleTargetRef", + "maxReplicas" + ], + "properties": { + "maxReplicas": { + "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", + "type": "integer", + "format": "int32" + }, + "minReplicas": { + "description": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", + "type": "integer", + "format": "int32" + }, + "scaleTargetRef": { + "description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.CrossVersionObjectReference" + }, + "targetCPUUtilizationPercentage": { + "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus": { + "description": "current status of a horizontal pod autoscaler", + "type": "object", + "required": [ + "currentReplicas", + "desiredReplicas" + ], + "properties": { + "currentCPUUtilizationPercentage": { + "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", + "type": "integer", + "format": "int32" + }, + "currentReplicas": { + "description": "current number of replicas of pods managed by this autoscaler.", + "type": "integer", + "format": "int32" + }, + "desiredReplicas": { + "description": "desired number of replicas of pods managed by this autoscaler.", + "type": "integer", + "format": "int32" + }, + "lastScaleTime": { + "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "observedGeneration": { + "description": "most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.autoscaling.v1.Scale": { + "description": "Scale represents a scaling request for a resource.", + "type": "object", + "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": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleSpec" + }, + "status": { + "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "Scale", + "version": "v1" + } + ] + }, + "io.k8s.api.autoscaling.v1.ScaleSpec": { + "description": "ScaleSpec describes the attributes of a scale subresource.", + "type": "object", + "properties": { + "replicas": { + "description": "desired number of instances for the scaled object.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.autoscaling.v1.ScaleStatus": { + "description": "ScaleStatus represents the current status of a scale subresource.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "replicas": { + "description": "actual number of observed instances of the scaled object.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource": { + "description": "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "type": "object", + "required": [ + "name", + "container" + ], + "properties": { + "container": { + "description": "container is the name of the container in the pods of the scaling target", + "type": "string" + }, + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + }, + "targetAverageUtilization": { + "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "type": "integer", + "format": "int32" + }, + "targetAverageValue": { + "description": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus": { + "description": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "type": "object", + "required": [ + "name", + "currentAverageValue", + "container" + ], + "properties": { + "container": { + "description": "container is the name of the container in the pods of the scaling target", + "type": "string" + }, + "currentAverageUtilization": { + "description": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "type": "integer", + "format": "int32" + }, + "currentAverageValue": { + "description": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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/sig-architecture/api-conventions.md#types-kinds\"", + "type": "string" + }, + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ExternalMetricSource": { + "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", + "type": "object", + "required": [ + "metricName" + ], + "properties": { + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" + }, + "metricSelector": { + "description": "metricSelector is used to identify a specific time series within a given metric.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "targetAverageValue": { + "description": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "targetValue": { + "description": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus": { + "description": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + "type": "object", + "required": [ + "metricName", + "currentValue" + ], + "properties": { + "currentAverageValue": { + "description": "currentAverageValue is the current value of metric averaged over autoscaled pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "currentValue": { + "description": "currentValue is the current value of the metric (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "metricName": { + "description": "metricName is the name of a metric used for autoscaling in metric system.", + "type": "string" + }, + "metricSelector": { + "description": "metricSelector is used to identify a specific time series within a given metric.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler": { + "description": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", + "type": "object", + "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": { + "description": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec" + }, + "status": { + "description": "status is the current information about the autoscaler.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v2beta1" + } + ] + }, + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition": { + "description": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "message is a human-readable explanation containing details about the transition", + "type": "string" + }, + "reason": { + "description": "reason is the reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "status is the status of the condition (True, False, Unknown)", + "type": "string" + }, + "type": { + "description": "type describes the current condition", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList": { + "description": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of horizontal pod autoscaler objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" + } + }, + "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": { + "description": "metadata is the standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "HorizontalPodAutoscalerList", + "version": "v2beta1" + } + ] + }, + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec": { + "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", + "type": "object", + "required": [ + "scaleTargetRef", + "maxReplicas" + ], + "properties": { + "maxReplicas": { + "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + "type": "integer", + "format": "int32" + }, + "metrics": { + "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricSpec" + } + }, + "minReplicas": { + "description": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", + "type": "integer", + "format": "int32" + }, + "scaleTargetRef": { + "description": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus": { + "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", + "type": "object", + "required": [ + "currentReplicas", + "desiredReplicas", + "conditions" + ], + "properties": { + "conditions": { + "description": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" + } + }, + "currentMetrics": { + "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricStatus" + } + }, + "currentReplicas": { + "description": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + "type": "integer", + "format": "int32" + }, + "desiredReplicas": { + "description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + "type": "integer", + "format": "int32" + }, + "lastScaleTime": { + "description": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.MetricSpec": { + "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + "type": "object", + "required": [ + "type" + ], + "properties": { + "containerResource": { + "description": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource" + }, + "external": { + "description": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ExternalMetricSource" + }, + "object": { + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricSource" + }, + "pods": { + "description": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricSource" + }, + "resource": { + "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricSource" + }, + "type": { + "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.MetricStatus": { + "description": "MetricStatus describes the last-read state of a single metric.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "containerResource": { + "description": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus" + }, + "external": { + "description": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus" + }, + "object": { + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus" + }, + "pods": { + "description": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricStatus" + }, + "resource": { + "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus" + }, + "type": { + "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ObjectMetricSource": { + "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "type": "object", + "required": [ + "target", + "metricName", + "targetValue" + ], + "properties": { + "averageValue": { + "description": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" + }, + "selector": { + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "target": { + "description": "target is the described Kubernetes object.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" + }, + "targetValue": { + "description": "targetValue is the target value of the metric (as a quantity).", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus": { + "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "type": "object", + "required": [ + "target", + "metricName", + "currentValue" + ], + "properties": { + "averageValue": { + "description": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "currentValue": { + "description": "currentValue is the current value of the metric (as a quantity).", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" + }, + "selector": { + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "target": { + "description": "target is the described Kubernetes object.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.PodsMetricSource": { + "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "type": "object", + "required": [ + "metricName", + "targetAverageValue" + ], + "properties": { + "metricName": { + "description": "metricName is the name of the metric in question", + "type": "string" + }, + "selector": { + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "targetAverageValue": { + "description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.PodsMetricStatus": { + "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "type": "object", + "required": [ + "metricName", + "currentAverageValue" + ], + "properties": { + "currentAverageValue": { + "description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "metricName": { + "description": "metricName is the name of the metric in question", + "type": "string" + }, + "selector": { + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ResourceMetricSource": { + "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + }, + "targetAverageUtilization": { + "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "type": "integer", + "format": "int32" + }, + "targetAverageValue": { + "description": "targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus": { + "description": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "type": "object", + "required": [ + "name", + "currentAverageValue" + ], + "properties": { + "currentAverageUtilization": { + "description": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "type": "integer", + "format": "int32" + }, + "currentAverageValue": { + "description": "currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource": { + "description": "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "type": "object", + "required": [ + "name", + "target", + "container" + ], + "properties": { + "container": { + "description": "container is the name of the container in the pods of the scaling target", + "type": "string" + }, + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + }, + "target": { + "description": "target specifies the target value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus": { + "description": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "type": "object", + "required": [ + "name", + "current", + "container" + ], + "properties": { + "container": { + "description": "Container is the name of the container in the pods of the scaling target", + "type": "string" + }, + "current": { + "description": "current contains the current value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus" + }, + "name": { + "description": "Name is the name of the resource in question.", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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/sig-architecture/api-conventions.md#types-kinds\"", + "type": "string" + }, + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ExternalMetricSource": { + "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "type": "object", + "required": [ + "metric", + "target" + ], + "properties": { + "metric": { + "description": "metric identifies the target metric by name and selector", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier" + }, + "target": { + "description": "target specifies the target value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus": { + "description": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + "type": "object", + "required": [ + "metric", + "current" + ], + "properties": { + "current": { + "description": "current contains the current value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus" + }, + "metric": { + "description": "metric identifies the target metric by name and selector", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy": { + "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", + "type": "object", + "required": [ + "type", + "value", + "periodSeconds" + ], + "properties": { + "periodSeconds": { + "description": "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).", + "type": "integer", + "format": "int32" + }, + "type": { + "description": "Type is used to specify the scaling policy.", + "type": "string" + }, + "value": { + "description": "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.HPAScalingRules": { + "description": "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.", + "type": "object", + "properties": { + "policies": { + "description": "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy" + } + }, + "selectPolicy": { + "description": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", + "type": "string" + }, + "stabilizationWindowSeconds": { + "description": "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler": { + "description": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", + "type": "object", + "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": { + "description": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec" + }, + "status": { + "description": "status is the current information about the autoscaler.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v2beta2" + } + ] + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior": { + "description": "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", + "type": "object", + "properties": { + "scaleDown": { + "description": "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingRules" + }, + "scaleUp": { + "description": "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingRules" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition": { + "description": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "message is a human-readable explanation containing details about the transition", + "type": "string" + }, + "reason": { + "description": "reason is the reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "status is the status of the condition (True, False, Unknown)", + "type": "string" + }, + "type": { + "description": "type describes the current condition", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList": { + "description": "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of horizontal pod autoscaler objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler" + } + }, + "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": { + "description": "metadata is the standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "autoscaling", + "kind": "HorizontalPodAutoscalerList", + "version": "v2beta2" + } + ] + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec": { + "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", + "type": "object", + "required": [ + "scaleTargetRef", + "maxReplicas" + ], + "properties": { + "behavior": { + "description": "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior" + }, + "maxReplicas": { + "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + "type": "integer", + "format": "int32" + }, + "metrics": { + "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricSpec" + } + }, + "minReplicas": { + "description": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.", + "type": "integer", + "format": "int32" + }, + "scaleTargetRef": { + "description": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus": { + "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", + "type": "object", + "required": [ + "currentReplicas", + "desiredReplicas", + "conditions" + ], + "properties": { + "conditions": { + "description": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" + } + }, + "currentMetrics": { + "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricStatus" + } + }, + "currentReplicas": { + "description": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + "type": "integer", + "format": "int32" + }, + "desiredReplicas": { + "description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + "type": "integer", + "format": "int32" + }, + "lastScaleTime": { + "description": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.MetricIdentifier": { + "description": "MetricIdentifier defines the name and optionally selector for a metric", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name is the name of the given metric", + "type": "string" + }, + "selector": { + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.MetricSpec": { + "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + "type": "object", + "required": [ + "type" + ], + "properties": { + "containerResource": { + "description": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource" + }, + "external": { + "description": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ExternalMetricSource" + }, + "object": { + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ObjectMetricSource" + }, + "pods": { + "description": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.PodsMetricSource" + }, + "resource": { + "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ResourceMetricSource" + }, + "type": { + "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.MetricStatus": { + "description": "MetricStatus describes the last-read state of a single metric.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "containerResource": { + "description": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus" + }, + "external": { + "description": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus" + }, + "object": { + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus" + }, + "pods": { + "description": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.PodsMetricStatus" + }, + "resource": { + "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus" + }, + "type": { + "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "string" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.MetricTarget": { + "description": "MetricTarget defines the target value, average value, or average utilization of a specific metric", + "type": "object", + "required": [ + "type" + ], + "properties": { + "averageUtilization": { + "description": "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", + "type": "integer", + "format": "int32" + }, + "averageValue": { + "description": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "type": { + "description": "type represents whether the metric type is Utilization, Value, or AverageValue", + "type": "string" + }, + "value": { + "description": "value is the target value of the metric (as a quantity).", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.MetricValueStatus": { + "description": "MetricValueStatus holds the current value for a metric", + "type": "object", + "properties": { + "averageUtilization": { + "description": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "type": "integer", + "format": "int32" + }, + "averageValue": { + "description": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "value": { + "description": "value is the current value of the metric (as a quantity).", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ObjectMetricSource": { + "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "type": "object", + "required": [ + "describedObject", + "target", + "metric" + ], + "properties": { + "describedObject": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" + }, + "metric": { + "description": "metric identifies the target metric by name and selector", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier" + }, + "target": { + "description": "target specifies the target value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus": { + "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "type": "object", + "required": [ + "metric", + "current", + "describedObject" + ], + "properties": { + "current": { + "description": "current contains the current value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus" + }, + "describedObject": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" + }, + "metric": { + "description": "metric identifies the target metric by name and selector", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.PodsMetricSource": { + "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "type": "object", + "required": [ + "metric", + "target" + ], + "properties": { + "metric": { + "description": "metric identifies the target metric by name and selector", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier" + }, + "target": { + "description": "target specifies the target value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.PodsMetricStatus": { + "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "type": "object", + "required": [ + "metric", + "current" + ], + "properties": { + "current": { + "description": "current contains the current value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus" + }, + "metric": { + "description": "metric identifies the target metric by name and selector", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ResourceMetricSource": { + "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "type": "object", + "required": [ + "name", + "target" + ], + "properties": { + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + }, + "target": { + "description": "target specifies the target value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget" + } + } + }, + "io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus": { + "description": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "type": "object", + "required": [ + "name", + "current" + ], + "properties": { + "current": { + "description": "current contains the current value for the given metric", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus" + }, + "name": { + "description": "Name is the name of the resource in question.", + "type": "string" + } + } + }, + "io.k8s.api.batch.v1.CronJob": { + "description": "CronJob represents the configuration of a single cron job.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobSpec" + }, + "status": { + "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "CronJob", + "version": "v1" + } + ] + }, + "io.k8s.api.batch.v1.CronJobList": { + "description": "CronJobList is a collection of cron jobs.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of CronJobs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "CronJobList", + "version": "v1" + } + ] + }, + "io.k8s.api.batch.v1.CronJobSpec": { + "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "type": "object", + "required": [ + "schedule", + "jobTemplate" + ], + "properties": { + "concurrencyPolicy": { + "description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + "type": "string" + }, + "failedJobsHistoryLimit": { + "description": "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "jobTemplate": { + "description": "Specifies the job that will be created when executing a CronJob.", + "$ref": "#/definitions/io.k8s.api.batch.v1.JobTemplateSpec" + }, + "schedule": { + "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "type": "string" + }, + "startingDeadlineSeconds": { + "description": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + "type": "integer", + "format": "int64" + }, + "successfulJobsHistoryLimit": { + "description": "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.", + "type": "integer", + "format": "int32" + }, + "suspend": { + "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + "type": "boolean" + } + } + }, + "io.k8s.api.batch.v1.CronJobStatus": { + "description": "CronJobStatus represents the current state of a cron job.", + "type": "object", + "properties": { + "active": { + "description": "A list of pointers to currently running jobs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "x-kubernetes-list-type": "atomic" + }, + "lastScheduleTime": { + "description": "Information when was the last time the job was successfully scheduled.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastSuccessfulTime": { + "description": "Information when was the last time the job successfully completed.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.batch.v1.Job": { + "description": "Job represents the configuration of a single job.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" + }, + "status": { + "description": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1.JobStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "Job", + "version": "v1" + } + ] + }, + "io.k8s.api.batch.v1.JobCondition": { + "description": "JobCondition describes current state of a job.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "description": "Last time the condition was checked.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastTransitionTime": { + "description": "Last time the condition transit from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "(brief) reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of job condition, Complete or Failed.", + "type": "string" + } + } + }, + "io.k8s.api.batch.v1.JobList": { + "description": "JobList is a collection of jobs.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of Jobs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "JobList", + "version": "v1" + } + ] + }, + "io.k8s.api.batch.v1.JobSpec": { + "description": "JobSpec describes how the job execution will look like.", + "type": "object", + "required": [ + "template" + ], + "properties": { + "activeDeadlineSeconds": { + "description": "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", + "type": "integer", + "format": "int64" + }, + "backoffLimit": { + "description": "Specifies the number of retries before marking this job failed. Defaults to 6", + "type": "integer", + "format": "int32" + }, + "completionMode": { + "description": "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5.\n\nThis field is alpha-level and is only honored by servers that enable the IndexedJob feature gate. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", + "type": "string" + }, + "completions": { + "description": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "type": "integer", + "format": "int32" + }, + "manualSelector": { + "description": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", + "type": "boolean" + }, + "parallelism": { + "description": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "suspend": { + "description": "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. This is an alpha field and requires the SuspendJob feature gate to be enabled; otherwise this field may not be set to true. Defaults to false.", + "type": "boolean" + }, + "template": { + "description": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + }, + "ttlSecondsAfterFinished": { + "description": "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.batch.v1.JobStatus": { + "description": "JobStatus represents the current state of a Job.", + "type": "object", + "properties": { + "active": { + "description": "The number of actively running pods.", + "type": "integer", + "format": "int32" + }, + "completedIndexes": { + "description": "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", + "type": "string" + }, + "completionTime": { + "description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "conditions": { + "description": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition" + }, + "x-kubernetes-list-type": "atomic", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "failed": { + "description": "The number of pods which reached phase Failed.", + "type": "integer", + "format": "int32" + }, + "startTime": { + "description": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "succeeded": { + "description": "The number of pods which reached phase Succeeded.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.batch.v1.JobTemplateSpec": { + "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "type": "object", + "properties": { + "metadata": { + "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" + } + } + }, + "io.k8s.api.batch.v1beta1.CronJob": { + "description": "CronJob represents the configuration of a single cron job.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobSpec" + }, + "status": { + "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "CronJob", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.batch.v1beta1.CronJobList": { + "description": "CronJobList is a collection of cron jobs.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of CronJobs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "CronJobList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.batch.v1beta1.CronJobSpec": { + "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "type": "object", + "required": [ + "schedule", + "jobTemplate" + ], + "properties": { + "concurrencyPolicy": { + "description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + "type": "string" + }, + "failedJobsHistoryLimit": { + "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "jobTemplate": { + "description": "Specifies the job that will be created when executing a CronJob.", + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.JobTemplateSpec" + }, + "schedule": { + "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "type": "string" + }, + "startingDeadlineSeconds": { + "description": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + "type": "integer", + "format": "int64" + }, + "successfulJobsHistoryLimit": { + "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", + "type": "integer", + "format": "int32" + }, + "suspend": { + "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + "type": "boolean" + } + } + }, + "io.k8s.api.batch.v1beta1.CronJobStatus": { + "description": "CronJobStatus represents the current state of a cron job.", + "type": "object", + "properties": { + "active": { + "description": "A list of pointers to currently running jobs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "x-kubernetes-list-type": "atomic" + }, + "lastScheduleTime": { + "description": "Information when was the last time the job was successfully scheduled.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastSuccessfulTime": { + "description": "Information when was the last time the job successfully completed.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.batch.v1beta1.JobTemplateSpec": { + "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "type": "object", + "properties": { + "metadata": { + "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" + } + } + }, + "io.k8s.api.certificates.v1.CertificateSigningRequest": { + "description": "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec contains the certificate request, and is immutable after creation. Only the request, signerName, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.", + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestSpec" + }, + "status": { + "description": "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure.", + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", + "version": "v1" + } + ] + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestCondition": { + "description": "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastUpdateTime": { + "description": "lastUpdateTime is the time of the last update to this condition", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "message contains a human readable message with details about the request state", + "type": "string" + }, + "reason": { + "description": "reason indicates a brief reason for the request state", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + "type": "string" + }, + "type": { + "description": "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.", + "type": "string" + } + } + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestList": { + "description": "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is a collection of CertificateSigningRequest objects", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequestList", + "version": "v1" + } + ] + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestSpec": { + "description": "CertificateSigningRequestSpec contains the certificate request.", + "type": "object", + "required": [ + "request", + "signerName" + ], + "properties": { + "extra": { + "description": "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "request": { + "description": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", + "type": "string", + "format": "byte", + "x-kubernetes-list-type": "atomic" + }, + "signerName": { + "description": "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", + "type": "string" + }, + "uid": { + "description": "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "string" + }, + "usages": { + "description": "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "username": { + "description": "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "string" + } + } + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestStatus": { + "description": "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", + "type": "object", + "properties": { + "certificate": { + "description": "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", + "type": "string", + "format": "byte", + "x-kubernetes-list-type": "atomic" + }, + "conditions": { + "description": "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "io.k8s.api.certificates.v1beta1.CertificateSigningRequest": { + "description": "Describes a certificate signing request", + "type": "object", + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "The certificate request itself and any additional information.", + "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec" + }, + "status": { + "description": "Derived information about the request.", + "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastUpdateTime": { + "description": "timestamp for the last update to this condition", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "human readable message with details about the request state", + "type": "string" + }, + "reason": { + "description": "brief reason for the request state", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\". Defaults to \"True\". If unset, should be treated as \"True\".", + "type": "string" + }, + "type": { + "description": "type of the condition. Known conditions include \"Approved\", \"Denied\", and \"Failed\".", + "type": "string" + } + } + }, + "io.k8s.api.certificates.v1beta1.CertificateSigningRequestList": { + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequestList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec": { + "description": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "type": "object", + "required": [ + "request" + ], + "properties": { + "extra": { + "description": "Extra information about the requesting user. See user.Info interface for details.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "Group information about the requesting user. See user.Info interface for details.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "request": { + "description": "Base64-encoded PKCS#10 CSR data", + "type": "string", + "format": "byte", + "x-kubernetes-list-type": "atomic" + }, + "signerName": { + "description": "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", + "type": "string" + }, + "uid": { + "description": "UID information about the requesting user. See user.Info interface for details.", + "type": "string" + }, + "usages": { + "description": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12\nValid values are:\n \"signing\",\n \"digital signature\",\n \"content commitment\",\n \"key encipherment\",\n \"key agreement\",\n \"data encipherment\",\n \"cert sign\",\n \"crl sign\",\n \"encipher only\",\n \"decipher only\",\n \"any\",\n \"server auth\",\n \"client auth\",\n \"code signing\",\n \"email protection\",\n \"s/mime\",\n \"ipsec end system\",\n \"ipsec tunnel\",\n \"ipsec user\",\n \"timestamping\",\n \"ocsp signing\",\n \"microsoft sgc\",\n \"netscape sgc\"", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "username": { + "description": "Information about the requesting user. See user.Info interface for details.", + "type": "string" + } + } + }, + "io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus": { + "type": "object", + "properties": { + "certificate": { + "description": "If request was approved, the controller will place the issued certificate here.", + "type": "string", + "format": "byte", + "x-kubernetes-list-type": "atomic" + }, + "conditions": { + "description": "Conditions applied to the request, such as approval or denial.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "io.k8s.api.coordination.v1.Lease": { + "description": "Lease defines a lease concept.", + "type": "object", + "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": { + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.coordination.v1.LeaseSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "coordination.k8s.io", + "kind": "Lease", + "version": "v1" + } + ] + }, + "io.k8s.api.coordination.v1.LeaseList": { + "description": "LeaseList is a list of Lease objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "coordination.k8s.io", + "kind": "LeaseList", + "version": "v1" + } + ] + }, + "io.k8s.api.coordination.v1.LeaseSpec": { + "description": "LeaseSpec is a specification of a Lease.", + "type": "object", + "properties": { + "acquireTime": { + "description": "acquireTime is a time when the current lease was acquired.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + }, + "holderIdentity": { + "description": "holderIdentity contains the identity of the holder of a current lease.", + "type": "string" + }, + "leaseDurationSeconds": { + "description": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + "type": "integer", + "format": "int32" + }, + "leaseTransitions": { + "description": "leaseTransitions is the number of transitions of a lease between holders.", + "type": "integer", + "format": "int32" + }, + "renewTime": { + "description": "renewTime is a time when the current holder of a lease has last updated the lease.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + } + } + }, + "io.k8s.api.coordination.v1beta1.Lease": { + "description": "Lease defines a lease concept.", + "type": "object", + "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": { + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.coordination.v1beta1.LeaseSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "coordination.k8s.io", + "kind": "Lease", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.coordination.v1beta1.LeaseList": { + "description": "LeaseList is a list of Lease objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.coordination.v1beta1.Lease" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "coordination.k8s.io", + "kind": "LeaseList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.coordination.v1beta1.LeaseSpec": { + "description": "LeaseSpec is a specification of a Lease.", + "type": "object", + "properties": { + "acquireTime": { + "description": "acquireTime is a time when the current lease was acquired.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + }, + "holderIdentity": { + "description": "holderIdentity contains the identity of the holder of a current lease.", + "type": "string" + }, + "leaseDurationSeconds": { + "description": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + "type": "integer", + "format": "int32" + }, + "leaseTransitions": { + "description": "leaseTransitions is the number of transitions of a lease between holders.", + "type": "integer", + "format": "int32" + }, + "renewTime": { + "description": "renewTime is a time when the current holder of a lease has last updated the lease.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + } + } + }, + "io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource": { + "description": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + "type": "integer", + "format": "int32" + }, + "readOnly": { + "description": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "boolean" + }, + "volumeID": { + "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Affinity": { + "description": "Affinity is a group of affinity scheduling rules.", + "type": "object", + "properties": { + "nodeAffinity": { + "description": "Describes node affinity scheduling rules for the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeAffinity" + }, + "podAffinity": { + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinity" + }, + "podAntiAffinity": { + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", + "$ref": "#/definitions/io.k8s.api.core.v1.PodAntiAffinity" + } + } + }, + "io.k8s.api.core.v1.AttachedVolume": { + "description": "AttachedVolume describes a volume attached to a node", + "type": "object", + "required": [ + "name", + "devicePath" + ], + "properties": { + "devicePath": { + "description": "DevicePath represents the device path where the volume should be available", + "type": "string" + }, + "name": { + "description": "Name of the attached volume", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.AzureDiskVolumeSource": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "type": "object", + "required": [ + "diskName", + "diskURI" + ], + "properties": { + "cachingMode": { + "description": "Host Caching mode: None, Read Only, Read Write.", + "type": "string" + }, + "diskName": { + "description": "The Name of the data disk in the blob storage", + "type": "string" + }, + "diskURI": { + "description": "The URI the data disk in the blob storage", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "kind": { + "description": "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.AzureFilePersistentVolumeSource": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "type": "object", + "required": [ + "secretName", + "shareName" + ], + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "secretNamespace": { + "description": "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.AzureFileVolumeSource": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "type": "object", + "required": [ + "secretName", + "shareName" + ], + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Binding": { + "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + "type": "object", + "required": [ + "target" + ], + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "target": { + "description": "The target object that you want to bind to the standard object.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Binding", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.CSIPersistentVolumeSource": { + "description": "Represents storage that is managed by an external CSI volume driver (Beta feature)", + "type": "object", + "required": [ + "driver", + "volumeHandle" + ], + "properties": { + "controllerExpandSecretRef": { + "description": "ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "controllerPublishSecretRef": { + "description": "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "driver": { + "description": "Driver is the name of the driver to use for this volume. Required.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + "type": "string" + }, + "nodePublishSecretRef": { + "description": "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "nodeStageSecretRef": { + "description": "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "readOnly": { + "description": "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", + "type": "boolean" + }, + "volumeAttributes": { + "description": "Attributes of the volume to publish.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "volumeHandle": { + "description": "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.CSIVolumeSource": { + "description": "Represents a source location of a volume to mount, managed by an external CSI driver", + "type": "object", + "required": [ + "driver" + ], + "properties": { + "driver": { + "description": "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", + "type": "string" + }, + "nodePublishSecretRef": { + "description": "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "readOnly": { + "description": "Specifies a read-only configuration for the volume. Defaults to false (read/write).", + "type": "boolean" + }, + "volumeAttributes": { + "description": "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.Capabilities": { + "description": "Adds and removes POSIX capabilities from running containers.", + "type": "object", + "properties": { + "add": { + "description": "Added capabilities", + "type": "array", + "items": { + "type": "string" + } + }, + "drop": { + "description": "Removed capabilities", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.CephFSPersistentVolumeSource": { + "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "monitors" + ], + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.CephFSVolumeSource": { + "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "monitors" + ], + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.CinderPersistentVolumeSource": { + "description": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: points to a secret object containing parameters used to connect to OpenStack.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "volumeID": { + "description": "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.CinderVolumeSource": { + "description": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: points to a secret object containing parameters used to connect to OpenStack.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "volumeID": { + "description": "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ClientIPConfig": { + "description": "ClientIPConfig represents the configurations of Client IP based session affinity.", + "type": "object", + "properties": { + "timeoutSeconds": { + "description": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be \u003e0 \u0026\u0026 \u003c=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.ComponentCondition": { + "description": "Information about the condition of a component.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "error": { + "description": "Condition error code for a component. For example, a health check error code.", + "type": "string" + }, + "message": { + "description": "Message about the condition for a component. For example, information about a health check.", + "type": "string" + }, + "status": { + "description": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + "type": "string" + }, + "type": { + "description": "Type of condition for a component. Valid value: \"Healthy\"", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ComponentStatus": { + "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", + "type": "object", + "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" + }, + "conditions": { + "description": "List of component conditions observed", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ComponentCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ComponentStatus", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ComponentStatusList": { + "description": "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of ComponentStatus objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatus" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ComponentStatusList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ConfigMap": { + "description": "ConfigMap holds configuration data for pods to consume.", + "type": "object", + "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" + }, + "binaryData": { + "description": "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "byte" + } + }, + "data": { + "description": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "immutable": { + "description": "Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", + "type": "boolean" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ConfigMap", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ConfigMapEnvSource": { + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.ConfigMapKeySelector": { + "description": "Selects a key from a ConfigMap.", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "The key to select.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its key must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.ConfigMapList": { + "description": "ConfigMapList is a resource containing a list of ConfigMap objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of ConfigMaps.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" + } + }, + "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": { + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ConfigMapList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ConfigMapNodeConfigSource": { + "description": "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.", + "type": "object", + "required": [ + "namespace", + "name", + "kubeletConfigKey" + ], + "properties": { + "kubeletConfigKey": { + "description": "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", + "type": "string" + }, + "name": { + "description": "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + "type": "string" + }, + "resourceVersion": { + "description": "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + "type": "string" + }, + "uid": { + "description": "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ConfigMapProjection": { + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its keys must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.ConfigMapVolumeSource": { + "description": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its keys must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.Container": { + "description": "A single application container that you want to run within a pod.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "args": { + "description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "List of environment variables to set in the container. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EnvVar" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "envFrom": { + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EnvFromSource" + } + }, + "image": { + "description": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "lifecycle": { + "description": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + "$ref": "#/definitions/io.k8s.api.core.v1.Lifecycle" + }, + "livenessProbe": { + "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "name": { + "description": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + "type": "string" + }, + "ports": { + "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerPort" + }, + "x-kubernetes-list-map-keys": [ + "containerPort", + "protocol" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge" + }, + "readinessProbe": { + "description": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "resources": { + "description": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, + "securityContext": { + "description": "Security options the pod 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/", + "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext" + }, + "startupProbe": { + "description": "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "stdin": { + "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + "type": "boolean" + }, + "stdinOnce": { + "description": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + "type": "boolean" + }, + "terminationMessagePath": { + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "type": "string" + }, + "tty": { + "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + "type": "boolean" + }, + "volumeDevices": { + "description": "volumeDevices is the list of block devices to be used by the container.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeDevice" + }, + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge" + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeMount" + }, + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge" + }, + "workingDir": { + "description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ContainerImage": { + "description": "Describe a container image", + "type": "object", + "required": [ + "names" + ], + "properties": { + "names": { + "description": "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + "type": "array", + "items": { + "type": "string" + } + }, + "sizeBytes": { + "description": "The size of the image in bytes.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.core.v1.ContainerPort": { + "description": "ContainerPort represents a network port in a single container.", + "type": "object", + "required": [ + "containerPort" + ], + "properties": { + "containerPort": { + "description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.", + "type": "integer", + "format": "int32" + }, + "hostIP": { + "description": "What host IP to bind the external port to.", + "type": "string" + }, + "hostPort": { + "description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + "type": "string" + }, + "protocol": { + "description": "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ContainerState": { + "description": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + "type": "object", + "properties": { + "running": { + "description": "Details about a running container", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateRunning" + }, + "terminated": { + "description": "Details about a terminated container", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateTerminated" + }, + "waiting": { + "description": "Details about a waiting container", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateWaiting" + } + } + }, + "io.k8s.api.core.v1.ContainerStateRunning": { + "description": "ContainerStateRunning is a running state of a container.", + "type": "object", + "properties": { + "startedAt": { + "description": "Time at which the container was last (re-)started", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.core.v1.ContainerStateTerminated": { + "description": "ContainerStateTerminated is a terminated state of a container.", + "type": "object", + "required": [ + "exitCode" + ], + "properties": { + "containerID": { + "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'", + "type": "string" + }, + "exitCode": { + "description": "Exit status from the last termination of the container", + "type": "integer", + "format": "int32" + }, + "finishedAt": { + "description": "Time at which the container last terminated", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Message regarding the last termination of the container", + "type": "string" + }, + "reason": { + "description": "(brief) reason from the last termination of the container", + "type": "string" + }, + "signal": { + "description": "Signal from the last termination of the container", + "type": "integer", + "format": "int32" + }, + "startedAt": { + "description": "Time at which previous execution of the container started", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.core.v1.ContainerStateWaiting": { + "description": "ContainerStateWaiting is a waiting state of a container.", + "type": "object", + "properties": { + "message": { + "description": "Message regarding why the container is not yet running.", + "type": "string" + }, + "reason": { + "description": "(brief) reason the container is not yet running.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ContainerStatus": { + "description": "ContainerStatus contains details for the current status of this container.", + "type": "object", + "required": [ + "name", + "ready", + "restartCount", + "image", + "imageID" + ], + "properties": { + "containerID": { + "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'.", + "type": "string" + }, + "image": { + "description": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", + "type": "string" + }, + "imageID": { + "description": "ImageID of the container's image.", + "type": "string" + }, + "lastState": { + "description": "Details about the container's last termination condition.", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" + }, + "name": { + "description": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + "type": "string" + }, + "ready": { + "description": "Specifies whether the container has passed its readiness probe.", + "type": "boolean" + }, + "restartCount": { + "description": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", + "type": "integer", + "format": "int32" + }, + "started": { + "description": "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", + "type": "boolean" + }, + "state": { + "description": "Details about the container's current condition.", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" + } + } + }, + "io.k8s.api.core.v1.DaemonEndpoint": { + "description": "DaemonEndpoint contains information about a single Daemon endpoint.", + "type": "object", + "required": [ + "Port" + ], + "properties": { + "Port": { + "description": "Port number of the given endpoint.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.DownwardAPIProjection": { + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "type": "object", + "properties": { + "items": { + "description": "Items is a list of DownwardAPIVolume file", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" + } + } + } + }, + "io.k8s.api.core.v1.DownwardAPIVolumeFile": { + "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field", + "type": "object", + "required": [ + "path" + ], + "properties": { + "fieldRef": { + "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" + } + } + }, + "io.k8s.api.core.v1.DownwardAPIVolumeSource": { + "description": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "Items is a list of downward API volume file", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" + } + } + } + }, + "io.k8s.api.core.v1.EmptyDirVolumeSource": { + "description": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "medium": { + "description": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + "type": "string" + }, + "sizeLimit": { + "description": "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.core.v1.EndpointAddress": { + "description": "EndpointAddress is a tuple that describes single IP address.", + "type": "object", + "required": [ + "ip" + ], + "properties": { + "hostname": { + "description": "The Hostname of this endpoint", + "type": "string" + }, + "ip": { + "description": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", + "type": "string" + }, + "nodeName": { + "description": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", + "type": "string" + }, + "targetRef": { + "description": "Reference to object providing the endpoint.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + } + } + }, + "io.k8s.api.core.v1.EndpointPort": { + "description": "EndpointPort is a tuple that describes a single port.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "appProtocol": { + "description": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.", + "type": "string" + }, + "name": { + "description": "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", + "type": "string" + }, + "port": { + "description": "The port number of the endpoint.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.EndpointSubset": { + "description": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", + "type": "object", + "properties": { + "addresses": { + "description": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" + } + }, + "notReadyAddresses": { + "description": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" + } + }, + "ports": { + "description": "Port numbers available on the related IP addresses.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointPort" + } + } + } + }, + "io.k8s.api.core.v1.Endpoints": { + "description": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "subsets": { + "description": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointSubset" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Endpoints", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EndpointsList": { + "description": "EndpointsList is a list of endpoints.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of endpoints.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "EndpointsList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EnvFromSource": { + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "type": "object", + "properties": { + "configMapRef": { + "description": "The ConfigMap to select from", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapEnvSource" + }, + "prefix": { + "description": "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + "type": "string" + }, + "secretRef": { + "description": "The Secret to select from", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretEnvSource" + } + } + }, + "io.k8s.api.core.v1.EnvVar": { + "description": "EnvVar represents an environment variable present in a Container.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name of the environment variable. Must be a C_IDENTIFIER.", + "type": "string" + }, + "value": { + "description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + "type": "string" + }, + "valueFrom": { + "description": "Source for the environment variable's value. Cannot be used if value is not empty.", + "$ref": "#/definitions/io.k8s.api.core.v1.EnvVarSource" + } + } + }, + "io.k8s.api.core.v1.EnvVarSource": { + "description": "EnvVarSource represents a source for the value of an EnvVar.", + "type": "object", + "properties": { + "configMapKeyRef": { + "description": "Selects a key of a ConfigMap.", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector" + }, + "fieldRef": { + "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" + }, + "secretKeyRef": { + "description": "Selects a key of a secret in the pod's namespace", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretKeySelector" + } + } + }, + "io.k8s.api.core.v1.EphemeralContainer": { + "description": "An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod's ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "args": { + "description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "List of environment variables to set in the container. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EnvVar" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "envFrom": { + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EnvFromSource" + } + }, + "image": { + "description": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "lifecycle": { + "description": "Lifecycle is not allowed for ephemeral containers.", + "$ref": "#/definitions/io.k8s.api.core.v1.Lifecycle" + }, + "livenessProbe": { + "description": "Probes are not allowed for ephemeral containers.", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "name": { + "description": "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", + "type": "string" + }, + "ports": { + "description": "Ports are not allowed for ephemeral containers.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerPort" + } + }, + "readinessProbe": { + "description": "Probes are not allowed for ephemeral containers.", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "resources": { + "description": "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, + "securityContext": { + "description": "SecurityContext is not allowed for ephemeral containers.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext" + }, + "startupProbe": { + "description": "Probes are not allowed for ephemeral containers.", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "stdin": { + "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + "type": "boolean" + }, + "stdinOnce": { + "description": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + "type": "boolean" + }, + "targetContainerName": { + "description": "If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container is run in whatever namespaces are shared for the pod. Note that the container runtime must support this feature.", + "type": "string" + }, + "terminationMessagePath": { + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "type": "string" + }, + "tty": { + "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + "type": "boolean" + }, + "volumeDevices": { + "description": "volumeDevices is the list of block devices to be used by the container.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeDevice" + }, + "x-kubernetes-patch-merge-key": "devicePath", + "x-kubernetes-patch-strategy": "merge" + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeMount" + }, + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge" + }, + "workingDir": { + "description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.EphemeralVolumeSource": { + "description": "Represents an ephemeral volume that is handled by a normal storage driver.", + "type": "object", + "properties": { + "volumeClaimTemplate": { + "description": "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `\u003cpod name\u003e-\u003cvolume name\u003e` where `\u003cvolume name\u003e` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimTemplate" + } + } + }, + "io.k8s.api.core.v1.Event": { + "description": "Event is a report of an event somewhere in the cluster. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + "type": "object", + "required": [ + "metadata", + "involvedObject" + ], + "properties": { + "action": { + "description": "What action was taken/failed regarding to the Regarding object.", + "type": "string" + }, + "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" + }, + "count": { + "description": "The number of times this event has occurred.", + "type": "integer", + "format": "int32" + }, + "eventTime": { + "description": "Time when this Event was first observed.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + }, + "firstTimestamp": { + "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "involvedObject": { + "description": "The object that this event is about.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "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" + }, + "lastTimestamp": { + "description": "The time at which the most recent occurrence of this event was recorded.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "reason": { + "description": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + "type": "string" + }, + "related": { + "description": "Optional secondary object for more complex actions.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "reportingComponent": { + "description": "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", + "type": "string" + }, + "reportingInstance": { + "description": "ID of the controller instance, e.g. `kubelet-xyzf`.", + "type": "string" + }, + "series": { + "description": "Data about the Event series this event represents or nil if it's a singleton Event.", + "$ref": "#/definitions/io.k8s.api.core.v1.EventSeries" + }, + "source": { + "description": "The component reporting this event. Should be a short machine understandable string.", + "$ref": "#/definitions/io.k8s.api.core.v1.EventSource" + }, + "type": { + "description": "Type of this event (Normal, Warning), new types could be added in the future", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Event", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EventList": { + "description": "EventList is a list of events.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of events", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Event" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "EventList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EventSeries": { + "description": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", + "type": "object", + "properties": { + "count": { + "description": "Number of occurrences in this series up to the last heartbeat time", + "type": "integer", + "format": "int32" + }, + "lastObservedTime": { + "description": "Time of the last occurrence observed", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + } + } + }, + "io.k8s.api.core.v1.EventSource": { + "description": "EventSource contains information for an event.", + "type": "object", + "properties": { + "component": { + "description": "Component from which the event is generated.", + "type": "string" + }, + "host": { + "description": "Node name on which the event is generated.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ExecAction": { + "description": "ExecAction describes a \"run in container\" action.", + "type": "object", + "properties": { + "command": { + "description": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.FCVolumeSource": { + "description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "lun": { + "description": "Optional: FC target lun number", + "type": "integer", + "format": "int32" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "targetWWNs": { + "description": "Optional: FC target worldwide names (WWNs)", + "type": "array", + "items": { + "type": "string" + } + }, + "wwids": { + "description": "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.FlexPersistentVolumeSource": { + "description": "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", + "type": "object", + "required": [ + "driver" + ], + "properties": { + "driver": { + "description": "Driver is the name of the driver to use for this volume.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + "type": "string" + }, + "options": { + "description": "Optional: Extra command options if any.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + } + } + }, + "io.k8s.api.core.v1.FlexVolumeSource": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "type": "object", + "required": [ + "driver" + ], + "properties": { + "driver": { + "description": "Driver is the name of the driver to use for this volume.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + "type": "string" + }, + "options": { + "description": "Optional: Extra command options if any.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + } + } + }, + "io.k8s.api.core.v1.FlockerVolumeSource": { + "description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "properties": { + "datasetName": { + "description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated", + "type": "string" + }, + "datasetUUID": { + "description": "UUID of the dataset. This is unique identifier of a Flocker dataset", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.GCEPersistentDiskVolumeSource": { + "description": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "pdName" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "integer", + "format": "int32" + }, + "pdName": { + "description": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.GitRepoVolumeSource": { + "description": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + "type": "object", + "required": [ + "repository" + ], + "properties": { + "directory": { + "description": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + "type": "string" + }, + "repository": { + "description": "Repository URL", + "type": "string" + }, + "revision": { + "description": "Commit hash for the specified revision.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.GlusterfsPersistentVolumeSource": { + "description": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "endpoints", + "path" + ], + "properties": { + "endpoints": { + "description": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "endpointsNamespace": { + "description": "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "path": { + "description": "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.GlusterfsVolumeSource": { + "description": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "endpoints", + "path" + ], + "properties": { + "endpoints": { + "description": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "path": { + "description": "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.HTTPGetAction": { + "description": "HTTPGetAction describes an action based on HTTP Get requests.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.HTTPHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "scheme": { + "description": "Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.HTTPHeader": { + "description": "HTTPHeader describes a custom header to be used in HTTP probes", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Handler": { + "description": "Handler defines a specific action that should be taken", + "type": "object", + "properties": { + "exec": { + "description": "One and only one of the following should be specified. Exec specifies the action to take.", + "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.", + "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" + } + } + }, + "io.k8s.api.core.v1.HostAlias": { + "description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", + "type": "object", + "properties": { + "hostnames": { + "description": "Hostnames for the above IP address.", + "type": "array", + "items": { + "type": "string" + } + }, + "ip": { + "description": "IP address of the host file entry.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.HostPathVolumeSource": { + "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "string" + }, + "type": { + "description": "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ISCSIPersistentVolumeSource": { + "description": "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "targetPortal", + "iqn", + "lun" + ], + "properties": { + "chapAuthDiscovery": { + "description": "whether support iSCSI Discovery CHAP authentication", + "type": "boolean" + }, + "chapAuthSession": { + "description": "whether support iSCSI Session CHAP authentication", + "type": "boolean" + }, + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + "type": "string" + }, + "initiatorName": { + "description": "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.", + "type": "string" + }, + "iqn": { + "description": "Target iSCSI Qualified Name.", + "type": "string" + }, + "iscsiInterface": { + "description": "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + "type": "string" + }, + "lun": { + "description": "iSCSI Target Lun number.", + "type": "integer", + "format": "int32" + }, + "portals": { + "description": "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "type": "boolean" + }, + "secretRef": { + "description": "CHAP Secret for iSCSI target and initiator authentication", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "targetPortal": { + "description": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ISCSIVolumeSource": { + "description": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "targetPortal", + "iqn", + "lun" + ], + "properties": { + "chapAuthDiscovery": { + "description": "whether support iSCSI Discovery CHAP authentication", + "type": "boolean" + }, + "chapAuthSession": { + "description": "whether support iSCSI Session CHAP authentication", + "type": "boolean" + }, + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + "type": "string" + }, + "initiatorName": { + "description": "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.", + "type": "string" + }, + "iqn": { + "description": "Target iSCSI Qualified Name.", + "type": "string" + }, + "iscsiInterface": { + "description": "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + "type": "string" + }, + "lun": { + "description": "iSCSI Target Lun number.", + "type": "integer", + "format": "int32" + }, + "portals": { + "description": "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "type": "boolean" + }, + "secretRef": { + "description": "CHAP Secret for iSCSI target and initiator authentication", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "targetPortal": { + "description": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.KeyToPath": { + "description": "Maps a string key to a path within a volume.", + "type": "object", + "required": [ + "key", + "path" + ], + "properties": { + "key": { + "description": "The key to project.", + "type": "string" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Lifecycle": { + "description": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + "type": "object", + "properties": { + "postStart": { + "description": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + "$ref": "#/definitions/io.k8s.api.core.v1.Handler" + }, + "preStop": { + "description": "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + "$ref": "#/definitions/io.k8s.api.core.v1.Handler" + } + } + }, + "io.k8s.api.core.v1.LimitRange": { + "description": "LimitRange sets resource usage limits for each kind of resource in a Namespace.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "LimitRange", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.LimitRangeItem": { + "description": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "default": { + "description": "Default resource requirement limit value by resource name if resource limit is omitted.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "defaultRequest": { + "description": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "max": { + "description": "Max usage constraints on this kind by resource name.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "maxLimitRequestRatio": { + "description": "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "min": { + "description": "Min usage constraints on this kind by resource name.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "type": { + "description": "Type of resource that this limit applies to.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.LimitRangeList": { + "description": "LimitRangeList is a list of LimitRange items.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "LimitRangeList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.LimitRangeSpec": { + "description": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", + "type": "object", + "required": [ + "limits" + ], + "properties": { + "limits": { + "description": "Limits is the list of LimitRangeItem objects that are enforced.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeItem" + } + } + } + }, + "io.k8s.api.core.v1.LoadBalancerIngress": { + "description": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", + "type": "object", + "properties": { + "hostname": { + "description": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", + "type": "string" + }, + "ip": { + "description": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", + "type": "string" + }, + "ports": { + "description": "Ports is a list of records of service ports If used, every port defined in the service should have an entry in it", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PortStatus" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.core.v1.LoadBalancerStatus": { + "description": "LoadBalancerStatus represents the status of a load-balancer.", + "type": "object", + "properties": { + "ingress": { + "description": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerIngress" + } + } + } + }, + "io.k8s.api.core.v1.LocalObjectReference": { + "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.LocalVolumeSource": { + "description": "Local represents directly-attached storage with node affinity (Beta feature)", + "type": "object", + "required": [ + "path" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a fileystem if unspecified.", + "type": "string" + }, + "path": { + "description": "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NFSVolumeSource": { + "description": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "server", + "path" + ], + "properties": { + "path": { + "description": "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "boolean" + }, + "server": { + "description": "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Namespace": { + "description": "Namespace provides a scope for Names. Use of multiple namespaces is optional.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceSpec" + }, + "status": { + "description": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Namespace", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NamespaceCondition": { + "description": "NamespaceCondition contains details about state of namespace.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of namespace controller condition.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NamespaceList": { + "description": "NamespaceList is a list of Namespaces.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "NamespaceList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NamespaceSpec": { + "description": "NamespaceSpec describes the attributes on a Namespace.", + "type": "object", + "properties": { + "finalizers": { + "description": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.NamespaceStatus": { + "description": "NamespaceStatus is information about the current status of a Namespace.", + "type": "object", + "properties": { + "conditions": { + "description": "Represents the latest available observations of a namespace's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "phase": { + "description": "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Node": { + "description": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSpec" + }, + "status": { + "description": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Node", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NodeAddress": { + "description": "NodeAddress contains information for the node's address.", + "type": "object", + "required": [ + "type", + "address" + ], + "properties": { + "address": { + "description": "The node address.", + "type": "string" + }, + "type": { + "description": "Node address type, one of Hostname, ExternalIP or InternalIP.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NodeAffinity": { + "description": "Node affinity is a group of node affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PreferredSchedulingTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector" + } + } + }, + "io.k8s.api.core.v1.NodeCondition": { + "description": "NodeCondition contains condition information for a node.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastHeartbeatTime": { + "description": "Last time we got an update on a given condition.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastTransitionTime": { + "description": "Last time the condition transit from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "(brief) reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of node condition.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NodeConfigSource": { + "description": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", + "type": "object", + "properties": { + "configMap": { + "description": "ConfigMap is a reference to a Node's ConfigMap", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapNodeConfigSource" + } + } + }, + "io.k8s.api.core.v1.NodeConfigStatus": { + "description": "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.", + "type": "object", + "properties": { + "active": { + "description": "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigSource" + }, + "assigned": { + "description": "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigSource" + }, + "error": { + "description": "Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.", + "type": "string" + }, + "lastKnownGood": { + "description": "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigSource" + } + } + }, + "io.k8s.api.core.v1.NodeDaemonEndpoints": { + "description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", + "type": "object", + "properties": { + "kubeletEndpoint": { + "description": "Endpoint on which Kubelet is listening.", + "$ref": "#/definitions/io.k8s.api.core.v1.DaemonEndpoint" + } + } + }, + "io.k8s.api.core.v1.NodeList": { + "description": "NodeList is the whole list of all Nodes which have been registered with master.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of nodes", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Node" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "NodeList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NodeSelector": { + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "type": "object", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "description": "Required. A list of node selector terms. The terms are ORed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" + } + } + } + }, + "io.k8s.api.core.v1.NodeSelectorRequirement": { + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "The label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + "type": "string" + }, + "values": { + "description": "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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.NodeSelectorTerm": { + "description": "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "A list of node selector requirements by node's labels.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement" + } + }, + "matchFields": { + "description": "A list of node selector requirements by node's fields.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement" + } + } + } + }, + "io.k8s.api.core.v1.NodeSpec": { + "description": "NodeSpec describes the attributes that a node is created with.", + "type": "object", + "properties": { + "configSource": { + "description": "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigSource" + }, + "externalID": { + "description": "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", + "type": "string" + }, + "podCIDR": { + "description": "PodCIDR represents the pod IP range assigned to the node.", + "type": "string" + }, + "podCIDRs": { + "description": "podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-patch-strategy": "merge" + }, + "providerID": { + "description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e", + "type": "string" + }, + "taints": { + "description": "If specified, the node's taints.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Taint" + } + }, + "unschedulable": { + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.NodeStatus": { + "description": "NodeStatus is information about the current status of a node.", + "type": "object", + "properties": { + "addresses": { + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See http://pr.k8s.io/79391 for an example.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeAddress" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "allocatable": { + "description": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "capacity": { + "description": "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "conditions": { + "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "config": { + "description": "Status of the config assigned to the node via the dynamic Kubelet config feature.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigStatus" + }, + "daemonEndpoints": { + "description": "Endpoints of daemons running on the Node.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeDaemonEndpoints" + }, + "images": { + "description": "List of container images on this node", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerImage" + } + }, + "nodeInfo": { + "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSystemInfo" + }, + "phase": { + "description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", + "type": "string" + }, + "volumesAttached": { + "description": "List of volumes that are attached to the node.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.AttachedVolume" + } + }, + "volumesInUse": { + "description": "List of attachable volumes in use (mounted) by the node.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.NodeSystemInfo": { + "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", + "type": "object", + "required": [ + "machineID", + "systemUUID", + "bootID", + "kernelVersion", + "osImage", + "containerRuntimeVersion", + "kubeletVersion", + "kubeProxyVersion", + "operatingSystem", + "architecture" + ], + "properties": { + "architecture": { + "description": "The Architecture reported by the node", + "type": "string" + }, + "bootID": { + "description": "Boot ID reported by the node.", + "type": "string" + }, + "containerRuntimeVersion": { + "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", + "type": "string" + }, + "kernelVersion": { + "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + "type": "string" + }, + "kubeProxyVersion": { + "description": "KubeProxy Version reported by the node.", + "type": "string" + }, + "kubeletVersion": { + "description": "Kubelet Version reported by the node.", + "type": "string" + }, + "machineID": { + "description": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + "type": "string" + }, + "operatingSystem": { + "description": "The Operating System reported by the node", + "type": "string" + }, + "osImage": { + "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + "type": "string" + }, + "systemUUID": { + "description": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ObjectFieldSelector": { + "description": "ObjectFieldSelector selects an APIVersioned field of an object.", + "type": "object", + "required": [ + "fieldPath" + ], + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "fieldPath": { + "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", + "type": "string" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/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" + }, + "namespace": { + "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + "type": "string" + }, + "resourceVersion": { + "description": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolume": { + "description": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec" + }, + "status": { + "description": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolume", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeClaim": { + "description": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec" + }, + "status": { + "description": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolumeClaim", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeClaimCondition": { + "description": "PersistentVolumeClaimCondition contails details about state of pvc", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "description": "Last time we probed the condition.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeClaimList": { + "description": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolumeClaimList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeClaimSpec": { + "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "description": "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.", + "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference" + }, + "resources": { + "description": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, + "selector": { + "description": "A label query over volumes to consider for binding.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeClaimStatus": { + "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "capacity": { + "description": "Represents the actual resources of the underlying volume.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "conditions": { + "description": "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "phase": { + "description": "Phase represents the current phase of PersistentVolumeClaim.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeClaimTemplate": { + "description": "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "metadata": { + "description": "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource": { + "description": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", + "type": "object", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeList": { + "description": "PersistentVolumeList is a list of PersistentVolume items.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolumeList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeSpec": { + "description": "PersistentVolumeSpec is the specification of a persistent volume.", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", + "type": "array", + "items": { + "type": "string" + } + }, + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureFilePersistentVolumeSource" + }, + "capacity": { + "description": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.CephFSPersistentVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.CinderPersistentVolumeSource" + }, + "claimRef": { + "description": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "csi": { + "description": "CSI represents storage that is handled by an external CSI driver (Beta feature).", + "$ref": "#/definitions/io.k8s.api.core.v1.CSIPersistentVolumeSource" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "$ref": "#/definitions/io.k8s.api.core.v1.FlexPersistentVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsPersistentVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIPersistentVolumeSource" + }, + "local": { + "description": "Local represents directly-attached storage with node affinity", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalVolumeSource" + }, + "mountOptions": { + "description": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", + "type": "array", + "items": { + "type": "string" + } + }, + "nfs": { + "description": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" + }, + "nodeAffinity": { + "description": "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeNodeAffinity" + }, + "persistentVolumeReclaimPolicy": { + "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + "type": "string" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.RBDPersistentVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOPersistentVolumeSource" + }, + "storageClassName": { + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", + "type": "string" + }, + "storageos": { + "description": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" + }, + "volumeMode": { + "description": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.", + "type": "string" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeStatus": { + "description": "PersistentVolumeStatus is the current status of a persistent volume.", + "type": "object", + "properties": { + "message": { + "description": "A human-readable message indicating details about why the volume is in this state.", + "type": "string" + }, + "phase": { + "description": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", + "type": "string" + }, + "reason": { + "description": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource": { + "description": "Represents a Photon Controller persistent disk resource.", + "type": "object", + "required": [ + "pdID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "pdID": { + "description": "ID that identifies Photon Controller persistent disk", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Pod": { + "description": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" + }, + "status": { + "description": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Pod", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodAffinity": { + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" + } + } + } + }, + "io.k8s.api.core.v1.PodAffinityTerm": { + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running", + "type": "object", + "required": [ + "topologyKey" + ], + "properties": { + "labelSelector": { + "description": "A label query over a set of resources, in this case pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "namespaceSelector": { + "description": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is alpha-level and is only honored when PodAffinityNamespaceSelector feature is enabled.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "namespaces": { + "description": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"", + "type": "array", + "items": { + "type": "string" + } + }, + "topologyKey": { + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodAntiAffinity": { + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" + } + } + } + }, + "io.k8s.api.core.v1.PodCondition": { + "description": "PodCondition contains details for the current condition of this pod.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "description": "Last time we probed the condition.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "string" + }, + "type": { + "description": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodDNSConfig": { + "description": "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", + "type": "object", + "properties": { + "nameservers": { + "description": "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "options": { + "description": "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodDNSConfigOption" + } + }, + "searches": { + "description": "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.PodDNSConfigOption": { + "description": "PodDNSConfigOption defines DNS resolver options of a pod.", + "type": "object", + "properties": { + "name": { + "description": "Required.", + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodIP": { + "description": "IP address information for entries in the (plural) PodIPs field. Each entry includes:\n IP: An IP address allocated to the pod. Routable at least within the cluster.", + "type": "object", + "properties": { + "ip": { + "description": "ip is an IP address (IPv4 or IPv6) assigned to the pod", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodList": { + "description": "PodList is a list of Pods.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PodList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodReadinessGate": { + "description": "PodReadinessGate contains the reference to a pod condition", + "type": "object", + "required": [ + "conditionType" + ], + "properties": { + "conditionType": { + "description": "ConditionType refers to a condition in the pod's condition list with matching type.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodSecurityContext": { + "description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", + "type": "object", + "properties": { + "fsGroup": { + "description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", + "type": "integer", + "format": "int64" + }, + "fsGroupChangePolicy": { + "description": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used.", + "type": "string" + }, + "runAsGroup": { + "description": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "type": "integer", + "format": "int64" + }, + "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 SecurityContext. 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 SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "type": "integer", + "format": "int64" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" + }, + "seccompProfile": { + "description": "The seccomp options to use by the containers in this pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.SeccompProfile" + }, + "supplementalGroups": { + "description": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "sysctls": { + "description": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Sysctl" + } + }, + "windowsOptions": { + "description": "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "$ref": "#/definitions/io.k8s.api.core.v1.WindowsSecurityContextOptions" + } + } + }, + "io.k8s.api.core.v1.PodSpec": { + "description": "PodSpec is a description of a pod.", + "type": "object", + "required": [ + "containers" + ], + "properties": { + "activeDeadlineSeconds": { + "description": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + "type": "integer", + "format": "int64" + }, + "affinity": { + "description": "If specified, the pod's scheduling constraints", + "$ref": "#/definitions/io.k8s.api.core.v1.Affinity" + }, + "automountServiceAccountToken": { + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", + "type": "boolean" + }, + "containers": { + "description": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Container" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "dnsConfig": { + "description": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodDNSConfig" + }, + "dnsPolicy": { + "description": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + "type": "string" + }, + "enableServiceLinks": { + "description": "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.", + "type": "boolean" + }, + "ephemeralContainers": { + "description": "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EphemeralContainer" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "hostAliases": { + "description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.HostAlias" + }, + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge" + }, + "hostIPC": { + "description": "Use the host's ipc namespace. Optional: Default to false.", + "type": "boolean" + }, + "hostNetwork": { + "description": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + "type": "boolean" + }, + "hostPID": { + "description": "Use the host's pid namespace. Optional: Default to false.", + "type": "boolean" + }, + "hostname": { + "description": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", + "type": "string" + }, + "imagePullSecrets": { + "description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "initContainers": { + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Container" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "nodeName": { + "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", + "type": "string" + }, + "nodeSelector": { + "description": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "overhead": { + "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "preemptionPolicy": { + "description": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + "type": "string" + }, + "priority": { + "description": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", + "type": "integer", + "format": "int32" + }, + "priorityClassName": { + "description": "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", + "type": "string" + }, + "readinessGates": { + "description": "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodReadinessGate" + } + }, + "restartPolicy": { + "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", + "type": "string" + }, + "runtimeClassName": { + "description": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14.", + "type": "string" + }, + "schedulerName": { + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + "type": "string" + }, + "securityContext": { + "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext" + }, + "serviceAccount": { + "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + "type": "string" + }, + "serviceAccountName": { + "description": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + "type": "string" + }, + "setHostnameAsFQDN": { + "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", + "type": "boolean" + }, + "shareProcessNamespace": { + "description": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", + "type": "boolean" + }, + "subdomain": { + "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all.", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", + "type": "integer", + "format": "int64" + }, + "tolerations": { + "description": "If specified, the pod's tolerations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" + } + }, + "topologySpreadConstraints": { + "description": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.TopologySpreadConstraint" + }, + "x-kubernetes-list-map-keys": [ + "topologyKey", + "whenUnsatisfiable" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "topologyKey", + "x-kubernetes-patch-strategy": "merge" + }, + "volumes": { + "description": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Volume" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge,retainKeys" + } + } + }, + "io.k8s.api.core.v1.PodStatus": { + "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", + "type": "object", + "properties": { + "conditions": { + "description": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "containerStatuses": { + "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" + } + }, + "ephemeralContainerStatuses": { + "description": "Status for any ephemeral containers that have run in this pod. This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" + } + }, + "hostIP": { + "description": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + "type": "string" + }, + "initContainerStatuses": { + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" + } + }, + "message": { + "description": "A human readable message indicating details about why the pod is in this condition.", + "type": "string" + }, + "nominatedNodeName": { + "description": "nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled.", + "type": "string" + }, + "phase": { + "description": "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", + "type": "string" + }, + "podIP": { + "description": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + "type": "string" + }, + "podIPs": { + "description": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodIP" + }, + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge" + }, + "qosClass": { + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", + "type": "string" + }, + "reason": { + "description": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", + "type": "string" + }, + "startTime": { + "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.core.v1.PodTemplate": { + "description": "PodTemplate describes a template for creating copies of a predefined pod.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "template": { + "description": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PodTemplate", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodTemplateList": { + "description": "PodTemplateList is a list of PodTemplates.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of pod templates", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PodTemplateList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodTemplateSpec": { + "description": "PodTemplateSpec describes the data a pod should have when created from a template", + "type": "object", + "properties": { + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" + } + } + }, + "io.k8s.api.core.v1.PortStatus": { + "type": "object", + "required": [ + "port", + "protocol" + ], + "properties": { + "error": { + "description": "Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + "type": "string" + }, + "port": { + "description": "Port is the port number of the service port of which status is recorded here", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PortworxVolumeSource": { + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "volumeID": { + "description": "VolumeID uniquely identifies a Portworx volume", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PreferredSchedulingTerm": { + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "type": "object", + "required": [ + "weight", + "preference" + ], + "properties": { + "preference": { + "description": "A node selector term, associated with the corresponding weight.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" + }, + "weight": { + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.Probe": { + "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "type": "object", + "properties": { + "exec": { + "description": "One and only one of the following should be specified. Exec specifies the action to take.", + "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.", + "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" + }, + "terminationGracePeriodSeconds": { + "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate.", + "type": "integer", + "format": "int64" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.ProjectedVolumeSource": { + "description": "Represents a projected volume source", + "type": "object", + "properties": { + "defaultMode": { + "description": "Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "sources": { + "description": "list of volume projections", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeProjection" + } + } + } + }, + "io.k8s.api.core.v1.QuobyteVolumeSource": { + "description": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "registry", + "volume" + ], + "properties": { + "group": { + "description": "Group to map volume access to Default is no group", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", + "type": "boolean" + }, + "registry": { + "description": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + "type": "string" + }, + "tenant": { + "description": "Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin", + "type": "string" + }, + "user": { + "description": "User to map volume access to Defaults to serivceaccount user", + "type": "string" + }, + "volume": { + "description": "Volume is a string that references an already created Quobyte volume by name.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.RBDPersistentVolumeSource": { + "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "monitors", + "image" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + "type": "string" + }, + "image": { + "description": "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "keyring": { + "description": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "monitors": { + "description": "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "pool": { + "description": "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "user": { + "description": "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.RBDVolumeSource": { + "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "monitors", + "image" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + "type": "string" + }, + "image": { + "description": "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "keyring": { + "description": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "monitors": { + "description": "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "pool": { + "description": "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "user": { + "description": "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ReplicationController": { + "description": "ReplicationController represents the configuration of a replication controller.", + "type": "object", + "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": { + "description": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerSpec" + }, + "status": { + "description": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ReplicationController", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ReplicationControllerCondition": { + "description": "ReplicationControllerCondition describes the state of a replication controller at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "The last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of replication controller condition.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ReplicationControllerList": { + "description": "ReplicationControllerList is a collection of replication controllers.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ReplicationControllerList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ReplicationControllerSpec": { + "description": "ReplicationControllerSpec is the specification of a replication controller.", + "type": "object", + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + } + }, + "io.k8s.api.core.v1.ReplicationControllerStatus": { + "description": "ReplicationControllerStatus represents the current status of a replication controller.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "availableReplicas": { + "description": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a replication controller's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "fullyLabeledReplicas": { + "description": "The number of pods that have labels matching the labels of the pod template of the replication controller.", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "ObservedGeneration reflects the generation of the most recently observed replication controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "The number of ready replicas for this replication controller.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.ResourceFieldSelector": { + "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + "type": "object", + "required": [ + "resource" + ], + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars", + "type": "string" + }, + "divisor": { + "description": "Specifies the output format of the exposed resources, defaults to \"1\"", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ResourceQuota": { + "description": "ResourceQuota sets aggregate quota restrictions enforced per namespace", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaSpec" + }, + "status": { + "description": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ResourceQuota", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ResourceQuotaList": { + "description": "ResourceQuotaList is a list of ResourceQuota items.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ResourceQuotaList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ResourceQuotaSpec": { + "description": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", + "type": "object", + "properties": { + "hard": { + "description": "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "scopeSelector": { + "description": "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", + "$ref": "#/definitions/io.k8s.api.core.v1.ScopeSelector" + }, + "scopes": { + "description": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.ResourceQuotaStatus": { + "description": "ResourceQuotaStatus defines the enforced hard limits and observed use.", + "type": "object", + "properties": { + "hard": { + "description": "Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "used": { + "description": "Used is the current observed total usage of the resource in the namespace.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + } + }, + "io.k8s.api.core.v1.ResourceRequirements": { + "description": "ResourceRequirements describes the compute resource requirements.", + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "requests": { + "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", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + } + }, + "io.k8s.api.core.v1.SELinuxOptions": { + "description": "SELinuxOptions are the labels to be applied to the container", + "type": "object", + "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" + } + } + }, + "io.k8s.api.core.v1.ScaleIOPersistentVolumeSource": { + "description": "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", + "type": "object", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", + "type": "string" + }, + "gateway": { + "description": "The host address of the ScaleIO API Gateway.", + "type": "string" + }, + "protectionDomain": { + "description": "The name of the ScaleIO Protection Domain for the configured storage.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "sslEnabled": { + "description": "Flag to enable/disable SSL communication with Gateway, default false", + "type": "boolean" + }, + "storageMode": { + "description": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + "type": "string" + }, + "storagePool": { + "description": "The ScaleIO Storage Pool associated with the protection domain.", + "type": "string" + }, + "system": { + "description": "The name of the storage system as configured in ScaleIO.", + "type": "string" + }, + "volumeName": { + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ScaleIOVolumeSource": { + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "type": "object", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", + "type": "string" + }, + "gateway": { + "description": "The host address of the ScaleIO API Gateway.", + "type": "string" + }, + "protectionDomain": { + "description": "The name of the ScaleIO Protection Domain for the configured storage.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "sslEnabled": { + "description": "Flag to enable/disable SSL communication with Gateway, default false", + "type": "boolean" + }, + "storageMode": { + "description": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + "type": "string" + }, + "storagePool": { + "description": "The ScaleIO Storage Pool associated with the protection domain.", + "type": "string" + }, + "system": { + "description": "The name of the storage system as configured in ScaleIO.", + "type": "string" + }, + "volumeName": { + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ScopeSelector": { + "description": "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "A list of scope selector requirements by scope of the resources.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ScopedResourceSelectorRequirement" + } + } + } + }, + "io.k8s.api.core.v1.ScopedResourceSelectorRequirement": { + "description": "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.", + "type": "object", + "required": [ + "scopeName", + "operator" + ], + "properties": { + "operator": { + "description": "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", + "type": "string" + }, + "scopeName": { + "description": "The name of the scope that the selector applies to.", + "type": "string" + }, + "values": { + "description": "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.SeccompProfile": { + "description": "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.", + "type": "object", + "required": [ + "type" + ], + "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\nLocalhost - 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" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "type", + "fields-to-discriminateBy": { + "localhostProfile": "LocalhostProfile" + } + } + ] + }, + "io.k8s.api.core.v1.Secret": { + "description": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + "type": "object", + "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" + }, + "data": { + "description": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "byte" + } + }, + "immutable": { + "description": "Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.", + "type": "boolean" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "stringData": { + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Used to facilitate programmatic handling of secret data.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Secret", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.SecretEnvSource": { + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.SecretKeySelector": { + "description": "SecretKeySelector selects a key of a Secret.", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "The key of the secret to select from. Must be a valid secret key.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.SecretList": { + "description": "SecretList is a list of Secret.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Secret" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "SecretList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.SecretProjection": { + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.SecretReference": { + "description": "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", + "type": "object", + "properties": { + "name": { + "description": "Name is unique within a namespace to reference a secret resource.", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which the secret name must be unique.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.SecretVolumeSource": { + "description": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "optional": { + "description": "Specify whether the Secret or its keys must be defined", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.SecurityContext": { + "description": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", + "type": "object", + "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.", + "$ref": "#/definitions/io.k8s.api.core.v1.Capabilities" + }, + "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.", + "type": "integer", + "format": "int64" + }, + "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.", + "type": "integer", + "format": "int64" + }, + "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.", + "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" + }, + "seccompProfile": { + "description": "The seccomp options to use by this container. If seccomp options are provided at both the pod \u0026 container level, the container options override the pod options.", + "$ref": "#/definitions/io.k8s.api.core.v1.SeccompProfile" + }, + "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.", + "$ref": "#/definitions/io.k8s.api.core.v1.WindowsSecurityContextOptions" + } + } + }, + "io.k8s.api.core.v1.Service": { + "description": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceSpec" + }, + "status": { + "description": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Service", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServiceAccount": { + "description": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", + "type": "object", + "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" + }, + "automountServiceAccountToken": { + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "secrets": { + "description": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ServiceAccount", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServiceAccountList": { + "description": "ServiceAccountList is a list of ServiceAccount objects", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ServiceAccountList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServiceAccountTokenProjection": { + "description": "ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).", + "type": "object", + "required": [ + "path" + ], + "properties": { + "audience": { + "description": "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", + "type": "string" + }, + "expirationSeconds": { + "description": "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", + "type": "integer", + "format": "int64" + }, + "path": { + "description": "Path is the path relative to the mount point of the file to project the token into.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ServiceList": { + "description": "ServiceList holds a list of services.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of services", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Service" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ServiceList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServicePort": { + "description": "ServicePort contains information on service's port.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "appProtocol": { + "description": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.", + "type": "string" + }, + "name": { + "description": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", + "type": "string" + }, + "nodePort": { + "description": "The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + "type": "integer", + "format": "int32" + }, + "port": { + "description": "The port that will be exposed by this service.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", + "type": "string" + }, + "targetPort": { + "description": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.core.v1.ServiceSpec": { + "description": "ServiceSpec describes the attributes that a user creates on a service.", + "type": "object", + "properties": { + "allocateLoadBalancerNodePorts": { + "description": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. allocateLoadBalancerNodePorts may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is alpha-level and is only honored by servers that enable the ServiceLBNodePortControl feature.", + "type": "boolean" + }, + "clusterIP": { + "description": "clusterIP is the IP address of the service and is usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "string" + }, + "clusterIPs": { + "description": "ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are \"None\", empty string (\"\"), or a valid IP address. Setting this to \"None\" makes a \"headless service\" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.\n\nUnless the \"IPv6DualStack\" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "externalIPs": { + "description": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", + "type": "array", + "items": { + "type": "string" + } + }, + "externalName": { + "description": "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\".", + "type": "string" + }, + "externalTrafficPolicy": { + "description": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", + "type": "string" + }, + "healthCheckNodePort": { + "description": "healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type).", + "type": "integer", + "format": "int32" + }, + "internalTrafficPolicy": { + "description": "InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\".", + "type": "string" + }, + "ipFamilies": { + "description": "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the \"IPv6DualStack\" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "ipFamilyPolicy": { + "description": "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the \"IPv6DualStack\" feature gate. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", + "type": "string" + }, + "loadBalancerClass": { + "description": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", + "type": "string" + }, + "loadBalancerIP": { + "description": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", + "type": "string" + }, + "loadBalancerSourceRanges": { + "description": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", + "type": "array", + "items": { + "type": "string" + } + }, + "ports": { + "description": "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ServicePort" + }, + "x-kubernetes-list-map-keys": [ + "port", + "protocol" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "port", + "x-kubernetes-patch-strategy": "merge" + }, + "publishNotReadyAddresses": { + "description": "publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.", + "type": "boolean" + }, + "selector": { + "description": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "sessionAffinityConfig contains the configurations of session affinity.", + "$ref": "#/definitions/io.k8s.api.core.v1.SessionAffinityConfig" + }, + "topologyKeys": { + "description": "topologyKeys is a preference-order list of topology keys which implementations of services should use to preferentially sort endpoints when accessing this Service, it can not be used at the same time as externalTrafficPolicy=Local. Topology keys must be valid label keys and at most 16 keys may be specified. Endpoints are chosen based on the first topology key with available backends. If this field is specified and all entries have no backends that match the topology of the client, the service has no backends for that client and connections should fail. The special value \"*\" may be used to mean \"any topology\". This catch-all value, if used, only makes sense as the last value in the list. If this is not specified or empty, no topology constraints will be applied. This field is alpha-level and is only honored by servers that enable the ServiceTopology feature. This field is deprecated and will be removed in a future version.", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ServiceStatus": { + "description": "ServiceStatus represents the current status of a service.", + "type": "object", + "properties": { + "conditions": { + "description": "Current service state", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer, if one is present.", + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" + } + } + }, + "io.k8s.api.core.v1.SessionAffinityConfig": { + "description": "SessionAffinityConfig represents the configurations of session affinity.", + "type": "object", + "properties": { + "clientIP": { + "description": "clientIP contains the configurations of Client IP based session affinity.", + "$ref": "#/definitions/io.k8s.api.core.v1.ClientIPConfig" + } + } + }, + "io.k8s.api.core.v1.StorageOSPersistentVolumeSource": { + "description": "Represents a StorageOS persistent volume resource.", + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "volumeName": { + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + "type": "string" + }, + "volumeNamespace": { + "description": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.StorageOSVolumeSource": { + "description": "Represents a StorageOS persistent volume resource.", + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "volumeName": { + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + "type": "string" + }, + "volumeNamespace": { + "description": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Sysctl": { + "description": "Sysctl defines a kernel parameter to be set", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "Name of a property to set", + "type": "string" + }, + "value": { + "description": "Value of a property to set", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.TCPSocketAction": { + "description": "TCPSocketAction describes an action based on opening a socket", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Optional: Host name to connect to, defaults to the pod IP.", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.core.v1.Taint": { + "description": "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", + "type": "object", + "required": [ + "key", + "effect" + ], + "properties": { + "effect": { + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Required. The taint key to be applied to a node.", + "type": "string" + }, + "timeAdded": { + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "value": { + "description": "The taint value corresponding to the taint key.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Toleration": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "type": "object", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "type": "integer", + "format": "int64" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.TopologySelectorLabelRequirement": { + "description": "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.", + "type": "object", + "required": [ + "key", + "values" + ], + "properties": { + "key": { + "description": "The label key that the selector applies to.", + "type": "string" + }, + "values": { + "description": "An array of string values. One value must match the label to be selected. Each entry in Values is ORed.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.TopologySelectorTerm": { + "description": "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", + "type": "object", + "properties": { + "matchLabelExpressions": { + "description": "A list of topology selector requirements by labels.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorLabelRequirement" + } + } + } + }, + "io.k8s.api.core.v1.TopologySpreadConstraint": { + "description": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", + "type": "object", + "required": [ + "maxSkew", + "topologyKey", + "whenUnsatisfiable" + ], + "properties": { + "labelSelector": { + "description": "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "maxSkew": { + "description": "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.", + "type": "integer", + "format": "int32" + }, + "topologyKey": { + "description": "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each \u003ckey, value\u003e as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", + "type": "string" + }, + "whenUnsatisfiable": { + "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assigment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.TypedLocalObjectReference": { + "description": "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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" + } + } + }, + "io.k8s.api.core.v1.Volume": { + "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource" + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" + }, + "configMap": { + "description": "ConfigMap represents a configMap that should populate this volume", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource" + }, + "csi": { + "description": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + "$ref": "#/definitions/io.k8s.api.core.v1.CSIVolumeSource" + }, + "downwardAPI": { + "description": "DownwardAPI represents downward API about the pod that should populate this volume", + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeSource" + }, + "emptyDir": { + "description": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + "$ref": "#/definitions/io.k8s.api.core.v1.EmptyDirVolumeSource" + }, + "ephemeral": { + "description": "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.\n\nThis is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.", + "$ref": "#/definitions/io.k8s.api.core.v1.EphemeralVolumeSource" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" + }, + "gitRepo": { + "description": "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIVolumeSource" + }, + "name": { + "description": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "nfs": { + "description": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" + }, + "persistentVolumeClaim": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" + }, + "projected": { + "description": "Items for all in one resources secrets, configmaps, and downward API", + "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" + }, + "secret": { + "description": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource" + }, + "storageos": { + "description": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "io.k8s.api.core.v1.VolumeDevice": { + "description": "volumeDevice describes a mapping of a raw block device within a container.", + "type": "object", + "required": [ + "name", + "devicePath" + ], + "properties": { + "devicePath": { + "description": "devicePath is the path inside of the container that the device will be mapped to.", + "type": "string" + }, + "name": { + "description": "name must match the name of a persistentVolumeClaim in the pod", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.VolumeMount": { + "description": "VolumeMount describes a mounting of a Volume within a container.", + "type": "object", + "required": [ + "name", + "mountPath" + ], + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "type": "string" + }, + "mountPropagation": { + "description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", + "type": "string" + }, + "name": { + "description": "This must match the Name of a Volume.", + "type": "string" + }, + "readOnly": { + "description": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + "type": "boolean" + }, + "subPath": { + "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "type": "string" + }, + "subPathExpr": { + "description": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.VolumeNodeAffinity": { + "description": "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", + "type": "object", + "properties": { + "required": { + "description": "Required specifies hard node constraints that must be met.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector" + } + } + }, + "io.k8s.api.core.v1.VolumeProjection": { + "description": "Projection that may be projected along with other supported volume types", + "type": "object", + "properties": { + "configMap": { + "description": "information about the configMap data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapProjection" + }, + "downwardAPI": { + "description": "information about the downwardAPI data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIProjection" + }, + "secret": { + "description": "information about the secret data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretProjection" + }, + "serviceAccountToken": { + "description": "information about the serviceAccountToken data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccountTokenProjection" + } + } + }, + "io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource": { + "description": "Represents a vSphere volume resource.", + "type": "object", + "required": [ + "volumePath" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "storagePolicyID": { + "description": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", + "type": "string" + }, + "storagePolicyName": { + "description": "Storage Policy Based Management (SPBM) profile name.", + "type": "string" + }, + "volumePath": { + "description": "Path that identifies vSphere volume vmdk", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.WeightedPodAffinityTerm": { + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "type": "object", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "podAffinityTerm": { + "description": "Required. A pod affinity term, associated with the corresponding weight.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" + }, + "weight": { + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.WindowsSecurityContextOptions": { + "description": "WindowsSecurityContextOptions contain Windows-specific options and credentials.", + "type": "object", + "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" + } + } + }, + "io.k8s.api.discovery.v1.Endpoint": { + "description": "Endpoint represents a single logical \"backend\" implementing a service.", + "type": "object", + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "description": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "conditions": { + "description": "conditions contains information about the current status of the endpoint.", + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointConditions" + }, + "deprecatedTopology": { + "description": "deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "hints": { + "description": "hints contains information associated with how an endpoint should be consumed.", + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointHints" + }, + "hostname": { + "description": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", + "type": "string" + }, + "nodeName": { + "description": "nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.", + "type": "string" + }, + "targetRef": { + "description": "targetRef is a reference to a Kubernetes object that represents this endpoint.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "zone": { + "description": "zone is the name of the Zone this endpoint exists in.", + "type": "string" + } + } + }, + "io.k8s.api.discovery.v1.EndpointConditions": { + "description": "EndpointConditions represents the current condition of an endpoint.", + "type": "object", + "properties": { + "ready": { + "description": "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints.", + "type": "boolean" + }, + "serving": { + "description": "serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", + "type": "boolean" + }, + "terminating": { + "description": "terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", + "type": "boolean" + } + } + }, + "io.k8s.api.discovery.v1.EndpointHints": { + "description": "EndpointHints provides hints describing how an endpoint should be consumed.", + "type": "object", + "properties": { + "forZones": { + "description": "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1.ForZone" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.discovery.v1.EndpointPort": { + "description": "EndpointPort represents a Port used by an EndpointSlice", + "type": "object", + "properties": { + "appProtocol": { + "description": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "type": "string" + }, + "name": { + "description": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", + "type": "string" + }, + "port": { + "description": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + "type": "string" + } + } + }, + "io.k8s.api.discovery.v1.EndpointSlice": { + "description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + "type": "object", + "required": [ + "addressType", + "endpoints" + ], + "properties": { + "addressType": { + "description": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + "type": "string" + }, + "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" + }, + "endpoints": { + "description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1.Endpoint" + }, + "x-kubernetes-list-type": "atomic" + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "ports": { + "description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointPort" + }, + "x-kubernetes-list-type": "atomic" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "discovery.k8s.io", + "kind": "EndpointSlice", + "version": "v1" + } + ] + }, + "io.k8s.api.discovery.v1.EndpointSliceList": { + "description": "EndpointSliceList represents a list of endpoint slices", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of endpoint slices", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + } + }, + "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": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "discovery.k8s.io", + "kind": "EndpointSliceList", + "version": "v1" + } + ] + }, + "io.k8s.api.discovery.v1.ForZone": { + "description": "ForZone provides information about which zones should consume this endpoint.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name represents the name of the zone.", + "type": "string" + } + } + }, + "io.k8s.api.discovery.v1beta1.Endpoint": { + "description": "Endpoint represents a single logical \"backend\" implementing a service.", + "type": "object", + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "description": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "conditions": { + "description": "conditions contains information about the current status of the endpoint.", + "$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointConditions" + }, + "hints": { + "description": "hints contains information associated with how an endpoint should be consumed.", + "$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointHints" + }, + "hostname": { + "description": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", + "type": "string" + }, + "nodeName": { + "description": "nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.", + "type": "string" + }, + "targetRef": { + "description": "targetRef is a reference to a Kubernetes object that represents this endpoint.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "topology": { + "description": "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.\nThis field is deprecated and will be removed in future api versions.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "io.k8s.api.discovery.v1beta1.EndpointConditions": { + "description": "EndpointConditions represents the current condition of an endpoint.", + "type": "object", + "properties": { + "ready": { + "description": "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be \"true\" for terminating endpoints.", + "type": "boolean" + }, + "serving": { + "description": "serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", + "type": "boolean" + }, + "terminating": { + "description": "terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.", + "type": "boolean" + } + } + }, + "io.k8s.api.discovery.v1beta1.EndpointHints": { + "description": "EndpointHints provides hints describing how an endpoint should be consumed.", + "type": "object", + "properties": { + "forZones": { + "description": "forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. May contain a maximum of 8 entries.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1beta1.ForZone" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.discovery.v1beta1.EndpointPort": { + "description": "EndpointPort represents a Port used by an EndpointSlice", + "type": "object", + "properties": { + "appProtocol": { + "description": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "type": "string" + }, + "name": { + "description": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", + "type": "string" + }, + "port": { + "description": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + "type": "string" + } + } + }, + "io.k8s.api.discovery.v1beta1.EndpointSlice": { + "description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + "type": "object", + "required": [ + "addressType", + "endpoints" + ], + "properties": { + "addressType": { + "description": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.", + "type": "string" + }, + "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" + }, + "endpoints": { + "description": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1beta1.Endpoint" + }, + "x-kubernetes-list-type": "atomic" + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "ports": { + "description": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointPort" + }, + "x-kubernetes-list-type": "atomic" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "discovery.k8s.io", + "kind": "EndpointSlice", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.discovery.v1beta1.EndpointSliceList": { + "description": "EndpointSliceList represents a list of endpoint slices", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "List of endpoint slices", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.discovery.v1beta1.EndpointSlice" + } + }, + "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": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "discovery.k8s.io", + "kind": "EndpointSliceList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.discovery.v1beta1.ForZone": { + "description": "ForZone provides information about which zones should consume this endpoint.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name represents the name of the zone.", + "type": "string" + } + } + }, + "io.k8s.api.events.v1.Event": { + "description": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + "type": "object", + "required": [ + "eventTime" + ], + "properties": { + "action": { + "description": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.", + "type": "string" + }, + "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" + }, + "deprecatedCount": { + "description": "deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.", + "type": "integer", + "format": "int32" + }, + "deprecatedFirstTimestamp": { + "description": "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "deprecatedLastTimestamp": { + "description": "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "deprecatedSource": { + "description": "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", + "$ref": "#/definitions/io.k8s.api.core.v1.EventSource" + }, + "eventTime": { + "description": "eventTime is the time when this Event was first observed. It is required.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "note": { + "description": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + "type": "string" + }, + "reason": { + "description": "reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.", + "type": "string" + }, + "regarding": { + "description": "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "related": { + "description": "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "reportingController": { + "description": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", + "type": "string" + }, + "reportingInstance": { + "description": "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.", + "type": "string" + }, + "series": { + "description": "series is data about the Event series this event represents or nil if it's a singleton Event.", + "$ref": "#/definitions/io.k8s.api.events.v1.EventSeries" + }, + "type": { + "description": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" + } + ] + }, + "io.k8s.api.events.v1.EventList": { + "description": "EventList is a list of Event objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.events.v1.Event" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "events.k8s.io", + "kind": "EventList", + "version": "v1" + } + ] + }, + "io.k8s.api.events.v1.EventSeries": { + "description": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in \"k8s.io/client-go/tools/events/event_broadcaster.go\" shows how this struct is updated on heartbeats and can guide customized reporter implementations.", + "type": "object", + "required": [ + "count", + "lastObservedTime" + ], + "properties": { + "count": { + "description": "count is the number of occurrences in this series up to the last heartbeat time.", + "type": "integer", + "format": "int32" + }, + "lastObservedTime": { + "description": "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + } + } + }, + "io.k8s.api.events.v1beta1.Event": { + "description": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.", + "type": "object", + "required": [ + "eventTime" + ], + "properties": { + "action": { + "description": "action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field can have at most 128 characters.", + "type": "string" + }, + "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" + }, + "deprecatedCount": { + "description": "deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.", + "type": "integer", + "format": "int32" + }, + "deprecatedFirstTimestamp": { + "description": "deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "deprecatedLastTimestamp": { + "description": "deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "deprecatedSource": { + "description": "deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.", + "$ref": "#/definitions/io.k8s.api.core.v1.EventSource" + }, + "eventTime": { + "description": "eventTime is the time when this Event was first observed. It is required.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "note": { + "description": "note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.", + "type": "string" + }, + "reason": { + "description": "reason is why the action was taken. It is human-readable. This field can have at most 128 characters.", + "type": "string" + }, + "regarding": { + "description": "regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "related": { + "description": "related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "reportingController": { + "description": "reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.", + "type": "string" + }, + "reportingInstance": { + "description": "reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.", + "type": "string" + }, + "series": { + "description": "series is data about the Event series this event represents or nil if it's a singleton Event.", + "$ref": "#/definitions/io.k8s.api.events.v1beta1.EventSeries" + }, + "type": { + "description": "type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "events.k8s.io", + "kind": "Event", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.events.v1beta1.EventList": { + "description": "EventList is a list of Event objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.events.v1beta1.Event" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "events.k8s.io", + "kind": "EventList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.events.v1beta1.EventSeries": { + "description": "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", + "type": "object", + "required": [ + "count", + "lastObservedTime" + ], + "properties": { + "count": { + "description": "count is the number of occurrences in this series up to the last heartbeat time.", + "type": "integer", + "format": "int32" + }, + "lastObservedTime": { + "description": "lastObservedTime is the time when last Event from the series was seen before last heartbeat.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime" + } + } + }, + "io.k8s.api.extensions.v1beta1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + "type": "object", + "required": [ + "backend" + ], + "properties": { + "backend": { + "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressBackend" + }, + "path": { + "description": "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + "type": "string" + }, + "pathType": { + "description": "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + "type": "string" + } + } + }, + "io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue": { + "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://\u003chost\u003e/\u003cpath\u003e?\u003csearchpart\u003e -\u003e backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + "type": "object", + "required": [ + "paths" + ], + "properties": { + "paths": { + "description": "A collection of paths that map requests to backends.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressPath" + } + } + } + }, + "io.k8s.api.extensions.v1beta1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressSpec" + }, + "status": { + "description": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "extensions", + "kind": "Ingress", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.extensions.v1beta1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", + "type": "object", + "properties": { + "resource": { + "description": "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", + "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference" + }, + "serviceName": { + "description": "Specifies the name of the referenced service.", + "type": "string" + }, + "servicePort": { + "description": "Specifies the port of the referenced service.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.extensions.v1beta1.IngressList": { + "description": "IngressList is a collection of Ingress.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of Ingress.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "extensions", + "kind": "IngressList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.extensions.v1beta1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "type": "object", + "properties": { + "host": { + "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "type": "string" + }, + "http": { + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue" + } + } + }, + "io.k8s.api.extensions.v1beta1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", + "type": "object", + "properties": { + "backend": { + "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressBackend" + }, + "ingressClassName": { + "description": "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + "type": "string" + }, + "rules": { + "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressRule" + } + }, + "tls": { + "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressTLS" + } + } + } + }, + "io.k8s.api.extensions.v1beta1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "type": "object", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer.", + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" + } + } + }, + "io.k8s.api.extensions.v1beta1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an Ingress.", + "type": "object", + "properties": { + "hosts": { + "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "type": "array", + "items": { + "type": "string" + } + }, + "secretName": { + "description": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod": { + "description": "FlowDistinguisherMethod specifies the method of a flow distinguisher.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "description": "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.FlowSchema": { + "description": "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", + "type": "object", + "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": { + "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec" + }, + "status": { + "description": "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition": { + "description": "FlowSchemaCondition describes conditions for a FlowSchema.", + "type": "object", + "properties": { + "lastTransitionTime": { + "description": "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "`message` is a human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "`status` is the status of the condition. Can be True, False, Unknown. Required.", + "type": "string" + }, + "type": { + "description": "`type` is the type of the condition. Required.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.FlowSchemaList": { + "description": "FlowSchemaList is a list of FlowSchema objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "`items` is a list of FlowSchemas.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.FlowSchema" + } + }, + "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": { + "description": "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchemaList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec": { + "description": "FlowSchemaSpec describes how the FlowSchema's specification looks like.", + "type": "object", + "required": [ + "priorityLevelConfiguration" + ], + "properties": { + "distinguisherMethod": { + "description": "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod" + }, + "matchingPrecedence": { + "description": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", + "type": "integer", + "format": "int32" + }, + "priorityLevelConfiguration": { + "description": "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference" + }, + "rules": { + "description": "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus": { + "description": "FlowSchemaStatus represents the current state of a FlowSchema.", + "type": "object", + "properties": { + "conditions": { + "description": "`conditions` is a list of the current states of FlowSchema.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.GroupSubject": { + "description": "GroupSubject holds detailed information for group-kind subject.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.LimitResponse": { + "description": "LimitResponse defines how to handle requests that can not be executed right now.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "queuing": { + "description": "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`.", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration" + }, + "type": { + "description": "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + "type": "string" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "type", + "fields-to-discriminateBy": { + "queuing": "Queuing" + } + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration": { + "description": "LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:\n * How are requests for this priority level limited?\n * What should be done with requests that exceed the limit?", + "type": "object", + "properties": { + "assuredConcurrencyShares": { + "description": "`assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level:\n\n ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) )\n\nbigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30.", + "type": "integer", + "format": "int32" + }, + "limitResponse": { + "description": "`limitResponse` indicates what to do with requests that can not be executed right now", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.LimitResponse" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule": { + "description": "NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.", + "type": "object", + "required": [ + "verbs", + "nonResourceURLs" + ], + "properties": { + "nonResourceURLs": { + "description": "`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:\n - \"/healthz\" is legal\n - \"/hea*\" is illegal\n - \"/hea\" is legal but matches nothing\n - \"/hea/*\" also matches nothing\n - \"/healthz/*\" matches all per-component health checks.\n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "verbs": { + "description": "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects": { + "description": "PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.", + "type": "object", + "required": [ + "subjects" + ], + "properties": { + "nonResourceRules": { + "description": "`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule" + }, + "x-kubernetes-list-type": "atomic" + }, + "resourceRules": { + "description": "`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule" + }, + "x-kubernetes-list-type": "atomic" + }, + "subjects": { + "description": "subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.Subject" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration": { + "description": "PriorityLevelConfiguration represents the configuration of a priority level.", + "type": "object", + "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": { + "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec" + }, + "status": { + "description": "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition": { + "description": "PriorityLevelConfigurationCondition defines the condition of priority level.", + "type": "object", + "properties": { + "lastTransitionTime": { + "description": "`lastTransitionTime` is the last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "`message` is a human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "`status` is the status of the condition. Can be True, False, Unknown. Required.", + "type": "string" + }, + "type": { + "description": "`type` is the type of the condition. Required.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationList": { + "description": "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "`items` is a list of request-priorities.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration" + } + }, + "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": { + "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfigurationList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference": { + "description": "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "`name` is the name of the priority level configuration being referenced Required.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec": { + "description": "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", + "type": "object", + "required": [ + "type" + ], + "properties": { + "limited": { + "description": "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`.", + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration" + }, + "type": { + "description": "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", + "type": "string" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "type", + "fields-to-discriminateBy": { + "limited": "Limited" + } + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus": { + "description": "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", + "type": "object", + "properties": { + "conditions": { + "description": "`conditions` is the current state of \"request-priority\".", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration": { + "description": "QueuingConfiguration holds the configuration parameters for queuing", + "type": "object", + "properties": { + "handSize": { + "description": "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + "type": "integer", + "format": "int32" + }, + "queueLengthLimit": { + "description": "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", + "type": "integer", + "format": "int32" + }, + "queues": { + "description": "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule": { + "description": "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request.", + "type": "object", + "required": [ + "verbs", + "apiGroups", + "resources" + ], + "properties": { + "apiGroups": { + "description": "`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "clusterScope": { + "description": "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", + "type": "boolean" + }, + "namespaces": { + "description": "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "resources": { + "description": "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "verbs": { + "description": "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject": { + "description": "ServiceAccountSubject holds detailed information for service-account-kind subject.", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + "type": "string" + }, + "namespace": { + "description": "`namespace` is the namespace of matching ServiceAccount objects. Required.", + "type": "string" + } + } + }, + "io.k8s.api.flowcontrol.v1beta1.Subject": { + "description": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", + "type": "object", + "required": [ + "kind" + ], + "properties": { + "group": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.GroupSubject" + }, + "kind": { + "description": "Required", + "type": "string" + }, + "serviceAccount": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject" + }, + "user": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta1.UserSubject" + } + }, + "x-kubernetes-unions": [ + { + "discriminator": "kind", + "fields-to-discriminateBy": { + "group": "Group", + "serviceAccount": "ServiceAccount", + "user": "User" + } + } + ] + }, + "io.k8s.api.flowcontrol.v1beta1.UserSubject": { + "description": "UserSubject holds detailed information for user-kind subject.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "`name` is the username that matches, or \"*\" to match all usernames. Required.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + "type": "object", + "required": [ + "backend" + ], + "properties": { + "backend": { + "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressBackend" + }, + "path": { + "description": "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + "type": "string" + }, + "pathType": { + "description": "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1.HTTPIngressRuleValue": { + "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://\u003chost\u003e/\u003cpath\u003e?\u003csearchpart\u003e -\u003e backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + "type": "object", + "required": [ + "paths" + ], + "properties": { + "paths": { + "description": "A collection of paths that map requests to backends.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.HTTPIngressPath" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.networking.v1.IPBlock": { + "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\",\"2001:db9::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "type": "object", + "required": [ + "cidr" + ], + "properties": { + "cidr": { + "description": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\"", + "type": "string" + }, + "except": { + "description": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" or \"2001:db9::/64\" Except values will be rejected if they are outside the CIDR range", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.networking.v1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressSpec" + }, + "status": { + "description": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" + } + ] + }, + "io.k8s.api.networking.v1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", + "type": "object", + "properties": { + "resource": { + "description": "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\".", + "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference" + }, + "service": { + "description": "Service references a Service as a Backend. This is a mutually exclusive setting with \"Resource\".", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressServiceBackend" + } + } + }, + "io.k8s.api.networking.v1.IngressClass": { + "description": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" + } + ] + }, + "io.k8s.api.networking.v1.IngressClassList": { + "description": "IngressClassList is a collection of IngressClasses.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of IngressClasses.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + } + }, + "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": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressClassList", + "version": "v1" + } + ] + }, + "io.k8s.api.networking.v1.IngressClassParametersReference": { + "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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" + }, + "namespace": { + "description": "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + "type": "string" + }, + "scope": { + "description": "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1.IngressClassSpec": { + "description": "IngressClassSpec provides information about the class of an Ingress.", + "type": "object", + "properties": { + "controller": { + "description": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + "type": "string" + }, + "parameters": { + "description": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassParametersReference" + } + } + }, + "io.k8s.api.networking.v1.IngressList": { + "description": "IngressList is a collection of Ingress.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of Ingress.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressList", + "version": "v1" + } + ] + }, + "io.k8s.api.networking.v1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "type": "object", + "properties": { + "host": { + "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "type": "string" + }, + "http": { + "$ref": "#/definitions/io.k8s.api.networking.v1.HTTPIngressRuleValue" + } + } + }, + "io.k8s.api.networking.v1.IngressServiceBackend": { + "description": "IngressServiceBackend references a Kubernetes Service as a Backend.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name is the referenced service. The service must exist in the same namespace as the Ingress object.", + "type": "string" + }, + "port": { + "description": "Port of the referenced service. A port name or port number is required for a IngressServiceBackend.", + "$ref": "#/definitions/io.k8s.api.networking.v1.ServiceBackendPort" + } + } + }, + "io.k8s.api.networking.v1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", + "type": "object", + "properties": { + "defaultBackend": { + "description": "DefaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.", + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressBackend" + }, + "ingressClassName": { + "description": "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + "type": "string" + }, + "rules": { + "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressRule" + }, + "x-kubernetes-list-type": "atomic" + }, + "tls": { + "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressTLS" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.networking.v1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "type": "object", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer.", + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" + } + } + }, + "io.k8s.api.networking.v1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an Ingress.", + "type": "object", + "properties": { + "hosts": { + "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "secretName": { + "description": "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1.NetworkPolicy": { + "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior for this NetworkPolicy.", + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicySpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" + } + ] + }, + "io.k8s.api.networking.v1.NetworkPolicyEgressRule": { + "description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", + "type": "object", + "properties": { + "ports": { + "description": "List of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" + } + }, + "to": { + "description": "List of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" + } + } + } + }, + "io.k8s.api.networking.v1.NetworkPolicyIngressRule": { + "description": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", + "type": "object", + "properties": { + "from": { + "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" + } + }, + "ports": { + "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" + } + } + } + }, + "io.k8s.api.networking.v1.NetworkPolicyList": { + "description": "NetworkPolicyList is a list of NetworkPolicy objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "NetworkPolicyList", + "version": "v1" + } + ] + }, + "io.k8s.api.networking.v1.NetworkPolicyPeer": { + "description": "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", + "type": "object", + "properties": { + "ipBlock": { + "description": "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", + "$ref": "#/definitions/io.k8s.api.networking.v1.IPBlock" + }, + "namespaceSelector": { + "description": "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "podSelector": { + "description": "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + } + }, + "io.k8s.api.networking.v1.NetworkPolicyPort": { + "description": "NetworkPolicyPort describes a port to allow traffic on", + "type": "object", + "properties": { + "endPort": { + "description": "If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate \"NetworkPolicyEndPort\".", + "type": "integer", + "format": "int32" + }, + "port": { + "description": "The port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "protocol": { + "description": "The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1.NetworkPolicySpec": { + "description": "NetworkPolicySpec provides the specification of a NetworkPolicy", + "type": "object", + "required": [ + "podSelector" + ], + "properties": { + "egress": { + "description": "List of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyEgressRule" + } + }, + "ingress": { + "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyIngressRule" + } + }, + "podSelector": { + "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "policyTypes": { + "description": "List of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an Egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.networking.v1.ServiceBackendPort": { + "description": "ServiceBackendPort is the service port being referenced.", + "type": "object", + "properties": { + "name": { + "description": "Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", + "type": "string" + }, + "number": { + "description": "Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.networking.v1beta1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", + "type": "object", + "required": [ + "backend" + ], + "properties": { + "backend": { + "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressBackend" + }, + "path": { + "description": "Path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. When unspecified, all paths from incoming requests are matched.", + "type": "string" + }, + "pathType": { + "description": "PathType determines the interpretation of the Path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types. Defaults to ImplementationSpecific.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1beta1.HTTPIngressRuleValue": { + "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://\u003chost\u003e/\u003cpath\u003e?\u003csearchpart\u003e -\u003e backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + "type": "object", + "required": [ + "paths" + ], + "properties": { + "paths": { + "description": "A collection of paths that map requests to backends.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.HTTPIngressPath" + } + } + } + }, + "io.k8s.api.networking.v1beta1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressSpec" + }, + "status": { + "description": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.networking.v1beta1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", + "type": "object", + "properties": { + "resource": { + "description": "Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, serviceName and servicePort must not be specified.", + "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference" + }, + "serviceName": { + "description": "Specifies the name of the referenced service.", + "type": "string" + }, + "servicePort": { + "description": "Specifies the port of the referenced service.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.networking.v1beta1.IngressClass": { + "description": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressClassSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.networking.v1beta1.IngressClassList": { + "description": "IngressClassList is a collection of IngressClasses.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of IngressClasses.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressClass" + } + }, + "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": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressClassList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.networking.v1beta1.IngressClassParametersReference": { + "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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" + }, + "namespace": { + "description": "Namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + "type": "string" + }, + "scope": { + "description": "Scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\". Field can be enabled with IngressClassNamespacedParams feature gate.", + "type": "string" + } + } + }, + "io.k8s.api.networking.v1beta1.IngressClassSpec": { + "description": "IngressClassSpec provides information about the class of an Ingress.", + "type": "object", + "properties": { + "controller": { + "description": "Controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + "type": "string" + }, + "parameters": { + "description": "Parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters.", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressClassParametersReference" + } + } + }, + "io.k8s.api.networking.v1beta1.IngressList": { + "description": "IngressList is a collection of Ingress.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of Ingress.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.Ingress" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.networking.v1beta1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "type": "object", + "properties": { + "host": { + "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nHost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "type": "string" + }, + "http": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.HTTPIngressRuleValue" + } + } + }, + "io.k8s.api.networking.v1beta1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", + "type": "object", + "properties": { + "backend": { + "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressBackend" + }, + "ingressClassName": { + "description": "IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.", + "type": "string" + }, + "rules": { + "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressRule" + } + }, + "tls": { + "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IngressTLS" + } + } + } + }, + "io.k8s.api.networking.v1beta1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "type": "object", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer.", + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" + } + } + }, + "io.k8s.api.networking.v1beta1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an Ingress.", + "type": "object", + "properties": { + "hosts": { + "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "type": "array", + "items": { + "type": "string" + } + }, + "secretName": { + "description": "SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + "type": "string" + } + } + }, + "io.k8s.api.node.v1.Overhead": { + "description": "Overhead structure represents the resource overhead associated with running a pod.", + "type": "object", + "properties": { + "podFixed": { + "description": "PodFixed represents the fixed resource overhead associated with running a pod.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + } + }, + "io.k8s.api.node.v1.RuntimeClass": { + "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + "type": "object", + "required": [ + "handler" + ], + "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" + }, + "handler": { + "description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + "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": { + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "overhead": { + "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/\nThis field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature.", + "$ref": "#/definitions/io.k8s.api.node.v1.Overhead" + }, + "scheduling": { + "description": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + "$ref": "#/definitions/io.k8s.api.node.v1.Scheduling" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "node.k8s.io", + "kind": "RuntimeClass", + "version": "v1" + } + ] + }, + "io.k8s.api.node.v1.RuntimeClassList": { + "description": "RuntimeClassList is a list of RuntimeClass objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "node.k8s.io", + "kind": "RuntimeClassList", + "version": "v1" + } + ] + }, + "io.k8s.api.node.v1.Scheduling": { + "description": "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + "type": "object", + "properties": { + "nodeSelector": { + "description": "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "tolerations": { + "description": "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.node.v1beta1.Overhead": { + "description": "Overhead structure represents the resource overhead associated with running a pod.", + "type": "object", + "properties": { + "podFixed": { + "description": "PodFixed represents the fixed resource overhead associated with running a pod.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + } + }, + "io.k8s.api.node.v1beta1.RuntimeClass": { + "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", + "type": "object", + "required": [ + "handler" + ], + "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" + }, + "handler": { + "description": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node \u0026 CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + "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": { + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "overhead": { + "description": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.", + "$ref": "#/definitions/io.k8s.api.node.v1beta1.Overhead" + }, + "scheduling": { + "description": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", + "$ref": "#/definitions/io.k8s.api.node.v1beta1.Scheduling" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "node.k8s.io", + "kind": "RuntimeClass", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.node.v1beta1.RuntimeClassList": { + "description": "RuntimeClassList is a list of RuntimeClass objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.node.v1beta1.RuntimeClass" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "node.k8s.io", + "kind": "RuntimeClassList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.node.v1beta1.Scheduling": { + "description": "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + "type": "object", + "properties": { + "nodeSelector": { + "description": "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "tolerations": { + "description": "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "io.k8s.api.policy.v1.PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the PodDisruptionBudget.", + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetSpec" + }, + "status": { + "description": "Most recently observed status of the PodDisruptionBudget.", + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1" + } + ] + }, + "io.k8s.api.policy.v1.PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of PodDisruptionBudgets", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudgetList", + "version": "v1" + } + ] + }, + "io.k8s.api.policy.v1.PodDisruptionBudgetSpec": { + "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + "type": "object", + "properties": { + "maxUnavailable": { + "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "minAvailable": { + "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "selector": { + "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "x-kubernetes-patch-strategy": "replace" + } + } + }, + "io.k8s.api.policy.v1.PodDisruptionBudgetStatus": { + "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "type": "object", + "required": [ + "disruptionsAllowed", + "currentHealthy", + "desiredHealthy", + "expectedPods" + ], + "properties": { + "conditions": { + "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "currentHealthy": { + "description": "current number of healthy pods", + "type": "integer", + "format": "int32" + }, + "desiredHealthy": { + "description": "minimum desired number of healthy pods", + "type": "integer", + "format": "int32" + }, + "disruptedPods": { + "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + }, + "disruptionsAllowed": { + "description": "Number of pod disruptions that are currently allowed.", + "type": "integer", + "format": "int32" + }, + "expectedPods": { + "description": "total number of pods counted by this disruption budget", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.policy.v1beta1.AllowedCSIDriver": { + "description": "AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name is the registered name of the CSI driver", + "type": "string" + } + } + }, + "io.k8s.api.policy.v1beta1.AllowedFlexVolume": { + "description": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", + "type": "object", + "required": [ + "driver" + ], + "properties": { + "driver": { + "description": "driver is the name of the Flexvolume driver.", + "type": "string" + } + } + }, + "io.k8s.api.policy.v1beta1.AllowedHostPath": { + "description": "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", + "type": "object", + "properties": { + "pathPrefix": { + "description": "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + "type": "string" + }, + "readOnly": { + "description": "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", + "type": "boolean" + } + } + }, + "io.k8s.api.policy.v1beta1.Eviction": { + "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/\u003cpod name\u003e/evictions.", + "type": "object", + "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" + }, + "deleteOptions": { + "description": "DeleteOptions may be provided", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + "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": { + "description": "ObjectMeta describes the pod that is being evicted.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "Eviction", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.policy.v1beta1.FSGroupStrategyOptions": { + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "type": "object", + "properties": { + "ranges": { + "description": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.IDRange" + } + }, + "rule": { + "description": "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", + "type": "string" + } + } + }, + "io.k8s.api.policy.v1beta1.HostPortRange": { + "description": "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "type": "object", + "required": [ + "min", + "max" + ], + "properties": { + "max": { + "description": "max is the end of the range, inclusive.", + "type": "integer", + "format": "int32" + }, + "min": { + "description": "min is the start of the range, inclusive.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.policy.v1beta1.IDRange": { + "description": "IDRange provides a min/max of an allowed range of IDs.", + "type": "object", + "required": [ + "min", + "max" + ], + "properties": { + "max": { + "description": "max is the end of the range, inclusive.", + "type": "integer", + "format": "int64" + }, + "min": { + "description": "min is the start of the range, inclusive.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.policy.v1beta1.PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + "type": "object", + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the PodDisruptionBudget.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec" + }, + "status": { + "description": "Most recently observed status of the PodDisruptionBudget.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudgetList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec": { + "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + "type": "object", + "properties": { + "maxUnavailable": { + "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "minAvailable": { + "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "selector": { + "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "x-kubernetes-patch-strategy": "replace" + } + } + }, + "io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus": { + "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "type": "object", + "required": [ + "disruptionsAllowed", + "currentHealthy", + "desiredHealthy", + "expectedPods" + ], + "properties": { + "conditions": { + "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "currentHealthy": { + "description": "current number of healthy pods", + "type": "integer", + "format": "int32" + }, + "desiredHealthy": { + "description": "minimum desired number of healthy pods", + "type": "integer", + "format": "int32" + }, + "disruptedPods": { + "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + }, + "disruptionsAllowed": { + "description": "Number of pod disruptions that are currently allowed.", + "type": "integer", + "format": "int32" + }, + "expectedPods": { + "description": "total number of pods counted by this disruption budget", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.policy.v1beta1.PodSecurityPolicy": { + "description": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.", + "type": "object", + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec defines the policy enforced.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodSecurityPolicySpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodSecurityPolicy", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.policy.v1beta1.PodSecurityPolicyList": { + "description": "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodSecurityPolicy" + } + }, + "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": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodSecurityPolicyList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.policy.v1beta1.PodSecurityPolicySpec": { + "description": "PodSecurityPolicySpec defines the policy enforced.", + "type": "object", + "required": [ + "seLinux", + "runAsUser", + "supplementalGroups", + "fsGroup" + ], + "properties": { + "allowPrivilegeEscalation": { + "description": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + "type": "boolean" + }, + "allowedCSIDrivers": { + "description": "AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.AllowedCSIDriver" + } + }, + "allowedCapabilities": { + "description": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + "type": "array", + "items": { + "type": "string" + } + }, + "allowedFlexVolumes": { + "description": "allowedFlexVolumes is an allowlist of Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.AllowedFlexVolume" + } + }, + "allowedHostPaths": { + "description": "allowedHostPaths is an allowlist of host paths. Empty indicates that all host paths may be used.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.AllowedHostPath" + } + }, + "allowedProcMountTypes": { + "description": "AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", + "type": "array", + "items": { + "type": "string" + } + }, + "allowedUnsafeSysctls": { + "description": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultAddCapabilities": { + "description": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultAllowPrivilegeEscalation": { + "description": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + "type": "boolean" + }, + "forbiddenSysctls": { + "description": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", + "type": "array", + "items": { + "type": "string" + } + }, + "fsGroup": { + "description": "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.FSGroupStrategyOptions" + }, + "hostIPC": { + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + "type": "boolean" + }, + "hostNetwork": { + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + "type": "boolean" + }, + "hostPID": { + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec.", + "type": "boolean" + }, + "hostPorts": { + "description": "hostPorts determines which host port ranges are allowed to be exposed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.HostPortRange" + } + }, + "privileged": { + "description": "privileged determines if a pod can request to be run as privileged.", + "type": "boolean" + }, + "readOnlyRootFilesystem": { + "description": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + "type": "boolean" + }, + "requiredDropCapabilities": { + "description": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + "type": "array", + "items": { + "type": "string" + } + }, + "runAsGroup": { + "description": "RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.RunAsGroupStrategyOptions" + }, + "runAsUser": { + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.RunAsUserStrategyOptions" + }, + "runtimeClass": { + "description": "runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.RuntimeClassStrategyOptions" + }, + "seLinux": { + "description": "seLinux is the strategy that will dictate the allowable labels that may be set.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.SELinuxStrategyOptions" + }, + "supplementalGroups": { + "description": "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.SupplementalGroupsStrategyOptions" + }, + "volumes": { + "description": "volumes is an allowlist of volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.policy.v1beta1.RunAsGroupStrategyOptions": { + "description": "RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.", + "type": "object", + "required": [ + "rule" + ], + "properties": { + "ranges": { + "description": "ranges are the allowed ranges of gids that may be used. If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.IDRange" + } + }, + "rule": { + "description": "rule is the strategy that will dictate the allowable RunAsGroup values that may be set.", + "type": "string" + } + } + }, + "io.k8s.api.policy.v1beta1.RunAsUserStrategyOptions": { + "description": "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", + "type": "object", + "required": [ + "rule" + ], + "properties": { + "ranges": { + "description": "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.IDRange" + } + }, + "rule": { + "description": "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + "type": "string" + } + } + }, + "io.k8s.api.policy.v1beta1.RuntimeClassStrategyOptions": { + "description": "RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.", + "type": "object", + "required": [ + "allowedRuntimeClassNames" + ], + "properties": { + "allowedRuntimeClassNames": { + "description": "allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. A value of \"*\" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultRuntimeClassName": { + "description": "defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.", + "type": "string" + } + } + }, + "io.k8s.api.policy.v1beta1.SELinuxStrategyOptions": { + "description": "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", + "type": "object", + "required": [ + "rule" + ], + "properties": { + "rule": { + "description": "rule is the strategy that will dictate the allowable labels that may be set.", + "type": "string" + }, + "seLinuxOptions": { + "description": "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", + "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" + } + } + }, + "io.k8s.api.policy.v1beta1.SupplementalGroupsStrategyOptions": { + "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "type": "object", + "properties": { + "ranges": { + "description": "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1beta1.IDRange" + } + }, + "rule": { + "description": "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + "type": "string" + } + } + }, + "io.k8s.api.rbac.v1.AggregationRule": { + "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "type": "object", + "properties": { + "clusterRoleSelectors": { + "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + } + } + }, + "io.k8s.api.rbac.v1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "type": "object", + "properties": { + "aggregationRule": { + "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + "$ref": "#/definitions/io.k8s.api.rbac.v1.AggregationRule" + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "type": "object", + "required": [ + "roleRef" + ], + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of ClusterRoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBindingList", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of ClusterRoles", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleList", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "type": "object", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.rbac.v1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "type": "object", + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "Role", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "type": "object", + "required": [ + "roleRef" + ], + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of RoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleBindingList", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.RoleList": { + "description": "RoleList is a collection of Roles", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of Roles", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleList", + "version": "v1" + } + ] + }, + "io.k8s.api.rbac.v1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", + "type": "object", + "required": [ + "apiGroup", + "kind", + "name" + ], + "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" + } + } + }, + "io.k8s.api.rbac.v1.Subject": { + "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.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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" + } + } + }, + "io.k8s.api.rbac.v1beta1.AggregationRule": { + "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "type": "object", + "properties": { + "clusterRoleSelectors": { + "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + } + } + } + }, + "io.k8s.api.rbac.v1beta1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.", + "type": "object", + "properties": { + "aggregationRule": { + "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.AggregationRule" + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.", + "type": "object", + "required": [ + "roleRef" + ], + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in v1.22.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of ClusterRoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBindingList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of ClusterRoles", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "type": "object", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.rbac.v1beta1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.", + "type": "object", + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "Role", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.", + "type": "object", + "required": [ + "roleRef" + ], + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of RoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleBindingList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.RoleList": { + "description": "RoleList is a collection of Roles Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is a list of Roles", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" + } + }, + "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": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.rbac.v1beta1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", + "type": "object", + "required": [ + "apiGroup", + "kind", + "name" + ], + "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" + } + } + }, + "io.k8s.api.rbac.v1beta1.Subject": { + "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.", + "type": "object", + "required": [ + "kind", + "name" + ], + "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" + } + } + }, + "io.k8s.api.scheduling.v1.PriorityClass": { + "description": "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + "type": "object", + "required": [ + "value" + ], + "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" + }, + "description": { + "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + "type": "string" + }, + "globalDefault": { + "description": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + "type": "boolean" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "preemptionPolicy": { + "description": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + "type": "string" + }, + "value": { + "description": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + "type": "integer", + "format": "int32" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "scheduling.k8s.io", + "kind": "PriorityClass", + "version": "v1" + } + ] + }, + "io.k8s.api.scheduling.v1.PriorityClassList": { + "description": "PriorityClassList is a collection of priority classes.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of PriorityClasses", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.scheduling.v1.PriorityClass" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "scheduling.k8s.io", + "kind": "PriorityClassList", + "version": "v1" + } + ] + }, + "io.k8s.api.scheduling.v1beta1.PriorityClass": { + "description": "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + "type": "object", + "required": [ + "value" + ], + "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" + }, + "description": { + "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", + "type": "string" + }, + "globalDefault": { + "description": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + "type": "boolean" + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "preemptionPolicy": { + "description": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + "type": "string" + }, + "value": { + "description": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + "type": "integer", + "format": "int32" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "scheduling.k8s.io", + "kind": "PriorityClass", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.scheduling.v1beta1.PriorityClassList": { + "description": "PriorityClassList is a collection of priority classes.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of PriorityClasses", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.scheduling.v1beta1.PriorityClass" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "scheduling.k8s.io", + "kind": "PriorityClassList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1.CSIDriver": { + "description": "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "description": "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the CSI Driver.", + "$ref": "#/definitions/io.k8s.api.storage.v1.CSIDriverSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSIDriver", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.CSIDriverList": { + "description": "CSIDriverList is a collection of CSIDriver objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of CSIDriver", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.CSIDriver" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSIDriverList", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.CSIDriverSpec": { + "description": "CSIDriverSpec is the specification of a CSIDriver.", + "type": "object", + "properties": { + "attachRequired": { + "description": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", + "type": "boolean" + }, + "fsGroupPolicy": { + "description": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable.", + "type": "string" + }, + "podInfoOnMount": { + "description": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + "type": "boolean" + }, + "requiresRepublish": { + "description": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled.", + "type": "boolean" + }, + "storageCapacity": { + "description": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + "type": "boolean" + }, + "tokenRequests": { + "description": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\u003caudience\u003e\": {\n \"token\": \u003ctoken\u003e,\n \"expirationTimestamp\": \u003cexpiration timestamp in RFC3339\u003e,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.TokenRequest" + }, + "x-kubernetes-list-type": "atomic" + }, + "volumeLifecycleModes": { + "description": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.\n\nThis field is immutable.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "io.k8s.api.storage.v1.CSINode": { + "description": "CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "description": "metadata.name must be the Kubernetes node name.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec is the specification of CSINode", + "$ref": "#/definitions/io.k8s.api.storage.v1.CSINodeSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSINode", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.CSINodeDriver": { + "description": "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + "type": "object", + "required": [ + "name", + "nodeID" + ], + "properties": { + "allocatable": { + "description": "allocatable represents the volume resources of a node that are available for scheduling. This field is beta.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeNodeResources" + }, + "name": { + "description": "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + "type": "string" + }, + "nodeID": { + "description": "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + "type": "string" + }, + "topologyKeys": { + "description": "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.storage.v1.CSINodeList": { + "description": "CSINodeList is a collection of CSINode objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of CSINode", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.CSINode" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSINodeList", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.CSINodeSpec": { + "description": "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + "type": "object", + "required": [ + "drivers" + ], + "properties": { + "drivers": { + "description": "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.CSINodeDriver" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + } + }, + "io.k8s.api.storage.v1.StorageClass": { + "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + "type": "object", + "required": [ + "provisioner" + ], + "properties": { + "allowVolumeExpansion": { + "description": "AllowVolumeExpansion shows whether the storage class allow volume expand", + "type": "boolean" + }, + "allowedTopologies": { + "description": "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorTerm" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "mountOptions": { + "description": "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + "type": "array", + "items": { + "type": "string" + } + }, + "parameters": { + "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "provisioner": { + "description": "Provisioner indicates the type of the provisioner.", + "type": "string" + }, + "reclaimPolicy": { + "description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + "type": "string" + }, + "volumeBindingMode": { + "description": "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "StorageClass", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.StorageClassList": { + "description": "StorageClassList is a collection of storage classes.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of StorageClasses", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "StorageClassList", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.TokenRequest": { + "description": "TokenRequest contains parameters of a service account token.", + "type": "object", + "required": [ + "audience" + ], + "properties": { + "audience": { + "description": "Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.", + "type": "string" + }, + "expirationSeconds": { + "description": "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\".", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.storage.v1.VolumeAttachment": { + "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "description": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentSpec" + }, + "status": { + "description": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.VolumeAttachmentList": { + "description": "VolumeAttachmentList is a collection of VolumeAttachment objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of VolumeAttachments", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachment" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "VolumeAttachmentList", + "version": "v1" + } + ] + }, + "io.k8s.api.storage.v1.VolumeAttachmentSource": { + "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "type": "object", + "properties": { + "inlineVolumeSpec": { + "description": "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec" + }, + "persistentVolumeName": { + "description": "Name of the persistent volume to attach.", + "type": "string" + } + } + }, + "io.k8s.api.storage.v1.VolumeAttachmentSpec": { + "description": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + "type": "object", + "required": [ + "attacher", + "source", + "nodeName" + ], + "properties": { + "attacher": { + "description": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + "type": "string" + }, + "nodeName": { + "description": "The node that the volume should be attached to.", + "type": "string" + }, + "source": { + "description": "Source represents the volume that should be attached.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeAttachmentSource" + } + } + }, + "io.k8s.api.storage.v1.VolumeAttachmentStatus": { + "description": "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + "type": "object", + "required": [ + "attached" + ], + "properties": { + "attachError": { + "description": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeError" + }, + "attached": { + "description": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "type": "boolean" + }, + "attachmentMetadata": { + "description": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "detachError": { + "description": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1.VolumeError" + } + } + }, + "io.k8s.api.storage.v1.VolumeError": { + "description": "VolumeError captures an error encountered during a volume operation.", + "type": "object", + "properties": { + "message": { + "description": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + "type": "string" + }, + "time": { + "description": "Time the error was encountered.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.storage.v1.VolumeNodeResources": { + "description": "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + "type": "object", + "properties": { + "count": { + "description": "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.storage.v1beta1.CSIDriver": { + "description": "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "description": "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the CSI Driver.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.CSIDriverSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSIDriver", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.CSIDriverList": { + "description": "CSIDriverList is a collection of CSIDriver objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of CSIDriver", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.CSIDriver" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSIDriverList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.CSIDriverSpec": { + "description": "CSIDriverSpec is the specification of a CSIDriver.", + "type": "object", + "properties": { + "attachRequired": { + "description": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", + "type": "boolean" + }, + "fsGroupPolicy": { + "description": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details. This field is alpha-level, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate.\n\nThis field is immutable.", + "type": "string" + }, + "podInfoOnMount": { + "description": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", + "type": "boolean" + }, + "requiresRepublish": { + "description": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled.", + "type": "boolean" + }, + "storageCapacity": { + "description": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field is immutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", + "type": "boolean" + }, + "tokenRequests": { + "description": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\u003caudience\u003e\": {\n \"token\": \u003ctoken\u003e,\n \"expirationTimestamp\": \u003cexpiration timestamp in RFC3339\u003e,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.\n\nThis is a beta feature and only available when the CSIServiceAccountToken feature is enabled.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.TokenRequest" + }, + "x-kubernetes-list-type": "atomic" + }, + "volumeLifecycleModes": { + "description": "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.storage.v1beta1.CSINode": { + "description": "DEPRECATED - This group version of CSINode is deprecated by storage/v1/CSINode. See the release notes for more information. CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "description": "metadata.name must be the Kubernetes node name.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec is the specification of CSINode", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.CSINodeSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSINode", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.CSINodeDriver": { + "description": "CSINodeDriver holds information about the specification of one CSI driver installed on a node", + "type": "object", + "required": [ + "name", + "nodeID" + ], + "properties": { + "allocatable": { + "description": "allocatable represents the volume resources of a node that are available for scheduling.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeNodeResources" + }, + "name": { + "description": "This is the name of the CSI driver that this object refers to. This MUST be the same name returned by the CSI GetPluginName() call for that driver.", + "type": "string" + }, + "nodeID": { + "description": "nodeID of the node from the driver point of view. This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as \"node1\", but the storage system may refer to the same node as \"nodeA\". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. \"nodeA\" instead of \"node1\". This field is required.", + "type": "string" + }, + "topologyKeys": { + "description": "topologyKeys is the list of keys supported by the driver. When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. \"company.com/zone\", \"company.com/region\"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.storage.v1beta1.CSINodeList": { + "description": "CSINodeList is a collection of CSINode objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items is the list of CSINode", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.CSINode" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSINodeList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.CSINodeSpec": { + "description": "CSINodeSpec holds information about the specification of all CSI drivers installed on a node", + "type": "object", + "required": [ + "drivers" + ], + "properties": { + "drivers": { + "description": "drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.CSINodeDriver" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + } + }, + "io.k8s.api.storage.v1beta1.CSIStorageCapacity": { + "description": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", + "type": "object", + "required": [ + "storageClassName" + ], + "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" + }, + "capacity": { + "description": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "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" + }, + "maximumVolumeSize": { + "description": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "metadata": { + "description": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-\u003cuuid\u003e, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "nodeTopology": { + "description": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "storageClassName": { + "description": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSIStorageCapacity", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.CSIStorageCapacityList": { + "description": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of CSIStorageCapacity objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.CSIStorageCapacity" + }, + "x-kubernetes-list-map-keys": [ + "name" + ], + "x-kubernetes-list-type": "map" + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "CSIStorageCapacityList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.StorageClass": { + "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + "type": "object", + "required": [ + "provisioner" + ], + "properties": { + "allowVolumeExpansion": { + "description": "AllowVolumeExpansion shows whether the storage class allow volume expand", + "type": "boolean" + }, + "allowedTopologies": { + "description": "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorTerm" + } + }, + "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": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "mountOptions": { + "description": "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", + "type": "array", + "items": { + "type": "string" + } + }, + "parameters": { + "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "provisioner": { + "description": "Provisioner indicates the type of the provisioner.", + "type": "string" + }, + "reclaimPolicy": { + "description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", + "type": "string" + }, + "volumeBindingMode": { + "description": "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "StorageClass", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.StorageClassList": { + "description": "StorageClassList is a collection of storage classes.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of StorageClasses", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "StorageClassList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.TokenRequest": { + "description": "TokenRequest contains parameters of a service account token.", + "type": "object", + "required": [ + "audience" + ], + "properties": { + "audience": { + "description": "Audience is the intended audience of the token in \"TokenRequestSpec\". It will default to the audiences of kube apiserver.", + "type": "string" + }, + "expirationSeconds": { + "description": "ExpirationSeconds is the duration of validity of the token in \"TokenRequestSpec\". It has the same default value of \"ExpirationSeconds\" in \"TokenRequestSpec\"", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.storage.v1beta1.VolumeAttachment": { + "description": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "description": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeAttachmentSpec" + }, + "status": { + "description": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeAttachmentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "VolumeAttachment", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.VolumeAttachmentList": { + "description": "VolumeAttachmentList is a collection of VolumeAttachment objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "Items is the list of VolumeAttachments", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeAttachment" + } + }, + "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": { + "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "storage.k8s.io", + "kind": "VolumeAttachmentList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.storage.v1beta1.VolumeAttachmentSource": { + "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "type": "object", + "properties": { + "inlineVolumeSpec": { + "description": "inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec" + }, + "persistentVolumeName": { + "description": "Name of the persistent volume to attach.", + "type": "string" + } + } + }, + "io.k8s.api.storage.v1beta1.VolumeAttachmentSpec": { + "description": "VolumeAttachmentSpec is the specification of a VolumeAttachment request.", + "type": "object", + "required": [ + "attacher", + "source", + "nodeName" + ], + "properties": { + "attacher": { + "description": "Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName().", + "type": "string" + }, + "nodeName": { + "description": "The node that the volume should be attached to.", + "type": "string" + }, + "source": { + "description": "Source represents the volume that should be attached.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeAttachmentSource" + } + } + }, + "io.k8s.api.storage.v1beta1.VolumeAttachmentStatus": { + "description": "VolumeAttachmentStatus is the status of a VolumeAttachment request.", + "type": "object", + "required": [ + "attached" + ], + "properties": { + "attachError": { + "description": "The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeError" + }, + "attached": { + "description": "Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "type": "boolean" + }, + "attachmentMetadata": { + "description": "Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "detachError": { + "description": "The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher.", + "$ref": "#/definitions/io.k8s.api.storage.v1beta1.VolumeError" + } + } + }, + "io.k8s.api.storage.v1beta1.VolumeError": { + "description": "VolumeError captures an error encountered during a volume operation.", + "type": "object", + "properties": { + "message": { + "description": "String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information.", + "type": "string" + }, + "time": { + "description": "Time the error was encountered.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.storage.v1beta1.VolumeNodeResources": { + "description": "VolumeNodeResources is a set of resource limits for scheduling of volumes.", + "type": "object", + "properties": { + "count": { + "description": "Maximum number of unique volumes managed by the CSI driver that can be used on a node. A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is nil, then the supported number of volumes on this node is unbounded.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition": { + "description": "CustomResourceColumnDefinition specifies a column for server side printing.", + "type": "object", + "required": [ + "name", + "type", + "jsonPath" + ], + "properties": { + "description": { + "description": "description is a human readable description of this column.", + "type": "string" + }, + "format": { + "description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + "type": "string" + }, + "jsonPath": { + "description": "jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + "type": "string" + }, + "name": { + "description": "name is a human readable name for the column.", + "type": "string" + }, + "priority": { + "description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + "type": "integer", + "format": "int32" + }, + "type": { + "description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion": { + "description": "CustomResourceConversion describes how to convert different versions of a CR.", + "type": "object", + "required": [ + "strategy" + ], + "properties": { + "strategy": { + "description": "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.", + "type": "string" + }, + "webhook": { + "description": "webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition": { + "description": "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format \u003c.spec.name\u003e.\u003c.spec.group\u003e.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec describes how the user wants the resources to appear", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec" + }, + "status": { + "description": "status indicates the actual state of the CustomResourceDefinition", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiextensions.k8s.io", + "kind": "CustomResourceDefinition", + "version": "v1" + } + ] + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition": { + "description": "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "message is a human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "status is the status of the condition. Can be True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList": { + "description": "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items list individual CustomResourceDefinition objects", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiextensions.k8s.io", + "kind": "CustomResourceDefinitionList", + "version": "v1" + } + ] + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames": { + "description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + "type": "object", + "required": [ + "plural", + "kind" + ], + "properties": { + "categories": { + "description": "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "description": "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + "type": "string" + }, + "listKind": { + "description": "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + "type": "string" + }, + "plural": { + "description": "plural is the plural name of the resource to serve. The custom resources are served under `/apis/\u003cgroup\u003e/\u003cversion\u003e/.../\u003cplural\u003e`. Must match the name of the CustomResourceDefinition (in the form `\u003cnames.plural\u003e.\u003cgroup\u003e`). Must be all lowercase.", + "type": "string" + }, + "shortNames": { + "description": "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get \u003cshortname\u003e`. It must be all lowercase.", + "type": "array", + "items": { + "type": "string" + } + }, + "singular": { + "description": "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec": { + "description": "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + "type": "object", + "required": [ + "group", + "names", + "scope", + "versions" + ], + "properties": { + "conversion": { + "description": "conversion defines conversion settings for the CRD.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion" + }, + "group": { + "description": "group is the API group of the defined custom resource. The custom resources are served under `/apis/\u003cgroup\u003e/...`. Must match the name of the CustomResourceDefinition (in the form `\u003cnames.plural\u003e.\u003cgroup\u003e`).", + "type": "string" + }, + "names": { + "description": "names specify the resource and kind names for the custom resource.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames" + }, + "preserveUnknownFields": { + "description": "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + "type": "boolean" + }, + "scope": { + "description": "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`.", + "type": "string" + }, + "versions": { + "description": "versions is the list of all API versions of the defined custom resource. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA \u003e beta \u003e alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion" + } + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus": { + "description": "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + "type": "object", + "properties": { + "acceptedNames": { + "description": "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames" + }, + "conditions": { + "description": "conditions indicate state for particular aspects of a CustomResourceDefinition", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "storedVersions": { + "description": "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion": { + "description": "CustomResourceDefinitionVersion describes a version for CRD.", + "type": "object", + "required": [ + "name", + "served", + "storage" + ], + "properties": { + "additionalPrinterColumns": { + "description": "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition" + } + }, + "deprecated": { + "description": "deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.", + "type": "boolean" + }, + "deprecationWarning": { + "description": "deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.", + "type": "string" + }, + "name": { + "description": "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/\u003cgroup\u003e/\u003cversion\u003e/...` if `served` is true.", + "type": "string" + }, + "schema": { + "description": "schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation" + }, + "served": { + "description": "served is a flag enabling/disabling this version from being served via REST APIs", + "type": "boolean" + }, + "storage": { + "description": "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + "type": "boolean" + }, + "subresources": { + "description": "subresources specify what subresources this version of the defined custom resource have.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale": { + "description": "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + "type": "object", + "required": [ + "specReplicasPath", + "statusReplicasPath" + ], + "properties": { + "labelSelectorPath": { + "description": "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", + "type": "string" + }, + "specReplicasPath": { + "description": "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + "type": "string" + }, + "statusReplicasPath": { + "description": "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus": { + "description": "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + "type": "object" + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources": { + "description": "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + "type": "object", + "properties": { + "scale": { + "description": "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale" + }, + "status": { + "description": "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation": { + "description": "CustomResourceValidation is a list of validation methods for CustomResources.", + "type": "object", + "properties": { + "openAPIV3Schema": { + "description": "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation": { + "description": "ExternalDocumentation allows referencing an external resource for extended documentation.", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON": { + "description": "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps": { + "description": "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + "type": "object", + "properties": { + "$ref": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "additionalItems": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool" + }, + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool" + }, + "allOf": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + }, + "anyOf": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + }, + "default": { + "description": "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray" + } + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON" + } + }, + "example": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON" + }, + "exclusiveMaximum": { + "type": "boolean" + }, + "exclusiveMinimum": { + "type": "boolean" + }, + "externalDocs": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation" + }, + "format": { + "description": "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + "type": "string" + }, + "id": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray" + }, + "maxItems": { + "type": "integer", + "format": "int64" + }, + "maxLength": { + "type": "integer", + "format": "int64" + }, + "maxProperties": { + "type": "integer", + "format": "int64" + }, + "maximum": { + "type": "number", + "format": "double" + }, + "minItems": { + "type": "integer", + "format": "int64" + }, + "minLength": { + "type": "integer", + "format": "int64" + }, + "minProperties": { + "type": "integer", + "format": "int64" + }, + "minimum": { + "type": "number", + "format": "double" + }, + "multipleOf": { + "type": "number", + "format": "double" + }, + "not": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + }, + "nullable": { + "type": "boolean" + }, + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + }, + "pattern": { + "type": "string" + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" + } + }, + "required": { + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uniqueItems": { + "type": "boolean" + }, + "x-kubernetes-embedded-resource": { + "description": "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + "type": "boolean" + }, + "x-kubernetes-int-or-string": { + "description": "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + "type": "boolean" + }, + "x-kubernetes-list-map-keys": { + "description": "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + "type": "array", + "items": { + "type": "string" + } + }, + "x-kubernetes-list-type": { + "description": "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + "type": "string" + }, + "x-kubernetes-map-type": { + "description": "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + "type": "string" + }, + "x-kubernetes-preserve-unknown-fields": { + "description": "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + "type": "boolean" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray": { + "description": "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool": { + "description": "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray": { + "description": "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ServiceReference": { + "description": "ServiceReference holds a reference to Service.legacy.k8s.io", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "name is the name of the service. Required", + "type": "string" + }, + "namespace": { + "description": "namespace is the namespace of the service. Required", + "type": "string" + }, + "path": { + "description": "path is an optional URL path at which the webhook will be contacted.", + "type": "string" + }, + "port": { + "description": "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig": { + "description": "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + "type": "object", + "properties": { + "caBundle": { + "description": "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + "type": "string", + "format": "byte" + }, + "service": { + "description": "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ServiceReference" + }, + "url": { + "description": "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion": { + "description": "WebhookConversion describes how to call a conversion webhook", + "type": "object", + "required": [ + "conversionReviewVersions" + ], + "properties": { + "clientConfig": { + "description": "clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig" + }, + "conversionReviewVersions": { + "description": "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition": { + "description": "CustomResourceColumnDefinition specifies a column for server side printing.", + "type": "object", + "required": [ + "name", + "type", + "JSONPath" + ], + "properties": { + "JSONPath": { + "description": "JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.", + "type": "string" + }, + "description": { + "description": "description is a human readable description of this column.", + "type": "string" + }, + "format": { + "description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + "type": "string" + }, + "name": { + "description": "name is a human readable name for the column.", + "type": "string" + }, + "priority": { + "description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.", + "type": "integer", + "format": "int32" + }, + "type": { + "description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion": { + "description": "CustomResourceConversion describes how to convert different versions of a CR.", + "type": "object", + "required": [ + "strategy" + ], + "properties": { + "conversionReviewVersions": { + "description": "conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `[\"v1beta1\"]`.", + "type": "array", + "items": { + "type": "string" + } + }, + "strategy": { + "description": "strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information\n is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.", + "type": "string" + }, + "webhookClientConfig": { + "description": "webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. Required when `strategy` is set to `Webhook`.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition": { + "description": "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format \u003c.spec.name\u003e.\u003c.spec.group\u003e. Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead.", + "type": "object", + "required": [ + "spec" + ], + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "spec describes how the user wants the resources to appear", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec" + }, + "status": { + "description": "status indicates the actual state of the CustomResourceDefinition", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiextensions.k8s.io", + "kind": "CustomResourceDefinition", + "version": "v1beta1" + } + ] + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition": { + "description": "CustomResourceDefinitionCondition contains details for the current condition of this pod.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "message is a human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "reason is a unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "status is the status of the condition. Can be True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "type is the type of the condition. Types include Established, NamesAccepted and Terminating.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList": { + "description": "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "description": "items list individual CustomResourceDefinition objects", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiextensions.k8s.io", + "kind": "CustomResourceDefinitionList", + "version": "v1beta1" + } + ] + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames": { + "description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + "type": "object", + "required": [ + "plural", + "kind" + ], + "properties": { + "categories": { + "description": "categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.", + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "description": "kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.", + "type": "string" + }, + "listKind": { + "description": "listKind is the serialized kind of the list for this resource. Defaults to \"`kind`List\".", + "type": "string" + }, + "plural": { + "description": "plural is the plural name of the resource to serve. The custom resources are served under `/apis/\u003cgroup\u003e/\u003cversion\u003e/.../\u003cplural\u003e`. Must match the name of the CustomResourceDefinition (in the form `\u003cnames.plural\u003e.\u003cgroup\u003e`). Must be all lowercase.", + "type": "string" + }, + "shortNames": { + "description": "shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get \u003cshortname\u003e`. It must be all lowercase.", + "type": "array", + "items": { + "type": "string" + } + }, + "singular": { + "description": "singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec": { + "description": "CustomResourceDefinitionSpec describes how a user wants their resource to appear", + "type": "object", + "required": [ + "group", + "names", + "scope" + ], + "properties": { + "additionalPrinterColumns": { + "description": "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition" + } + }, + "conversion": { + "description": "conversion defines conversion settings for the CRD.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion" + }, + "group": { + "description": "group is the API group of the defined custom resource. The custom resources are served under `/apis/\u003cgroup\u003e/...`. Must match the name of the CustomResourceDefinition (in the form `\u003cnames.plural\u003e.\u003cgroup\u003e`).", + "type": "string" + }, + "names": { + "description": "names specify the resource and kind names for the custom resource.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames" + }, + "preserveUnknownFields": { + "description": "preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.", + "type": "boolean" + }, + "scope": { + "description": "scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.", + "type": "string" + }, + "subresources": { + "description": "subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources" + }, + "validation": { + "description": "validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation" + }, + "version": { + "description": "version is the API version of the defined custom resource. The custom resources are served under `/apis/\u003cgroup\u003e/\u003cversion\u003e/...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.", + "type": "string" + }, + "versions": { + "description": "versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA \u003e beta \u003e alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion" + } + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus": { + "description": "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", + "type": "object", + "properties": { + "acceptedNames": { + "description": "acceptedNames are the names that are actually being used to serve discovery. They may be different than the names in spec.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames" + }, + "conditions": { + "description": "conditions indicate state for particular aspects of a CustomResourceDefinition", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "storedVersions": { + "description": "storedVersions lists all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so a migration controller can finish a migration to another version (ensuring no old objects are left in storage), and then remove the rest of the versions from this list. Versions may not be removed from `spec.versions` while they exist in this list.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion": { + "description": "CustomResourceDefinitionVersion describes a version for CRD.", + "type": "object", + "required": [ + "name", + "served", + "storage" + ], + "properties": { + "additionalPrinterColumns": { + "description": "additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition" + } + }, + "deprecated": { + "description": "deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.", + "type": "boolean" + }, + "deprecationWarning": { + "description": "deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.", + "type": "string" + }, + "name": { + "description": "name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis/\u003cgroup\u003e/\u003cversion\u003e/...` if `served` is true.", + "type": "string" + }, + "schema": { + "description": "schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation" + }, + "served": { + "description": "served is a flag enabling/disabling this version from being served via REST APIs", + "type": "boolean" + }, + "storage": { + "description": "storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.", + "type": "boolean" + }, + "subresources": { + "description": "subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale": { + "description": "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + "type": "object", + "required": [ + "specReplicasPath", + "statusReplicasPath" + ], + "properties": { + "labelSelectorPath": { + "description": "labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string.", + "type": "string" + }, + "specReplicasPath": { + "description": "specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET.", + "type": "string" + }, + "statusReplicasPath": { + "description": "statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0.", + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus": { + "description": "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + "type": "object" + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources": { + "description": "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + "type": "object", + "properties": { + "scale": { + "description": "scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale" + }, + "status": { + "description": "status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation": { + "description": "CustomResourceValidation is a list of validation methods for CustomResources.", + "type": "object", + "properties": { + "openAPIV3Schema": { + "description": "openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation": { + "description": "ExternalDocumentation allows referencing an external resource for extended documentation.", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON": { + "description": "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps": { + "description": "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + "type": "object", + "properties": { + "$ref": { + "type": "string" + }, + "$schema": { + "type": "string" + }, + "additionalItems": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool" + }, + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool" + }, + "allOf": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + }, + "anyOf": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + }, + "default": { + "description": "default is a default value for undefined object fields. Defaulting is a beta feature under the CustomResourceDefaulting feature gate. CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray" + } + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" + } + }, + "example": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" + }, + "exclusiveMaximum": { + "type": "boolean" + }, + "exclusiveMinimum": { + "type": "boolean" + }, + "externalDocs": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation" + }, + "format": { + "description": "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + "type": "string" + }, + "id": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray" + }, + "maxItems": { + "type": "integer", + "format": "int64" + }, + "maxLength": { + "type": "integer", + "format": "int64" + }, + "maxProperties": { + "type": "integer", + "format": "int64" + }, + "maximum": { + "type": "number", + "format": "double" + }, + "minItems": { + "type": "integer", + "format": "int64" + }, + "minLength": { + "type": "integer", + "format": "int64" + }, + "minProperties": { + "type": "integer", + "format": "int64" + }, + "minimum": { + "type": "number", + "format": "double" + }, + "multipleOf": { + "type": "number", + "format": "double" + }, + "not": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + }, + "nullable": { + "type": "boolean" + }, + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + }, + "pattern": { + "type": "string" + }, + "patternProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" + } + }, + "required": { + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uniqueItems": { + "type": "boolean" + }, + "x-kubernetes-embedded-resource": { + "description": "x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).", + "type": "boolean" + }, + "x-kubernetes-int-or-string": { + "description": "x-kubernetes-int-or-string specifies that this value is either an integer or a string. If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:\n\n1) anyOf:\n - type: integer\n - type: string\n2) allOf:\n - anyOf:\n - type: integer\n - type: string\n - ... zero or more", + "type": "boolean" + }, + "x-kubernetes-list-map-keys": { + "description": "x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map.\n\nThis tag MUST only be used on lists that have the \"x-kubernetes-list-type\" extension set to \"map\". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).\n\nThe properties specified must either be required or have a default value, to ensure those properties are present for all list items.", + "type": "array", + "items": { + "type": "string" + } + }, + "x-kubernetes-list-type": { + "description": "x-kubernetes-list-type annotates an array to further describe its topology. This extension must only be used on lists and may have 3 possible values:\n\n1) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic lists will be entirely replaced when updated. This extension\n may be used on any type of list (struct, scalar, ...).\n2) `set`:\n Sets are lists that must not have multiple items with the same value. Each\n value must be a scalar, an object with x-kubernetes-map-type `atomic` or an\n array with x-kubernetes-list-type `atomic`.\n3) `map`:\n These lists are like maps in that their elements have a non-index key\n used to identify them. Order is preserved upon merge. The map tag\n must only be used on a list with elements of type object.\nDefaults to atomic for arrays.", + "type": "string" + }, + "x-kubernetes-map-type": { + "description": "x-kubernetes-map-type annotates an object to further describe its topology. This extension must only be used when type is object and may have 2 possible values:\n\n1) `granular`:\n These maps are actual maps (key-value pairs) and each fields are independent\n from each other (they can each be manipulated by separate actors). This is\n the default behaviour for all maps.\n2) `atomic`: the list is treated as a single entity, like a scalar.\n Atomic maps will be entirely replaced when updated.", + "type": "string" + }, + "x-kubernetes-preserve-unknown-fields": { + "description": "x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.", + "type": "boolean" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray": { + "description": "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool": { + "description": "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray": { + "description": "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array." + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference": { + "description": "ServiceReference holds a reference to Service.legacy.k8s.io", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "name is the name of the service. Required", + "type": "string" + }, + "namespace": { + "description": "namespace is the namespace of the service. Required", + "type": "string" + }, + "path": { + "description": "path is an optional URL path at which the webhook will be contacted.", + "type": "string" + }, + "port": { + "description": "port is an optional service port at which the webhook will be contacted. `port` should be a valid port number (1-65535, inclusive). Defaults to 443 for backward compatibility.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig": { + "description": "WebhookClientConfig contains the information to make a TLS connection with the webhook.", + "type": "object", + "properties": { + "caBundle": { + "description": "caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. If unspecified, system trust roots on the apiserver are used.", + "type": "string", + "format": "byte" + }, + "service": { + "description": "service is a reference to the service for this webhook. Either service or url must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.", + "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference" + }, + "url": { + "description": "url gives the location of the webhook, in standard URL form (`scheme://host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.api.resource.Quantity": { + "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n\u003cquantity\u003e ::= \u003csignedNumber\u003e\u003csuffix\u003e\n (Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\u003cdigit\u003e ::= 0 | 1 | ... | 9 \u003cdigits\u003e ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e ::= \"+\" | \"-\" \u003csignedNumber\u003e ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\u003cdecimalSI\u003e ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + "type": "string" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup": { + "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", + "type": "object", + "required": [ + "name", + "versions" + ], + "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" + }, + "name": { + "description": "name is the name of the group.", + "type": "string" + }, + "preferredVersion": { + "description": "preferredVersion is the version preferred by the API server, which probably is the storage version.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" + }, + "serverAddressByClientCIDRs": { + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" + } + }, + "versions": { + "description": "versions are the versions supported in this group.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIGroup", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList": { + "description": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + "type": "object", + "required": [ + "groups" + ], + "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" + }, + "groups": { + "description": "groups is a list of APIGroup.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "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" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIGroupList", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "type": "object", + "required": [ + "name", + "singularName", + "namespaced", + "kind", + "verbs" + ], + "properties": { + "categories": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "type": "array", + "items": { + "type": "string" + } + }, + "group": { + "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + "type": "string" + }, + "kind": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": "string" + }, + "name": { + "description": "name is the plural name of the resource.", + "type": "string" + }, + "namespaced": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": "boolean" + }, + "shortNames": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": "array", + "items": { + "type": "string" + } + }, + "singularName": { + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "type": "string" + }, + "storageVersionHash": { + "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + "type": "string" + }, + "verbs": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "type": "object", + "required": [ + "groupVersion", + "resources" + ], + "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" + }, + "groupVersion": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "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" + }, + "resources": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIResourceList", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions": { + "description": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + "type": "object", + "required": [ + "versions", + "serverAddressByClientCIDRs" + ], + "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" + }, + "serverAddressByClientCIDRs": { + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" + } + }, + "versions": { + "description": "versions are the api versions that are available.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIVersions", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Condition": { + "description": "Condition contains details for one aspect of the current state of this API Resource.", + "type": "object", + "required": [ + "type", + "status", + "lastTransitionTime", + "reason", + "message" + ], + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "message is a human readable message indicating details about the transition. This may be an empty string.", + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + "type": "integer", + "format": "int64" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { + "description": "DeleteOptions may be provided when deleting an API object.", + "type": "object", + "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" + }, + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { + "type": "string" + } + }, + "gracePeriodSeconds": { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "type": "integer", + "format": "int64" + }, + "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" + }, + "orphanDependents": { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "type": "boolean" + }, + "preconditions": { + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" + }, + "propagationPolicy": { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "admission.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "admission.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "admissionregistration.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "admissionregistration.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "apiextensions.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "apiextensions.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "apiregistration.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "apiregistration.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "apps", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "apps", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "apps", + "kind": "DeleteOptions", + "version": "v1beta2" + }, + { + "group": "authentication.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "authentication.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "autoscaling", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "autoscaling", + "kind": "DeleteOptions", + "version": "v2beta1" + }, + { + "group": "autoscaling", + "kind": "DeleteOptions", + "version": "v2beta2" + }, + { + "group": "batch", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "batch", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "certificates.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "certificates.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "coordination.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "coordination.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "discovery.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "discovery.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "events.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "events.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "extensions", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "imagepolicy.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "internal.apiserver.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "networking.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "networking.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "node.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "node.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "node.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "policy", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "policy", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "scheduling.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "scheduling.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "scheduling.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "storage.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "storage.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "storage.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1": { + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery": { + "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + "type": "object", + "required": [ + "groupVersion", + "version" + ], + "properties": { + "groupVersion": { + "description": "groupVersion specifies the API group and version in the form \"group/version\"", + "type": "string" + }, + "version": { + "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "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", + "additionalProperties": { + "type": "string" + } + } + }, + "x-kubernetes-map-type": "atomic" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string", + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge" + }, + "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + "type": "string" + }, + "remainingItemCount": { + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + "type": "integer", + "format": "int64" + }, + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry": { + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1" + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "time": { + "description": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime": { + "description": "MicroTime is version of Time with microsecond level precision.", + "type": "string", + "format": "date-time" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "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", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-patch-strategy": "merge" + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "labels": { + "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", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry" + } + }, + "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\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" + }, + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + "type": "object", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "type": "object", + "properties": { + "resourceVersion": { + "description": "Specifies the target ResourceVersion", + "type": "string" + }, + "uid": { + "description": "Specifies the target UID.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR": { + "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + "type": "object", + "required": [ + "clientCIDR", + "serverAddress" + ], + "properties": { + "clientCIDR": { + "description": "The CIDR with which clients can match their IP to figure out the server address that they should use.", + "type": "string" + }, + "serverAddress": { + "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { + "description": "Status is a return value for calls that don't return other objects.", + "type": "object", + "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" + }, + "code": { + "description": "Suggested HTTP return code for this status, 0 if not set.", + "type": "integer", + "format": "int32" + }, + "details": { + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" + }, + "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" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + }, + "reason": { + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + "type": "string" + }, + "status": { + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Status", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "type": "object", + "properties": { + "field": { + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + "type": "string" + }, + "message": { + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + "type": "string" + }, + "reason": { + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "type": "object", + "properties": { + "causes": { + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" + } + }, + "group": { + "description": "The group attribute of the resource associated with the status StatusReason.", + "type": "string" + }, + "kind": { + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + "type": "string" + }, + "retryAfterSeconds": { + "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + "type": "integer", + "format": "int32" + }, + "uid": { + "description": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "type": "string", + "format": "date-time" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent": { + "description": "Event represents a single event to a watched resource.", + "type": "object", + "required": [ + "type", + "object" + ], + "properties": { + "object": { + "description": "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" + }, + "type": { + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "admission.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "admission.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "admissionregistration.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "admissionregistration.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "apiextensions.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "apiextensions.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "apiregistration.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "apiregistration.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "apps", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "apps", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "apps", + "kind": "WatchEvent", + "version": "v1beta2" + }, + { + "group": "authentication.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "authentication.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "autoscaling", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "autoscaling", + "kind": "WatchEvent", + "version": "v2beta1" + }, + { + "group": "autoscaling", + "kind": "WatchEvent", + "version": "v2beta2" + }, + { + "group": "batch", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "batch", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "certificates.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "certificates.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "coordination.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "coordination.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "discovery.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "discovery.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "events.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "events.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "extensions", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "imagepolicy.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "internal.apiserver.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "networking.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "networking.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "node.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "node.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "node.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "policy", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "policy", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "scheduling.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "scheduling.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "scheduling.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "storage.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "storage.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "storage.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + } + ] + }, + "io.k8s.apimachinery.pkg.runtime.RawExtension": { + "description": "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", + "type": "object" + }, + "io.k8s.apimachinery.pkg.util.intstr.IntOrString": { + "description": "IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.", + "type": "string", + "format": "int-or-string" + }, + "io.k8s.apimachinery.pkg.version.Info": { + "description": "Info contains versioning information. how we'll want to distribute that information.", + "type": "object", + "required": [ + "major", + "minor", + "gitVersion", + "gitCommit", + "gitTreeState", + "buildDate", + "goVersion", + "compiler", + "platform" + ], + "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" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService": { + "description": "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + "type": "object", + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec contains information for locating and communicating with a server", + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec" + }, + "status": { + "description": "Status contains derived information about an API server", + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiregistration.k8s.io", + "kind": "APIService", + "version": "v1" + } + ] + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition": { + "description": "APIServiceCondition describes the state of an APIService at a particular point", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type is the type of the condition.", + "type": "string" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList": { + "description": "APIServiceList is a list of APIService objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiregistration.k8s.io", + "kind": "APIServiceList", + "version": "v1" + } + ] + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec": { + "description": "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + "type": "object", + "required": [ + "groupPriorityMinimum", + "versionPriority" + ], + "properties": { + "caBundle": { + "description": "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + "type": "string", + "format": "byte", + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "Group is the API group name this server hosts", + "type": "string" + }, + "groupPriorityMinimum": { + "description": "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + "type": "integer", + "format": "int32" + }, + "insecureSkipTLSVerify": { + "description": "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + "type": "boolean" + }, + "service": { + "description": "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.ServiceReference" + }, + "version": { + "description": "Version is the API version this server hosts. For example, \"v1\"", + "type": "string" + }, + "versionPriority": { + "description": "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA \u003e beta \u003e alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceStatus": { + "description": "APIServiceStatus contains derived information about an API server", + "type": "object", + "properties": { + "conditions": { + "description": "Current service state of apiService.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.ServiceReference": { + "description": "ServiceReference holds a reference to Service.legacy.k8s.io", + "type": "object", + "properties": { + "name": { + "description": "Name is the name of the service", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the service", + "type": "string" + }, + "port": { + "description": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService": { + "description": "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", + "type": "object", + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec contains information for locating and communicating with a server", + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec" + }, + "status": { + "description": "Status contains derived information about an API server", + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiregistration.k8s.io", + "kind": "APIService", + "version": "v1beta1" + } + ] + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition": { + "description": "APIServiceCondition describes the state of an APIService at a particular point", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type is the type of the condition.", + "type": "string" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceList": { + "description": "APIServiceList is a list of APIService objects.", + "type": "object", + "required": [ + "items" + ], + "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" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" + } + }, + "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": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apiregistration.k8s.io", + "kind": "APIServiceList", + "version": "v1beta1" + } + ] + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec": { + "description": "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", + "type": "object", + "required": [ + "groupPriorityMinimum", + "versionPriority" + ], + "properties": { + "caBundle": { + "description": "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used.", + "type": "string", + "format": "byte", + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "Group is the API group name this server hosts", + "type": "string" + }, + "groupPriorityMinimum": { + "description": "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s", + "type": "integer", + "format": "int32" + }, + "insecureSkipTLSVerify": { + "description": "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", + "type": "boolean" + }, + "service": { + "description": "Service is a reference to the service for this API server. It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.", + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference" + }, + "version": { + "description": "Version is the API version this server hosts. For example, \"v1\"", + "type": "string" + }, + "versionPriority": { + "description": "VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA \u003e beta \u003e alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus": { + "description": "APIServiceStatus contains derived information about an API server", + "type": "object", + "properties": { + "conditions": { + "description": "Current service state of apiService.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" + }, + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + } + } + }, + "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference": { + "description": "ServiceReference holds a reference to Service.legacy.k8s.io", + "type": "object", + "properties": { + "name": { + "description": "Name is the name of the service", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the service", + "type": "string" + }, + "port": { + "description": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", + "type": "integer", + "format": "int32" + } + } + } + }, + "resources": [ + { + "apiVersion": "admission.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "admission.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "admission.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "admission.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1", + "kind": "MutatingWebhookConfiguration", + "definition": "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration", + "scope": "Cluster" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1", + "kind": "MutatingWebhookConfigurationList", + "definition": "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1", + "kind": "ValidatingWebhookConfiguration", + "definition": "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration", + "scope": "Cluster" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1", + "kind": "ValidatingWebhookConfigurationList", + "definition": "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "kind": "MutatingWebhookConfiguration", + "definition": "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration", + "scope": "Cluster" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "kind": "MutatingWebhookConfigurationList", + "definition": "io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "kind": "ValidatingWebhookConfiguration", + "definition": "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration", + "scope": "Cluster" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "kind": "ValidatingWebhookConfigurationList", + "definition": "io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfigurationList" + }, + { + "apiVersion": "admissionregistration.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinition", + "definition": "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition", + "scope": "Cluster" + }, + { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "CustomResourceDefinitionList", + "definition": "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList" + }, + { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apiextensions.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apiextensions.k8s.io/v1beta1", + "kind": "CustomResourceDefinition", + "definition": "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition", + "scope": "Cluster" + }, + { + "apiVersion": "apiextensions.k8s.io/v1beta1", + "kind": "CustomResourceDefinitionList", + "definition": "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList" + }, + { + "apiVersion": "apiextensions.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apiextensions.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apiregistration.k8s.io/v1", + "kind": "APIService", + "definition": "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService", + "scope": "Cluster" + }, + { + "apiVersion": "apiregistration.k8s.io/v1", + "kind": "APIServiceList", + "definition": "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList" + }, + { + "apiVersion": "apiregistration.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apiregistration.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apiregistration.k8s.io/v1beta1", + "kind": "APIService", + "definition": "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService", + "scope": "Cluster" + }, + { + "apiVersion": "apiregistration.k8s.io/v1beta1", + "kind": "APIServiceList", + "definition": "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceList" + }, + { + "apiVersion": "apiregistration.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apiregistration.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apps/v1", + "kind": "ControllerRevision", + "definition": "io.k8s.api.apps.v1.ControllerRevision", + "scope": "Namespaced" + }, + { + "apiVersion": "apps/v1", + "kind": "ControllerRevisionList", + "definition": "io.k8s.api.apps.v1.ControllerRevisionList" + }, + { + "apiVersion": "apps/v1", + "kind": "DaemonSet", + "definition": "io.k8s.api.apps.v1.DaemonSet", + "scope": "Namespaced" + }, + { + "apiVersion": "apps/v1", + "kind": "DaemonSetList", + "definition": "io.k8s.api.apps.v1.DaemonSetList" + }, + { + "apiVersion": "apps/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "definition": "io.k8s.api.apps.v1.Deployment", + "scope": "Namespaced" + }, + { + "apiVersion": "apps/v1", + "kind": "DeploymentList", + "definition": "io.k8s.api.apps.v1.DeploymentList" + }, + { + "apiVersion": "apps/v1", + "kind": "ReplicaSet", + "definition": "io.k8s.api.apps.v1.ReplicaSet", + "scope": "Namespaced" + }, + { + "apiVersion": "apps/v1", + "kind": "ReplicaSetList", + "definition": "io.k8s.api.apps.v1.ReplicaSetList" + }, + { + "apiVersion": "apps/v1", + "kind": "StatefulSet", + "definition": "io.k8s.api.apps.v1.StatefulSet", + "scope": "Namespaced" + }, + { + "apiVersion": "apps/v1", + "kind": "StatefulSetList", + "definition": "io.k8s.api.apps.v1.StatefulSetList" + }, + { + "apiVersion": "apps/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apps/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apps/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "apps/v1beta2", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "apps/v1beta2", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "authentication.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "authentication.k8s.io/v1", + "kind": "TokenRequest", + "definition": "io.k8s.api.authentication.v1.TokenRequest" + }, + { + "apiVersion": "authentication.k8s.io/v1", + "kind": "TokenReview", + "definition": "io.k8s.api.authentication.v1.TokenReview" + }, + { + "apiVersion": "authentication.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "authentication.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "authentication.k8s.io/v1beta1", + "kind": "TokenReview", + "definition": "io.k8s.api.authentication.v1beta1.TokenReview" + }, + { + "apiVersion": "authentication.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "authorization.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "authorization.k8s.io/v1", + "kind": "LocalSubjectAccessReview", + "definition": "io.k8s.api.authorization.v1.LocalSubjectAccessReview" + }, + { + "apiVersion": "authorization.k8s.io/v1", + "kind": "SelfSubjectAccessReview", + "definition": "io.k8s.api.authorization.v1.SelfSubjectAccessReview" + }, + { + "apiVersion": "authorization.k8s.io/v1", + "kind": "SelfSubjectRulesReview", + "definition": "io.k8s.api.authorization.v1.SelfSubjectRulesReview" + }, + { + "apiVersion": "authorization.k8s.io/v1", + "kind": "SubjectAccessReview", + "definition": "io.k8s.api.authorization.v1.SubjectAccessReview" + }, + { + "apiVersion": "authorization.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "authorization.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "authorization.k8s.io/v1beta1", + "kind": "LocalSubjectAccessReview", + "definition": "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview" + }, + { + "apiVersion": "authorization.k8s.io/v1beta1", + "kind": "SelfSubjectAccessReview", + "definition": "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview" + }, + { + "apiVersion": "authorization.k8s.io/v1beta1", + "kind": "SelfSubjectRulesReview", + "definition": "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview" + }, + { + "apiVersion": "authorization.k8s.io/v1beta1", + "kind": "SubjectAccessReview", + "definition": "io.k8s.api.authorization.v1beta1.SubjectAccessReview" + }, + { + "apiVersion": "authorization.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "autoscaling/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "autoscaling/v1", + "kind": "HorizontalPodAutoscaler", + "definition": "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler", + "scope": "Namespaced" + }, + { + "apiVersion": "autoscaling/v1", + "kind": "HorizontalPodAutoscalerList", + "definition": "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + }, + { + "apiVersion": "autoscaling/v1", + "kind": "Scale", + "definition": "io.k8s.api.autoscaling.v1.Scale", + "scope": "Namespaced" + }, + { + "apiVersion": "autoscaling/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "autoscaling/v2beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "autoscaling/v2beta1", + "kind": "HorizontalPodAutoscaler", + "definition": "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler", + "scope": "Namespaced" + }, + { + "apiVersion": "autoscaling/v2beta1", + "kind": "HorizontalPodAutoscalerList", + "definition": "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList" + }, + { + "apiVersion": "autoscaling/v2beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "autoscaling/v2beta2", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "autoscaling/v2beta2", + "kind": "HorizontalPodAutoscaler", + "definition": "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler", + "scope": "Namespaced" + }, + { + "apiVersion": "autoscaling/v2beta2", + "kind": "HorizontalPodAutoscalerList", + "definition": "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList" + }, + { + "apiVersion": "autoscaling/v2beta2", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "batch/v1", + "kind": "CronJob", + "definition": "io.k8s.api.batch.v1.CronJob", + "scope": "Namespaced" + }, + { + "apiVersion": "batch/v1", + "kind": "CronJobList", + "definition": "io.k8s.api.batch.v1.CronJobList" + }, + { + "apiVersion": "batch/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "batch/v1", + "kind": "Job", + "definition": "io.k8s.api.batch.v1.Job", + "scope": "Namespaced" + }, + { + "apiVersion": "batch/v1", + "kind": "JobList", + "definition": "io.k8s.api.batch.v1.JobList" + }, + { + "apiVersion": "batch/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "batch/v1beta1", + "kind": "CronJob", + "definition": "io.k8s.api.batch.v1beta1.CronJob", + "scope": "Namespaced" + }, + { + "apiVersion": "batch/v1beta1", + "kind": "CronJobList", + "definition": "io.k8s.api.batch.v1beta1.CronJobList" + }, + { + "apiVersion": "batch/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "batch/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "certificates.k8s.io/v1", + "kind": "CertificateSigningRequest", + "definition": "io.k8s.api.certificates.v1.CertificateSigningRequest", + "scope": "Cluster" + }, + { + "apiVersion": "certificates.k8s.io/v1", + "kind": "CertificateSigningRequestList", + "definition": "io.k8s.api.certificates.v1.CertificateSigningRequestList" + }, + { + "apiVersion": "certificates.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "certificates.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "certificates.k8s.io/v1beta1", + "kind": "CertificateSigningRequest", + "definition": "io.k8s.api.certificates.v1beta1.CertificateSigningRequest", + "scope": "Cluster" + }, + { + "apiVersion": "certificates.k8s.io/v1beta1", + "kind": "CertificateSigningRequestList", + "definition": "io.k8s.api.certificates.v1beta1.CertificateSigningRequestList" + }, + { + "apiVersion": "certificates.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "certificates.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "coordination.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "coordination.k8s.io/v1", + "kind": "Lease", + "definition": "io.k8s.api.coordination.v1.Lease", + "scope": "Namespaced" + }, + { + "apiVersion": "coordination.k8s.io/v1", + "kind": "LeaseList", + "definition": "io.k8s.api.coordination.v1.LeaseList" + }, + { + "apiVersion": "coordination.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "coordination.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "coordination.k8s.io/v1beta1", + "kind": "Lease", + "definition": "io.k8s.api.coordination.v1beta1.Lease", + "scope": "Namespaced" + }, + { + "apiVersion": "coordination.k8s.io/v1beta1", + "kind": "LeaseList", + "definition": "io.k8s.api.coordination.v1beta1.LeaseList" + }, + { + "apiVersion": "coordination.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "discovery.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "discovery.k8s.io/v1", + "kind": "EndpointSlice", + "definition": "io.k8s.api.discovery.v1.EndpointSlice", + "scope": "Namespaced" + }, + { + "apiVersion": "discovery.k8s.io/v1", + "kind": "EndpointSliceList", + "definition": "io.k8s.api.discovery.v1.EndpointSliceList" + }, + { + "apiVersion": "discovery.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "discovery.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "discovery.k8s.io/v1beta1", + "kind": "EndpointSlice", + "definition": "io.k8s.api.discovery.v1beta1.EndpointSlice", + "scope": "Namespaced" + }, + { + "apiVersion": "discovery.k8s.io/v1beta1", + "kind": "EndpointSliceList", + "definition": "io.k8s.api.discovery.v1beta1.EndpointSliceList" + }, + { + "apiVersion": "discovery.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "events.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "events.k8s.io/v1", + "kind": "Event", + "definition": "io.k8s.api.events.v1.Event", + "scope": "Namespaced" + }, + { + "apiVersion": "events.k8s.io/v1", + "kind": "EventList", + "definition": "io.k8s.api.events.v1.EventList" + }, + { + "apiVersion": "events.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "events.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "events.k8s.io/v1beta1", + "kind": "Event", + "definition": "io.k8s.api.events.v1beta1.Event", + "scope": "Namespaced" + }, + { + "apiVersion": "events.k8s.io/v1beta1", + "kind": "EventList", + "definition": "io.k8s.api.events.v1beta1.EventList" + }, + { + "apiVersion": "events.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "extensions/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "extensions/v1beta1", + "kind": "Ingress", + "definition": "io.k8s.api.extensions.v1beta1.Ingress", + "scope": "Namespaced" + }, + { + "apiVersion": "extensions/v1beta1", + "kind": "IngressList", + "definition": "io.k8s.api.extensions.v1beta1.IngressList" + }, + { + "apiVersion": "extensions/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "kind": "FlowSchema", + "definition": "io.k8s.api.flowcontrol.v1beta1.FlowSchema", + "scope": "Cluster" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "kind": "FlowSchemaList", + "definition": "io.k8s.api.flowcontrol.v1beta1.FlowSchemaList" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "kind": "PriorityLevelConfiguration", + "definition": "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration", + "scope": "Cluster" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "kind": "PriorityLevelConfigurationList", + "definition": "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationList" + }, + { + "apiVersion": "flowcontrol.apiserver.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "imagepolicy.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "imagepolicy.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "internal.apiserver.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "internal.apiserver.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "Ingress", + "definition": "io.k8s.api.networking.v1.Ingress", + "scope": "Namespaced" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "IngressClass", + "definition": "io.k8s.api.networking.v1.IngressClass", + "scope": "Cluster" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "IngressClassList", + "definition": "io.k8s.api.networking.v1.IngressClassList" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "IngressList", + "definition": "io.k8s.api.networking.v1.IngressList" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "NetworkPolicy", + "definition": "io.k8s.api.networking.v1.NetworkPolicy", + "scope": "Namespaced" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "NetworkPolicyList", + "definition": "io.k8s.api.networking.v1.NetworkPolicyList" + }, + { + "apiVersion": "networking.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "networking.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "networking.k8s.io/v1beta1", + "kind": "Ingress", + "definition": "io.k8s.api.networking.v1beta1.Ingress", + "scope": "Namespaced" + }, + { + "apiVersion": "networking.k8s.io/v1beta1", + "kind": "IngressClass", + "definition": "io.k8s.api.networking.v1beta1.IngressClass", + "scope": "Cluster" + }, + { + "apiVersion": "networking.k8s.io/v1beta1", + "kind": "IngressClassList", + "definition": "io.k8s.api.networking.v1beta1.IngressClassList" + }, + { + "apiVersion": "networking.k8s.io/v1beta1", + "kind": "IngressList", + "definition": "io.k8s.api.networking.v1beta1.IngressList" + }, + { + "apiVersion": "networking.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "node.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "node.k8s.io/v1", + "kind": "RuntimeClass", + "definition": "io.k8s.api.node.v1.RuntimeClass", + "scope": "Cluster" + }, + { + "apiVersion": "node.k8s.io/v1", + "kind": "RuntimeClassList", + "definition": "io.k8s.api.node.v1.RuntimeClassList" + }, + { + "apiVersion": "node.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "node.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "node.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "node.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "node.k8s.io/v1beta1", + "kind": "RuntimeClass", + "definition": "io.k8s.api.node.v1beta1.RuntimeClass", + "scope": "Cluster" + }, + { + "apiVersion": "node.k8s.io/v1beta1", + "kind": "RuntimeClassList", + "definition": "io.k8s.api.node.v1beta1.RuntimeClassList" + }, + { + "apiVersion": "node.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "policy/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "policy/v1", + "kind": "PodDisruptionBudget", + "definition": "io.k8s.api.policy.v1.PodDisruptionBudget", + "scope": "Namespaced" + }, + { + "apiVersion": "policy/v1", + "kind": "PodDisruptionBudgetList", + "definition": "io.k8s.api.policy.v1.PodDisruptionBudgetList" + }, + { + "apiVersion": "policy/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "Eviction", + "definition": "io.k8s.api.policy.v1beta1.Eviction" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "PodDisruptionBudget", + "definition": "io.k8s.api.policy.v1beta1.PodDisruptionBudget", + "scope": "Namespaced" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "PodDisruptionBudgetList", + "definition": "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "PodSecurityPolicy", + "definition": "io.k8s.api.policy.v1beta1.PodSecurityPolicy", + "scope": "Cluster" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "PodSecurityPolicyList", + "definition": "io.k8s.api.policy.v1beta1.PodSecurityPolicyList" + }, + { + "apiVersion": "policy/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRole", + "definition": "io.k8s.api.rbac.v1.ClusterRole", + "scope": "Cluster" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBinding", + "definition": "io.k8s.api.rbac.v1.ClusterRoleBinding", + "scope": "Cluster" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBindingList", + "definition": "io.k8s.api.rbac.v1.ClusterRoleBindingList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleList", + "definition": "io.k8s.api.rbac.v1.ClusterRoleList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "Role", + "definition": "io.k8s.api.rbac.v1.Role", + "scope": "Namespaced" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "RoleBinding", + "definition": "io.k8s.api.rbac.v1.RoleBinding", + "scope": "Namespaced" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "RoleBindingList", + "definition": "io.k8s.api.rbac.v1.RoleBindingList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "RoleList", + "definition": "io.k8s.api.rbac.v1.RoleList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "ClusterRole", + "definition": "io.k8s.api.rbac.v1beta1.ClusterRole", + "scope": "Cluster" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "ClusterRoleBinding", + "definition": "io.k8s.api.rbac.v1beta1.ClusterRoleBinding", + "scope": "Cluster" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "ClusterRoleBindingList", + "definition": "io.k8s.api.rbac.v1beta1.ClusterRoleBindingList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "ClusterRoleList", + "definition": "io.k8s.api.rbac.v1beta1.ClusterRoleList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "Role", + "definition": "io.k8s.api.rbac.v1beta1.Role", + "scope": "Namespaced" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "RoleBinding", + "definition": "io.k8s.api.rbac.v1beta1.RoleBinding", + "scope": "Namespaced" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "RoleBindingList", + "definition": "io.k8s.api.rbac.v1beta1.RoleBindingList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "RoleList", + "definition": "io.k8s.api.rbac.v1beta1.RoleList" + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "scheduling.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "scheduling.k8s.io/v1", + "kind": "PriorityClass", + "definition": "io.k8s.api.scheduling.v1.PriorityClass", + "scope": "Cluster" + }, + { + "apiVersion": "scheduling.k8s.io/v1", + "kind": "PriorityClassList", + "definition": "io.k8s.api.scheduling.v1.PriorityClassList" + }, + { + "apiVersion": "scheduling.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "scheduling.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "scheduling.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "scheduling.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "scheduling.k8s.io/v1beta1", + "kind": "PriorityClass", + "definition": "io.k8s.api.scheduling.v1beta1.PriorityClass", + "scope": "Cluster" + }, + { + "apiVersion": "scheduling.k8s.io/v1beta1", + "kind": "PriorityClassList", + "definition": "io.k8s.api.scheduling.v1beta1.PriorityClassList" + }, + { + "apiVersion": "scheduling.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "CSIDriver", + "definition": "io.k8s.api.storage.v1.CSIDriver", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "CSIDriverList", + "definition": "io.k8s.api.storage.v1.CSIDriverList" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "CSINode", + "definition": "io.k8s.api.storage.v1.CSINode", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "CSINodeList", + "definition": "io.k8s.api.storage.v1.CSINodeList" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClass", + "definition": "io.k8s.api.storage.v1.StorageClass", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "StorageClassList", + "definition": "io.k8s.api.storage.v1.StorageClassList" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "VolumeAttachment", + "definition": "io.k8s.api.storage.v1.VolumeAttachment", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "VolumeAttachmentList", + "definition": "io.k8s.api.storage.v1.VolumeAttachmentList" + }, + { + "apiVersion": "storage.k8s.io/v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "storage.k8s.io/v1alpha1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "storage.k8s.io/v1alpha1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "CSIDriver", + "definition": "io.k8s.api.storage.v1beta1.CSIDriver", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "CSIDriverList", + "definition": "io.k8s.api.storage.v1beta1.CSIDriverList" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "CSINode", + "definition": "io.k8s.api.storage.v1beta1.CSINode", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "CSINodeList", + "definition": "io.k8s.api.storage.v1beta1.CSINodeList" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "CSIStorageCapacity", + "definition": "io.k8s.api.storage.v1beta1.CSIStorageCapacity", + "scope": "Namespaced" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "CSIStorageCapacityList", + "definition": "io.k8s.api.storage.v1beta1.CSIStorageCapacityList" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "StorageClass", + "definition": "io.k8s.api.storage.v1beta1.StorageClass", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "StorageClassList", + "definition": "io.k8s.api.storage.v1beta1.StorageClassList" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "VolumeAttachment", + "definition": "io.k8s.api.storage.v1beta1.VolumeAttachment", + "scope": "Cluster" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "VolumeAttachmentList", + "definition": "io.k8s.api.storage.v1beta1.VolumeAttachmentList" + }, + { + "apiVersion": "storage.k8s.io/v1beta1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + }, + { + "apiVersion": "v1", + "kind": "APIGroup", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + }, + { + "apiVersion": "v1", + "kind": "APIGroupList", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList" + }, + { + "apiVersion": "v1", + "kind": "APIResourceList", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + }, + { + "apiVersion": "v1", + "kind": "APIVersions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions" + }, + { + "apiVersion": "v1", + "kind": "Binding", + "definition": "io.k8s.api.core.v1.Binding" + }, + { + "apiVersion": "v1", + "kind": "ComponentStatus", + "definition": "io.k8s.api.core.v1.ComponentStatus", + "scope": "Cluster" + }, + { + "apiVersion": "v1", + "kind": "ComponentStatusList", + "definition": "io.k8s.api.core.v1.ComponentStatusList" + }, + { + "apiVersion": "v1", + "kind": "ConfigMap", + "definition": "io.k8s.api.core.v1.ConfigMap", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "ConfigMapList", + "definition": "io.k8s.api.core.v1.ConfigMapList" + }, + { + "apiVersion": "v1", + "kind": "DeleteOptions", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + }, + { + "apiVersion": "v1", + "kind": "Endpoints", + "definition": "io.k8s.api.core.v1.Endpoints", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "EndpointsList", + "definition": "io.k8s.api.core.v1.EndpointsList" + }, + { + "apiVersion": "v1", + "kind": "Event", + "definition": "io.k8s.api.core.v1.Event", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "EventList", + "definition": "io.k8s.api.core.v1.EventList" + }, + { + "apiVersion": "v1", + "kind": "LimitRange", + "definition": "io.k8s.api.core.v1.LimitRange", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "LimitRangeList", + "definition": "io.k8s.api.core.v1.LimitRangeList" + }, + { + "apiVersion": "v1", + "kind": "Namespace", + "definition": "io.k8s.api.core.v1.Namespace", + "scope": "Cluster" + }, + { + "apiVersion": "v1", + "kind": "NamespaceList", + "definition": "io.k8s.api.core.v1.NamespaceList" + }, + { + "apiVersion": "v1", + "kind": "Node", + "definition": "io.k8s.api.core.v1.Node", + "scope": "Cluster" + }, + { + "apiVersion": "v1", + "kind": "NodeList", + "definition": "io.k8s.api.core.v1.NodeList" + }, + { + "apiVersion": "v1", + "kind": "NodeProxyOptions", + "scope": "Cluster" + }, + { + "apiVersion": "v1", + "kind": "PersistentVolume", + "definition": "io.k8s.api.core.v1.PersistentVolume", + "scope": "Cluster" + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "definition": "io.k8s.api.core.v1.PersistentVolumeClaim", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaimList", + "definition": "io.k8s.api.core.v1.PersistentVolumeClaimList" + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeList", + "definition": "io.k8s.api.core.v1.PersistentVolumeList" + }, + { + "apiVersion": "v1", + "kind": "Pod", + "definition": "io.k8s.api.core.v1.Pod", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PodAttachOptions", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PodExecOptions", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PodList", + "definition": "io.k8s.api.core.v1.PodList" + }, + { + "apiVersion": "v1", + "kind": "PodPortForwardOptions", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PodProxyOptions", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PodTemplate", + "definition": "io.k8s.api.core.v1.PodTemplate", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "PodTemplateList", + "definition": "io.k8s.api.core.v1.PodTemplateList" + }, + { + "apiVersion": "v1", + "kind": "ReplicationController", + "definition": "io.k8s.api.core.v1.ReplicationController", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "ReplicationControllerList", + "definition": "io.k8s.api.core.v1.ReplicationControllerList" + }, + { + "apiVersion": "v1", + "kind": "ResourceQuota", + "definition": "io.k8s.api.core.v1.ResourceQuota", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "ResourceQuotaList", + "definition": "io.k8s.api.core.v1.ResourceQuotaList" + }, + { + "apiVersion": "v1", + "kind": "Secret", + "definition": "io.k8s.api.core.v1.Secret", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "SecretList", + "definition": "io.k8s.api.core.v1.SecretList" + }, + { + "apiVersion": "v1", + "kind": "Service", + "definition": "io.k8s.api.core.v1.Service", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "definition": "io.k8s.api.core.v1.ServiceAccount", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "ServiceAccountList", + "definition": "io.k8s.api.core.v1.ServiceAccountList" + }, + { + "apiVersion": "v1", + "kind": "ServiceList", + "definition": "io.k8s.api.core.v1.ServiceList" + }, + { + "apiVersion": "v1", + "kind": "ServiceProxyOptions", + "scope": "Namespaced" + }, + { + "apiVersion": "v1", + "kind": "Status", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.Status" + }, + { + "apiVersion": "v1", + "kind": "WatchEvent", + "definition": "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + ] +} diff --git a/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json.gz b/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/data/kubernetes-openapi-union-v1.21.2.bundle-v1.json.gz deleted file mode 100644 index c3b00ce9523682b3c61c6553085eb91a85a7edc1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130598 zcmZ^pQ zkl(+(-!9u7FP#7Cjau4MI!LD#UR(DrcdjWm*X%g1$KBhWcB#Y9l7Q4UZF@Lza8 z`}YUAfuQ=NQ|Wl!hkh2~#F0j>y}ol@ek|BBykuVL=`{7C7bjyLsFFG9%3(QpKJpj& zl2{1yV(ks&4Ei#A@ZuzqkD)PR4%+v}Nk>sItQbZ+>O_GZrMmaN$bKA80yaOdoA zXsQ?c$BXGW3Dao4KcF840Z!{fRhl)tkxe z!8gZe;QT}s=I0|#KH#S(=@n6mp3oPQ(V~;M=hNKlQ5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JK<3CEC^(g Date: Thu, 12 Nov 2026 04:41:16 +0000 Subject: [PATCH 2/2] chore: update egistry.suse.com/bci/golang to 1.27 Signed-off-by: Derek Su --- Dockerfile | 2 +- package/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c479a7460..a33bbc4e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1.26.0@sha256:ecfaec9ed6d810b56388c508f4121597bfbba70d41a6dfeee4d8cad5f295fc32 FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS golangci-lint -FROM registry.suse.com/bci/golang:1.26@sha256:87dde729781b5347dbd4a5a3d4e084e906c3112b71b51095d9f74a46147de25c AS base +FROM registry.suse.com/bci/golang:1.27@sha256:182c55128c46dd2284ce07a9afaa4c05307c92f8014e0d3b0c256a4643b01923 AS base ARG TARGETARCH ARG http_proxy diff --git a/package/Dockerfile b/package/Dockerfile index e85116623..056433729 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.26.0@sha256:ecfaec9ed6d810b56388c508f4121597bfbba70d41a6dfeee4d8cad5f295fc32 -FROM registry.suse.com/bci/golang:1.26@sha256:87dde729781b5347dbd4a5a3d4e084e906c3112b71b51095d9f74a46147de25c AS app_builder +FROM registry.suse.com/bci/golang:1.27@sha256:182c55128c46dd2284ce07a9afaa4c05307c92f8014e0d3b0c256a4643b01923 AS app_builder WORKDIR /app @@ -13,7 +13,7 @@ RUN chmod +x /app/scripts/build RUN /app/scripts/build -FROM registry.suse.com/bci/golang:1.26@sha256:87dde729781b5347dbd4a5a3d4e084e906c3112b71b51095d9f74a46147de25c AS spdk_builder +FROM registry.suse.com/bci/golang:1.27@sha256:182c55128c46dd2284ce07a9afaa4c05307c92f8014e0d3b0c256a4643b01923 AS spdk_builder ARG ARCH=amd64